a circular figure with lines behind a disc going off in all directions like a sun
You don't need to connect nodes.
First draw background lines. All starting from (0,0)
.
\foreach \angle in {0,1,...,359} \draw[cyan!50!black] (0,0)--++(\angle:4);
Second, draw a circular node
white filled:
\node[circle, fill=white, text=cyan!50!black, text width=15mm, align=center]{Orion\\2000};
And third (although it's the first command), define the clipping area:
\documentclass[tikz, border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\path[clip] (-2.5,-3) rectangle (1.3,1.5);
\foreach \angle in {0,1,...,359} \draw[cyan!50!black] (0,0)--++(\angle:4);
\node[circle, fill=white, text=cyan!50!black, text width=15mm, align=center]{Orion\\2000};
\end{tikzpicture}
\end{document}
Update:
As it seems that OP doesn't want to use a clip
and wants to define explicit points onto an external rectangle, here you have another solution. It's based on the linked one, but instead of named
nodes, it uses calc
library:
\documentclass[tikz,border=16mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\node[minimum size=36cm, anchor=south west] (A) {};
\foreach \j [remember=\j as \lastj (initially north west)] in {north east, south east, south west, north west}{
\foreach \i in {0,1,...,36}
\draw[line width=1pt, bend left=24, draw=cyan!50!black] (24,24) to ($(A.\lastj)!\i/36!(A.\j)$);
}
\node[circle,fill=white,text=cyan!50!black,text width=192mm, align=center] (mydisc) at (24,24) {\fontsize{128}{1}\selectfont NAME\\TITLE};
\end{tikzpicture}
\end{document}
To connect the edges of the circle you can use the border anchors of nodes (A.120)
and the to
Operator to connect it to the outer square.
\documentclass[tikz, border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[clip] (-2,-2) rectangle +(3,3);
\node[minimum size=5cm](A){};
\node[circle, draw, minimum size=1cm](B) at (A.center) {};
\foreach \angle in {0,5,...,360} \draw (B.\angle) to (A);
\end{tikzpicture}
\end{document}
The thing is if the circle B
is not centered at the square A
some strange thing happens which I don't know why but there's probably a reason. That's why there's the \draw[clip]
there.
If you want to avoid clipping (although I'm not sure why you'd want to do that) you can use intersections instead:
\documentclass[tikz, border=1mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\path[name path=rect] (-2,-2) rectangle +(3,3);
\node[circle, minimum size=1cm] (A) at (0,0) {};
\foreach \angle in {0,3,...,359}{
\begin{pgfinterruptboundingbox}
\path[name path global=ray] (A.\angle) to ++ (\angle:10);
\end{pgfinterruptboundingbox}
\draw[name intersections={of=rect and ray}] (A.\angle) to (intersection-1);
}
\end{tikzpicture}
\end{document}