Drawj2d Wiki
Draw vector graphics to scale using a descriptive language
Brought to you by:
qwert2003
Example taken from asymptote gallery.
# drawj2d -T svg -c -W120 -H60 ExampleUnitcircle.hcl
unitlength [/ 1. 40.] m
set O {0 0}
set r 1
set ϑ -30
set R [geom.polar 0]
set P [geom.polar $ϑ]
m $O
pen lightgray
fillsector $r $ϑ 0
pen black 0.3
circle $r
line $R $O $P
dot $O
dot $R
tlb "([nf [X $R] 0], [nf [Y $R] 0])" E
dot $P
tlb {(x,y)=(\cosϑ,\sinϑ)}; #{(x,y) = (cosϑ, sinϑ)}
texdimangle $O $P $R ϑ
m [geom.polar [/ $ϑ 2.]]
mr [mm 10 0]
arrowto [tx $R]
mr [mm 10 0]
texlabel {\rm{area} \frac{ϑ}{2}} E