\path[name intersections={of=c0 and c1,by=I0}];
I can use the through library to put a circle through this point:
\node[draw,circle through={(I0)}] at (O) {};
This works fine. However, I find I'm in need of the radius of this circle. So I did something different. I found the xy coordinates of the point I0:
\path[transform canvas] (I0); \pgfgetlastxy{\x}{\y};
The problem is, the point (\x,\y) is not the same as the point I0. (The inner circle should be the same as the outer circle going through the intersection point.) What am I doing wrong?
Thanks!
-Dan
Addendum: Oh! When I did the square root there was some kind of size problem. I had to do a scaling. That's a whole other question.
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{tikz}\usetikzlibrary{intersections,through}\begin{document}\newcommand*{\myangle}{10}\begin{tikzpicture}[scale=0.6]\coordinate (O) at (0,0);\path[name path=c0] (120:4) arc(-167.2:-219.2:10) arc(39.2:-12.8:10);\draw (120:4) arc(-167.2:-219.2:10) arc(39.2:-12.8:10);\path[name path=c1] (120+\myangle:4) arc(-167.2+\myangle:-219.2+\myangle:10) arc(39.2+\myangle:-12.8+\myangle:10);\draw (120+\myangle:4) arc({-167.2+\myangle}:-219.2+\myangle:10) arc(39.2+\myangle:-12.8+\myangle:10);\path[name intersections={of=c0 and c1,by=I0}];\path[transform canvas] (I0); \pgfgetlastxy{\x}{\y};\pgfmathsetmacro\radiusI{10*sqrt((\x/10)^2+(\y/10)^2)};\draw (O) circle(\radiusI pt);\node[draw,circle through={(I0)}] at (O) {};\end{tikzpicture}\end{document}