to geomland.pointon :x :y
if not (number? :y)
[ error "'Invalid type of geometric value in pointon' ]
if circle? :x
[ output :x.center + (point :x.radius 0) ° :y ]
if (segment? :x) or (line? :x) or (ray? :x)
[ output :x.initial + :y * (normalize :x.final-:x.initial) ]
if ellipse? :x
[ output :x.center + (point :x.radiusx * (cos :y) :x.radiusy * (sin :y)) ° :x.spin ]
if hyperbola? :x
[ output :x.center + (point :x.radiusy / (cos :y) :x.radiusx * (tan :y)) ° (90+:x.spin) ]
if parabola? :x
[ output :x.center + (point :y*:y :x.radius*:y) ° :x.spin ]
if angle? :x
[ output :x.center + (point :x.radius 0) ° (:x.range.fromangle - :y) ]
error "'Invalid type of geometric value in pointon'
end
|