4

I am trying to label the 45° angle ACB in a triangle drawn in 3D using TikZ:

Triangle

The full circle about C has been rotated in 3D about Y, and so it is in the correct plane. However, I cannot see how to do the same for arcs: the red arc is in the xy plane. How can I rotate this arc to the correct plane?

\documentclass[10pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[scale=6,z=.4cm]
    \draw[thick,dotted] (.5,0,.4) node[anchor=north]{$B$} -- (.9,0,.7) node[anchor=south west]{$A$};
    \draw[thick,dotted] (.5,0,.4) -- (.5,.5,.4) node[anchor=south]{$C$};
    \draw[thick,dotted] (.5,.5,.4) -- (.9,0,.7);
    \draw (.5,0.05,.4) -- (0.54, 0.05, 0.43) -- (0.54, 0, 0.43);

    \draw[thick] (.5,.5,.4) circle[x={(.8,0,.6)},y={(0,1,0)},radius=.2];
    \draw[thick,red] (.5,.3,.4) arc[x={(.8,0,.6)},y={(0,1,0)},start angle=-90,end angle=-45,radius=.2];
\end{tikzpicture}

\end{document}
2
  • 1
    Can you provide a minimal code that produces the image above instead of only the code snippet? Thank you.
    – Alenanno
    Jan 16, 2016 at 17:54
  • @Alenanno done. Jan 16, 2016 at 18:02

2 Answers 2

1

It is also possible to define the coordinate change only for the arc, using {[options]arc...}:

\documentclass[10pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[scale=6,z=.4cm]
\draw[thick,dotted] (.5,0,.4) node[anchor=north]{$B$} -- (.9,0,.7) node[anchor=south west]{$A$};
\draw[thick,dotted] (.5,0,.4) -- (.5,.5,.4) node[anchor=south]{$C$};
\draw[thick,dotted] (.5,.5,.4) -- (.9,0,.7);
\draw (.5,0.05,.4) -- (0.54, 0.05, 0.43) -- (0.54, 0, 0.43);

\draw[thick] (.5,.5,.4) circle[x={(.8,0,.6)},y={(0,1,0)},radius=.2];
\draw[thick,red] (.5,.3,.4){[x={(.8,0,.6)},y={(0,1,0)}]arc[start angle=-90,end angle=-45,radius=.2]};
\end{tikzpicture}

\end{document}
1

After some playing around, I have found that it is possible to provide the custom unit vectors to the \draw command rather than the arc command, but the point from which the arc starts must have been defined beforehand, and then referenced, otherwise the new x-vector will be used to calculate the starting coordinates:

Fixed arc

\documentclass[10pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[scale=6,z=.4cm]
    \draw[thick,dotted] (.5,0,.4) node[anchor=north]{$B$} -- (.9,0,.7) node[anchor=south west]{$A$};
    \draw[thick,dotted] (.5,0,.4) -- (.5,.5,.4) node[anchor=south]{$C$};
    \draw[thick,dotted] (.5,.5,.4) -- (.9,0,.7);
    \draw (.5,0.05,.4) -- (0.54, 0.05, 0.43) -- (0.54, 0, 0.43);

    \coordinate (arcstart) at (.5,.3,.4);
    \draw[thick] (.5,.5,.4) circle[x={(.8,0,.6)},y={(0,1,0)},radius=.2];
    \draw[x={(.8,0,.6)},y={(0,1,0)},thick,red] (arcstart) arc[start angle=-90,end angle=-45,radius=.2];
\end{tikzpicture}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .