.png)
Estoy escribiendo un artículo sobre billar y me gustaría dibujar yo mismo las siguientes figuras. ¿Hay algún buen paquete que pueda renderizarlos?
He oído que asymptote
podría ser una buena opción, pero no estoy familiarizado en absoluto con cómo dibujar cosas allí.
Respuesta1
Metapost también es bueno para este tipo de diagrama. Aquí hay una versión del diagrama de la izquierda que muestra cómo hacer marcas de tangentes y ángulos de manera ordenada.
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.
Respuesta2
Puedes crear usandohttp://www.geogebra.orgy exportar a PGF/Tikz
Aquí está el código generado por Geogebra para su primer ejemplo, me tomó un par de minutos hacerlo con la interfaz web y no soy un especialista en el software.
\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}