5

I'm new to TikZ and I'm trying to label the angle between two intersecting circles, as seen in red in the following picture, enter image description here

Below is my code so far which makes the following diagram, enter image description here

\documentclass[border=5pt]{standalone}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,scale=5]
  \pgfmathsetmacro{\r}{1}
  \pgfmathsetmacro{\O}{60} 
  \pgfmathsetmacro{\i}{45} 

  \coordinate (O) at (0,0,0);
  \tdplotdrawarc[dashed]{(O)}{\r}{0}{360}{}{} %CIRCLE ONE

  \tdplotsetrotatedcoords{-\O}{\i}{0}
  \tdplotdrawarc[tdplot_rotated_coords]{(O)}{\r}{0}{360}{}{} %CIRCLE TWO
\end{tikzpicture}
\end{document}

I appreciate the help!

6

Welcome to TeX.SE! Here is a proposal. I do not know what the absolutely correct way is. I do, of course, know how to indicate an angle between two lines on a plane. But here we deal with an angle line between two curves. Is it supposed to run on the sphere? If so, on a great circle? In the limit of an infinitely large sphere this prescription will not reproduce our standard conventions in the plane, rather it will yield a straight line. Since this seems not to be well-defined, I just computed the intersection, I, of the two circles and points on the two circles that are away from the intersection by the same amount, I1 and I2. And then I connected those with an arc that "looks right".

\documentclass[border=5pt]{standalone}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,scale=5]
  \pgfmathsetmacro{\r}{1}
  \pgfmathsetmacro{\O}{60} 
  \pgfmathsetmacro{\i}{45} 
  \pgfmathsetmacro{\dang}{-30} 

  \coordinate (O) at (0,0,0);
  \tdplotdrawarc[dashed]{(O)}{\r}{0}{360}{}{} %CIRCLE ONE

  \tdplotsetrotatedcoords{-\O}{\i}{0}
  \tdplotdrawarc[tdplot_rotated_coords]{(O)}{\r}{0}{360}{}{} %CIRCLE TWO

  \path  ({sin(\O)},{cos(\O)},{0}) coordinate (I);
  \path  ({sin(\O+\dang)},{cos(\O+\dang)},{0}) coordinate (I1);
  \path[tdplot_rotated_coords]  ({sin(\dang)},{cos(\dang)},{0})
  coordinate (I2);
  \draw (I1) to[out=95,in=-50] node[pos=0.5,right] {$\i^\circ$} (I2);
\end{tikzpicture}
\end{document}

enter image description here

And this another proposal which will work in principle but not in practice without additional efforts. How could one define such an arc? Given the points I, I1 and I2, there is a plane that runs through these points. So one definition that will reproduce the standard angular arc in the limit of the circle radii going to infinity is to draw the ordinary arc in the above-mentioned plane. This would be absolutely straightforward to realize if one would know the 3d coordinates of the rotated coordinates. At this point, they are not stored anywhere, so in what follows comes an approximation that makes use of the fact that you chose the opening angle to be 45 degrees.

\documentclass[border=5pt]{standalone}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,scale=5]
  \pgfmathsetmacro{\r}{1}
  \pgfmathsetmacro{\O}{60} 
  \pgfmathsetmacro{\i}{45} 
  \pgfmathsetmacro{\dang}{-30} 
  \pgfmathsetmacro{\infang}{3}

  \coordinate (O) at (0,0,0);
  \tdplotdrawarc[dashed]{(O)}{\r}{0}{360}{}{} %CIRCLE ONE

  \tdplotsetrotatedcoords{-\O}{\i}{0}
  \tdplotdrawarc[tdplot_rotated_coords]{(O)}{\r}{0}{360}{}{} %CIRCLE TWO

  \path  ({sin(\O)},{cos(\O)},{0}) coordinate (I);
  \path  ({sin(\O+\dang)},{cos(\O+\dang)},{0}) coordinate (I1);
  \path[tdplot_rotated_coords]  
  ({sin(\dang)},{cos(\dang)},{0})  coordinate (I2);
  \tdplotsetrotatedcoords{-\O}{2*\i}{0}
  \path[tdplot_rotated_coords]  
  ({sin(\dang)},{cos(\dang)},{0})  coordinate (I3);
  \begin{scope}[shift={(I)}]
   \begin{scope}[x={(I1)},y={(I3)}]
     \draw plot[variable=\t,domain=0:42.9] ({pow(cos(\t),1)},{pow(sin(\t),1)});
   \end{scope}
  \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

If you feel this is the true method, one could probably make it work generally. But with the current lack of knowledge of the components of the coordinates it will be considerable effort.

This site is temporarily in read only mode and not accepting new answers.

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