起源を通る多くの線

起源を通る多くの線

原点を通る多くの線で構成された図を描くのを手伝ってくれる人はいますか?

ここに画像の説明を入力してください

上の図に似ていますが、平面図と破線部分はなしです。動いている線のような効果を作りたいです。

答え1

3dtoolsライブラリを使用する方法は次のとおりですここおそらく、GitHub が数学の知識を持つユーザーにとってよりアクセスしやすいものになったとき、このライブラリは CTAN の一部になるでしょう... このライブラリを使用すると、座標にアクセスし、平面との交差を解析的に計算できます。

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{intersections,perspective,3d,3dtools}
\begin{document}
\begin{tikzpicture}[3d view={30}{15}]
 \path (0,0,0) coordinate (O) 
  foreach \X[count=\Y] in {(3,0,0),(2,1,1),(2,0,3),(1,1,3),(0,0,3)}
   {(O) -- \X coordinate (p\Y) coordinate[pos=-0.3] (p-\Y)};
 \path[canvas is xy plane at z=2,fill=blue!30] (
 (-4,-4) coordinate (r1) -- (4,-4) coordinate
 (r2) -- (4,4)  coordinate
 (r3) -- (-4,4) -- cycle;
 \path[name path=edge] (r1) -- (r2)  -- (r3); 
 \foreach \Y in {1,...,5}
 {\path[name path=ray] (p-\Y) -- (p\Y);
 \path[name intersections={of=edge and ray,total=\t},draw,thick]
 \ifnum\t=1
  (p-\Y) -- (intersection-1) coordinate (i-\Y)
 \else 
  (p-\Y) -- (p\Y)
 \fi;
 \pgfmathsetmacro{\itest}{TD("(p\Y)o(0,0,1)")}
 \ifdim\itest pt>0pt
  \pgfmathsetmacro{\tt}{2/TD("(p\Y)o(0,0,1)")}
  \ifdim\tt pt<1pt
   \pgfmathsetmacro{\myint}{TD("\tt*(p\Y)")}
   \draw[thick,dashed] (\myint) -- (i-\Y);
   \draw[thick] (\myint) node[circle,inner sep=1pt,fill]{} -- (p\Y);
  \fi
 \fi
 }
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

関連情報