You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In below MWE three different coding styles were given for enabling sort-by option in name intersections. The first one didn't work. Not sure why name path {Ray \i} (or {Ray\i}, {Ray-\i}) wasn't accepted in inside a \foreach loop.
BTW, the second code snippet worked though it's sort of bad idea to share the same name path between all rays.
Minimal working example (MWE)
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[scale=2]
\draw [name path=Circle] (5,0) circle (2);
% what'wrong with using {Ray \i}?\foreach\i in {1} {
\draw [thick, name path={Ray \i}] (0, 0) -- (7,2);
\draw [fill=red, name intersections={of = {Ray \i} and Circle, name=c, sort by={Ray \i}}]
(c-1) circle (1mm);
}
\foreach\i in {1,2} {
\draw [blue, name path=Ray] (0, 0) -- (7,{0.2*\i+1.3});
\draw [fill,name intersections={of = Ray and Circle, name=c, sort by=Ray}]
(c-1) circle (0.5mm);
}
\draw [name path=Ray X] (0, 0) -- (7,2.5);
\draw [fill,name intersections={of = Ray X and Circle, name=c, sort by=Ray X}]
(c-1) circle (0.5mm);
\end{tikzpicture}
\end{document}
The text was updated successfully, but these errors were encountered:
Brief outline of the bug
In below MWE three different coding styles were given for enabling sort-by option in name intersections. The first one didn't work. Not sure why name path {Ray \i} (or {Ray\i}, {Ray-\i}) wasn't accepted in inside a \foreach loop.
BTW, the second code snippet worked though it's sort of bad idea to share the same name path between all rays.
Minimal working example (MWE)
The text was updated successfully, but these errors were encountered: