pointonP

Help Contents geomland pointon functions pointonP
pointon Labels

pointonP
geomland.pointon? :x :y

Test coincidence between a point and a geometric value

Definition:

to geomland.pointon? :x :y

	if not (point? :x) 
	[ error "'Invalid type of geometric value in pointon?' ]

	if point? :y
	[ output (:x.x=:y.x) and (:x.y=:y.y) ]

	if circle? :y
	[ output  :y.radius = (distance :x center :y) ] 

	if (line? :y) or (ray? :y) or (segment? :y)
	[ output  (:x.x-:y.initial.x) * (dy :y) = (:x.y-:y.initial.y) * (dx :y) ]

	error "'Invalid type of geometric value in pointon?'
end

pointon#geomland.pointon# :x :y

Calculates numerical representation of a position of a point along a geometric value

Definition:

to geomland.pointon# :x :y
	if not (point? :x) 
	[ error "'Invalid type of geometric value in pointon#' ]

	if circle? :y
	[ output 360-(angle3 :x :y.center point :y.center.x+1 :y.center.y) ]

	if (line? :y) or (ray? :y) or (segment? :y)
	[ 
		if (abs dx :y) > (abs dy :y)
		[ output (:x.x-:y.initial.x) / (dx :y) ]
		[ output (:x.y-:y.initial.y) / (dy :y) ]
	]

	error "'Invalid type of geometric value in pointon#'
end

pointon Labels