%20%EA%B6%A4%EC%A0%81%20%EA%B7%B8%EB%A6%AC%EA%B8%B0.png)
저는 당구에 관한 논문을 쓰고 있는데 다음과 같은 그림을 직접 그려보고 싶습니다. 렌더링할 수 있는 좋은 패키지가 있나요?
좋은 선택이 될 수 있다고 들었지만 asymptote
거기에 그리는 방법에 전혀 익숙하지 않습니다.
답변1
Metapost는 이러한 유형의 다이어그램에도 적합합니다. 다음은 접선과 각도 표시를 깔끔하게 수행하는 방법을 보여주는 왼쪽 다이어그램 버전입니다.
prologues:=3;
outputtemplate:="billiards%c.eps";
vardef mark(expr p,q,r,s) =
s*right rotated angle (p-q) shifted q {up rotated angle(p-q)} ..
s*right rotated angle (r-q) shifted q {up rotated angle(r-q)}
enddef;
beginfig(1);
% define the circle
path C;
C = fullcircle scaled 200;
% ... and the two points (everything else is defined relative to these two)
numeric t[]; t0 = 3.6; t1 = 6.3;
z0 = point t0 of C;
z1 = point t1 of C;
% draw the radiuses and the circle
draw origin -- z0 dashed evenly;
draw origin -- z1 dashed evenly;
draw C withcolor .637 red;
% draw the tangents
z2 = direction t0 of C;
z3 = direction t1 of C;
draw (z0-3z2) -- (z0+3z2);
draw (z1-3z3) -- (z1+3z3);
% define the other points and draw some arrows
z5 = .5[z0,z1];
z6 = 1.3[z0,z1];
z7 = z6 reflectedabout(z1,z1-z3);
drawarrow z0--z5; draw z5--z6; drawarrow z1--z7;
% define, draw and label the angle marks
path m[];
m2 = mark(z0,origin,z1,18); draw m2 dashed evenly; label.llft(btex $\gamma$ etex, point .6 of m2);
m0 = mark(z0+z2,z0,z1,15) ; draw m0 dashed evenly; label.bot (btex $\alpha_0$ etex, point.5 of m0);
m1 = mark(z6,z1,z1+z3,15) ; draw m1 dashed evenly; label.rt (btex $\alpha_1=\alpha_0$ etex, point.5 of m1);
% add the equation
label.llft(btex $\theta_1 = \theta_0 + \gamma$ etex,point (t0+t1)/2 of C);
% and finally the dot labels, including the anonymous one for the origin
fill fullcircle scaled 3;
dotlabel.lft(btex $\theta_0$ etex,z0);
dotlabel.bot(btex $\theta_1$ etex,z1);
endfig;
end.
답변2
다음을 사용하여 만들 수 있습니다.http://www.geogebra.orgPGF/Tikz로 내보내기
다음은 첫 번째 예를 위해 Geogebra가 생성한 코드입니다. 웹 인터페이스를 사용하여 이를 수행하는 데 몇 백만 달러가 걸렸으며 저는 소프트웨어 전문가가 아닙니다.
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{qqwuqq}{rgb}{0,0.39,0}
\definecolor{ttzzqq}{rgb}{0.2,0.6,0}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-6.54,-11.98) rectangle (17.78,3.7);
\draw [shift={(0,0)},color=ttzzqq,fill=ttzzqq,fill opacity=0.1] (0,0) -- (167.74:0.6) arc (167.74:275.22:0.6) -- cycle;
\draw [shift={(-65.42,14.21)},color=qqwuqq,fill=qqwuqq,fill opacity=0.1] (0,0) -- (-102.26:0.6) arc (-102.26:-48.52:0.6) -- cycle;
\draw [shift={(4.36,-47.67)},color=qqwuqq,fill=qqwuqq,fill opacity=0.1] (0,0) -- (-48.52:0.6) arc (-48.52:5.22:0.6) -- cycle;
\draw(0,0) circle (3cm);
\draw [dash pattern=on 2pt off 2pt] (-2.93,0.64)-- (0,0);
\draw [dash pattern=on 2pt off 2pt] (0,0)-- (0.27,-2.99);
\draw [->] (0.27,-2.99) -- (1.16,-2.26);
\draw (-3.5,0.98) node[anchor=north west] {$θ_0$};
\draw (-2.93,0.64)-- (0.27,-2.99);
\draw (-1.26,-1.25) -- (-1.43,-1.26);
\draw (-1.26,-1.25) -- (-1.23,-1.09);
\draw (3.76,-2.67)-- (-2.56,-3.25);
\draw (-2.34,3.36)-- (-3.55,-2.23);
\draw (-2.93,0.64)-- (1.71,-4.61);
\begin{scriptsize}
\draw[color=ttzzqq] (0.16,-0.18) node {$\gamma$};
\draw[color=qqwuqq] (-2.4,0.34) node {$\alpha_1$};
\draw[color=qqwuqq] (0.92,-3.06) node {$\alpha$};
\end{scriptsize}
\end{tikzpicture}
\end{document}