Drawing angles on a diagram in Tikz using the angles library











up vote
1
down vote

favorite












I've recently been trying to learn Tikz, and I've constructed a diagram to use for my dissertation, to help show a vector being split into components that are parallel (v_b) and perpendicular (v_g) to another vector (B). A vector normal to the plane is also shown (n).



Where I am struggling is including arcs to show angles between the vectors. I want the angle from n to v_i to be labelled theta_vn, the angle between n and v_b to be labelled theta_bn and the angle between v_b and v_i to be labelled psi.



I have looked at how other people have managed this and attempted to copy, but it is throwing an error message: "Package pgf Error: No shape named origin is known." where "origin" is one of the coordinates I've specified. Any help is appreciated or just any comments on improving my code in general.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}

begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (v_i) at (2,-14,3);
coordinate (v_b) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (v_i);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (v_b);
draw[->,thick] (v_b) -- node[below]{$vec{v_g}$} (v_i);

%Drawing other lines
draw (v_b) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (v_i);
draw (normal) -- (v_b);

%Drawing angles - throwing error
pic ["$theta_{vn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_i};
pic ["$theta_{bn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_b};
pic ["$psi$", angle eccentricity = 1.2, angle radius = 3cm] {angle = v_i -- origin -- v_b};
end{tikzpicture}

end{document}









share|improve this question









New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Could you probably add a fully compilable MWE instead of a snippet.
    – Raaja
    yesterday






  • 1




    @Raaja there we go, sorry.
    – Jasper Salisbury
    yesterday















up vote
1
down vote

favorite












I've recently been trying to learn Tikz, and I've constructed a diagram to use for my dissertation, to help show a vector being split into components that are parallel (v_b) and perpendicular (v_g) to another vector (B). A vector normal to the plane is also shown (n).



Where I am struggling is including arcs to show angles between the vectors. I want the angle from n to v_i to be labelled theta_vn, the angle between n and v_b to be labelled theta_bn and the angle between v_b and v_i to be labelled psi.



I have looked at how other people have managed this and attempted to copy, but it is throwing an error message: "Package pgf Error: No shape named origin is known." where "origin" is one of the coordinates I've specified. Any help is appreciated or just any comments on improving my code in general.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}

begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (v_i) at (2,-14,3);
coordinate (v_b) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (v_i);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (v_b);
draw[->,thick] (v_b) -- node[below]{$vec{v_g}$} (v_i);

%Drawing other lines
draw (v_b) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (v_i);
draw (normal) -- (v_b);

%Drawing angles - throwing error
pic ["$theta_{vn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_i};
pic ["$theta_{bn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_b};
pic ["$psi$", angle eccentricity = 1.2, angle radius = 3cm] {angle = v_i -- origin -- v_b};
end{tikzpicture}

end{document}









share|improve this question









New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Could you probably add a fully compilable MWE instead of a snippet.
    – Raaja
    yesterday






  • 1




    @Raaja there we go, sorry.
    – Jasper Salisbury
    yesterday













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I've recently been trying to learn Tikz, and I've constructed a diagram to use for my dissertation, to help show a vector being split into components that are parallel (v_b) and perpendicular (v_g) to another vector (B). A vector normal to the plane is also shown (n).



Where I am struggling is including arcs to show angles between the vectors. I want the angle from n to v_i to be labelled theta_vn, the angle between n and v_b to be labelled theta_bn and the angle between v_b and v_i to be labelled psi.



I have looked at how other people have managed this and attempted to copy, but it is throwing an error message: "Package pgf Error: No shape named origin is known." where "origin" is one of the coordinates I've specified. Any help is appreciated or just any comments on improving my code in general.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}

begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (v_i) at (2,-14,3);
coordinate (v_b) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (v_i);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (v_b);
draw[->,thick] (v_b) -- node[below]{$vec{v_g}$} (v_i);

%Drawing other lines
draw (v_b) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (v_i);
draw (normal) -- (v_b);

%Drawing angles - throwing error
pic ["$theta_{vn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_i};
pic ["$theta_{bn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_b};
pic ["$psi$", angle eccentricity = 1.2, angle radius = 3cm] {angle = v_i -- origin -- v_b};
end{tikzpicture}

end{document}









share|improve this question









New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I've recently been trying to learn Tikz, and I've constructed a diagram to use for my dissertation, to help show a vector being split into components that are parallel (v_b) and perpendicular (v_g) to another vector (B). A vector normal to the plane is also shown (n).



Where I am struggling is including arcs to show angles between the vectors. I want the angle from n to v_i to be labelled theta_vn, the angle between n and v_b to be labelled theta_bn and the angle between v_b and v_i to be labelled psi.



I have looked at how other people have managed this and attempted to copy, but it is throwing an error message: "Package pgf Error: No shape named origin is known." where "origin" is one of the coordinates I've specified. Any help is appreciated or just any comments on improving my code in general.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}

begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (v_i) at (2,-14,3);
coordinate (v_b) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (v_i);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (v_b);
draw[->,thick] (v_b) -- node[below]{$vec{v_g}$} (v_i);

%Drawing other lines
draw (v_b) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (v_i);
draw (normal) -- (v_b);

%Drawing angles - throwing error
pic ["$theta_{vn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_i};
pic ["$theta_{bn}$", angle eccentricity = 1.2, angle radius = 3cm] {angle = normal -- origin -- v_b};
pic ["$psi$", angle eccentricity = 1.2, angle radius = 3cm] {angle = v_i -- origin -- v_b};
end{tikzpicture}

end{document}






tikz-pgf tikz-angles






share|improve this question









New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday





















New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Jasper Salisbury

62




62




New contributor




Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Jasper Salisbury is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Could you probably add a fully compilable MWE instead of a snippet.
    – Raaja
    yesterday






  • 1




    @Raaja there we go, sorry.
    – Jasper Salisbury
    yesterday














  • 1




    Could you probably add a fully compilable MWE instead of a snippet.
    – Raaja
    yesterday






  • 1




    @Raaja there we go, sorry.
    – Jasper Salisbury
    yesterday








1




1




Could you probably add a fully compilable MWE instead of a snippet.
– Raaja
yesterday




Could you probably add a fully compilable MWE instead of a snippet.
– Raaja
yesterday




1




1




@Raaja there we go, sorry.
– Jasper Salisbury
yesterday




@Raaja there we go, sorry.
– Jasper Salisbury
yesterday










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Partial answer: by removing the inter-word spacing in the angle's nodal definition and letting the tex engine know that it has to draw whatever we desire:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}
% a bit of a help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


with which you can get:



enter image description here



Complete answer: Now by including the additional package usepackage{quote} (I think):



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles,quotes}
begin{document}
% a bit of help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, "a", angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


you will end up with



enter image description here




I took the liberty to rename your variables.




Update 1: To make the interior angles, just make angle = vb--origin--vi. That should do.



  pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = vb--origin--vi};


This would give you



enter image description here






share|improve this answer























  • that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
    – Jasper Salisbury
    yesterday










  • @JasperSalisbury Just made an update to the answer, let me know whether that is okay.
    – Raaja
    22 hours ago










  • That's perfect, thank you so much.
    – Jasper Salisbury
    16 hours ago










  • @JasperSalisbury If you find it useful, consider accepting it.
    – Raaja
    16 hours ago













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Jasper Salisbury is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461113%2fdrawing-angles-on-a-diagram-in-tikz-using-the-angles-library%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













Partial answer: by removing the inter-word spacing in the angle's nodal definition and letting the tex engine know that it has to draw whatever we desire:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}
% a bit of a help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


with which you can get:



enter image description here



Complete answer: Now by including the additional package usepackage{quote} (I think):



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles,quotes}
begin{document}
% a bit of help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, "a", angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


you will end up with



enter image description here




I took the liberty to rename your variables.




Update 1: To make the interior angles, just make angle = vb--origin--vi. That should do.



  pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = vb--origin--vi};


This would give you



enter image description here






share|improve this answer























  • that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
    – Jasper Salisbury
    yesterday










  • @JasperSalisbury Just made an update to the answer, let me know whether that is okay.
    – Raaja
    22 hours ago










  • That's perfect, thank you so much.
    – Jasper Salisbury
    16 hours ago










  • @JasperSalisbury If you find it useful, consider accepting it.
    – Raaja
    16 hours ago

















up vote
2
down vote













Partial answer: by removing the inter-word spacing in the angle's nodal definition and letting the tex engine know that it has to draw whatever we desire:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}
% a bit of a help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


with which you can get:



enter image description here



Complete answer: Now by including the additional package usepackage{quote} (I think):



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles,quotes}
begin{document}
% a bit of help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, "a", angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


you will end up with



enter image description here




I took the liberty to rename your variables.




Update 1: To make the interior angles, just make angle = vb--origin--vi. That should do.



  pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = vb--origin--vi};


This would give you



enter image description here






share|improve this answer























  • that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
    – Jasper Salisbury
    yesterday










  • @JasperSalisbury Just made an update to the answer, let me know whether that is okay.
    – Raaja
    22 hours ago










  • That's perfect, thank you so much.
    – Jasper Salisbury
    16 hours ago










  • @JasperSalisbury If you find it useful, consider accepting it.
    – Raaja
    16 hours ago















up vote
2
down vote










up vote
2
down vote









Partial answer: by removing the inter-word spacing in the angle's nodal definition and letting the tex engine know that it has to draw whatever we desire:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}
% a bit of a help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


with which you can get:



enter image description here



Complete answer: Now by including the additional package usepackage{quote} (I think):



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles,quotes}
begin{document}
% a bit of help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, "a", angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


you will end up with



enter image description here




I took the liberty to rename your variables.




Update 1: To make the interior angles, just make angle = vb--origin--vi. That should do.



  pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = vb--origin--vi};


This would give you



enter image description here






share|improve this answer














Partial answer: by removing the inter-word spacing in the angle's nodal definition and letting the tex engine know that it has to draw whatever we desire:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles}
begin{document}
% a bit of a help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


with which you can get:



enter image description here



Complete answer: Now by including the additional package usepackage{quote} (I think):



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
usetikzlibrary{angles,quotes}
begin{document}
% a bit of help from: https://tex.stackexchange.com/questions/267201/tikz-angle-between-two-vectors-and-a-projection
begin{tikzpicture}[x=0.5cm,y=0.5cm,z=0.3cm,>=stealth]
%Defining coordinates
coordinate (origin) at (0,0,0);
coordinate (vi) at (2,-14,3);
coordinate (vb) at (0,-4,-14);
coordinate (normal) at (0,-10,0);

%Drawing vectors
draw[->,thick] (normal) -- node[left]{$vec{n}$} (origin);
draw[->,thick] (origin) -- node[right]{$vec{v_i}$} (vi);
draw[->,thick] (origin) -- node[left]{$vec{v_b}$} (vb);
draw[->,thick] (vb) -- node[below]{$vec{v_g}$} (vi);

%Drawing other lines
draw (vb) -- (0,1,3.5) node[above]{$vec{B}$};
draw (normal) -- (vi);
draw (normal) -- (vb);

pic [draw, angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vi};


pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = normal--origin--vb};

pic [draw, "a", angle eccentricity=1.2, angle radius = 3cm] {angle = vi--origin--vb};
end{tikzpicture}

end{document}


you will end up with



enter image description here




I took the liberty to rename your variables.




Update 1: To make the interior angles, just make angle = vb--origin--vi. That should do.



  pic [draw, "$theta$", angle eccentricity=1.2, angle radius = 3cm] {angle = vb--origin--vi};


This would give you



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 22 hours ago

























answered yesterday









Raaja

1,6312523




1,6312523












  • that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
    – Jasper Salisbury
    yesterday










  • @JasperSalisbury Just made an update to the answer, let me know whether that is okay.
    – Raaja
    22 hours ago










  • That's perfect, thank you so much.
    – Jasper Salisbury
    16 hours ago










  • @JasperSalisbury If you find it useful, consider accepting it.
    – Raaja
    16 hours ago




















  • that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
    – Jasper Salisbury
    yesterday










  • @JasperSalisbury Just made an update to the answer, let me know whether that is okay.
    – Raaja
    22 hours ago










  • That's perfect, thank you so much.
    – Jasper Salisbury
    16 hours ago










  • @JasperSalisbury If you find it useful, consider accepting it.
    – Raaja
    16 hours ago


















that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
– Jasper Salisbury
yesterday




that's amazing thank you, one final point, I wanted the arc on the interior angle not the exterior, do you know how I would achieve that?
– Jasper Salisbury
yesterday












@JasperSalisbury Just made an update to the answer, let me know whether that is okay.
– Raaja
22 hours ago




@JasperSalisbury Just made an update to the answer, let me know whether that is okay.
– Raaja
22 hours ago












That's perfect, thank you so much.
– Jasper Salisbury
16 hours ago




That's perfect, thank you so much.
– Jasper Salisbury
16 hours ago












@JasperSalisbury If you find it useful, consider accepting it.
– Raaja
16 hours ago






@JasperSalisbury If you find it useful, consider accepting it.
– Raaja
16 hours ago












Jasper Salisbury is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Jasper Salisbury is a new contributor. Be nice, and check out our Code of Conduct.













Jasper Salisbury is a new contributor. Be nice, and check out our Code of Conduct.












Jasper Salisbury is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461113%2fdrawing-angles-on-a-diagram-in-tikz-using-the-angles-library%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt