1

Can anyone help me out on drawing the angle between the skewed lines in a 3D vector diagram? The below is my source code.

\documentclass{article}[12pt] %Use Times New Roman Font \usepackage{newtxtext,newtxmath} %\usepackage[margin=2cm]{geometry} %Plotting Package \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta,arrows} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.markings, ext.arrows} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns.meta,patterns} \usepackage{tkz-euclide} \pgfdeclarelayer{background} \pgfsetlayers{background,main} %Pattern fill setting \tikzdeclarepattern{ name=mylines, parameters={ \pgfkeysvalueof{/pgf/pattern keys/size}, \pgfkeysvalueof{/pgf/pattern keys/angle}, \pgfkeysvalueof{/pgf/pattern keys/line width}, }, bounding box={ (0,-0.5*\pgfkeysvalueof{/pgf/pattern keys/line width}) and (\pgfkeysvalueof{/pgf/pattern keys/size}, 0.5*\pgfkeysvalueof{/pgf/pattern keys/line width})}, tile size={(\pgfkeysvalueof{/pgf/pattern keys/size}, \pgfkeysvalueof{/pgf/pattern keys/size})}, tile transformation={rotate=\pgfkeysvalueof{/pgf/pattern keys/angle}}, defaults={ size/.initial=5pt, angle/.initial=45, line width/.initial=.4pt, }, code={ \draw [line width=\pgfkeysvalueof{/pgf/pattern keys/line width}] (0,0) -- (\pgfkeysvalueof{/pgf/pattern keys/size},0); }, } \pgfplotsset{compat=1.11} %Plot compactability \tikzstyle witharrow=[postaction={decorate,decoration={markings,mark=at position 0.5 with {\arrow[#1]{stealth}}}}] %Arrow style %\pgfplotsset{ticks=none} \pgfplotsset{tick style={black}} \usepackage[pdftex,active,tightpage]{preview} %Preview diagram as single page \begin{document} %Non-Parallel Lines and not intersected (Skewed lines) \begin{preview} \begin{tikzpicture}[x=1.5cm, y=1cm, z=-0.6cm] % Axes \draw [-stealth] (0,0,0) -- (2.8,0,0) node [xshift=0.15cm] {$x$}; \draw [-stealth] (0,0,0) -- (0,3,0) node [above,yshift=-0.1cm] {$y$}; \draw [-stealth] (0,0,0) -- (0,0,2.5) node [xshift=-0.1cm] {$z$}; % Vectors %Line 1 \draw [black!100,very thick,decoration={markings, mark=at position 0.6 with \arrow{Stealth}}, postaction=decorate] (1,2,1) -- (3.4,2,2.2); \node [xshift=0.7cm,yshift=1.2cm] at (0.7,0.65,0.1) {$\textbf{r}_1$}; %Line 2 \draw [black!100,very thick,decoration={markings, mark=at position 0.6 with \arrow{Stealth}}, postaction=decorate] (6,9,15) -- (-1,-5,-6); \node [xshift=-1cm,yshift=-1.3cm] at (1.36,0.6,0.3) {$\textbf{r}_2$}; %Origin \draw (0,0,0) node[yshift=-0.2cm] {\small{$O$}}; \end{tikzpicture} \end{preview} \end{document} 

Thank you.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.