rem L_PTPL.CDL rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem Line perpendicular to Plane clear defopt = 2 dspflg = 1 :start getpos "Indicate Point",defopt on (@key + 3) goto exit, start, start, defopt = @key x0 = @xworld y0 = @yworld z0 = @zworld getplane "Select Plane", dspflg on (@key + 3) goto exit, start, , a = @fltdat[10] b = @fltdat[11] c = @fltdat[12] d = @fltdat[13] bunbo = sqrt(a * a + b * b + c * c) f = a / bunbo g = b / bunbo h = c / bunbo x = x0 - f * (a * x0 + b * y0 + c * z0 + d) / bunbo y = y0 - g * (a * x0 + b * y0 + c * z0 + d) / bunbo z = z0 - h * (a * x0 + b * y0 + c * z0 + d) / bunbo line x0, y0, z0, x, y, z redraw goto start :exit