drawing ellipses
From
EllisMorgan@ellis@ellis.invalid to
comp.lang.apl on Sat Jul 11 15:39:06 2026
From Newsgroup: comp.lang.apl
This subject came up in a recent discussion so I am posting a copy of
what was posted here on 2009. It helped me then, belayed thanks Joakim. HOW_ELLIPSE;ellipse
riY this is the original function from Joakim (published in CLA in 2009)
ellipseraE{
pos rot start end scale nsegsraEri|
thetaraEstart+0,+\nsegsri|(start-end)|+nsegs
sinraE1reyrui
cosraE2reyrui
xraEcos theta
yraEsin theta
rotmatraE{2 2ri|(cos ri|)(-sin ri|)(sin ri|)(cos ri|)}rot
scalematraE2 2ri|(1reascale)0 0(2reascale)
xformraE0 0 1,[1]ri?(rotmat+.|uscalemat),pos
vraExform+.|u1,[1]ri?x,[0.5]y
rie->1 0raov
}
--- Synchronet 3.22a-Linux NewsLink 1.2