rem EQ_PLPT.CDL rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem Equation of Plane with the same distance from 2 points clear defopt = 2 array mtx[9] acc = 0.00001 :start getpos "Indicate First Point",defopt on (@key + 3) goto exit, start, start, defopt=@key wx1 = @xworld wy1 = @yworld wz1 = @zworld :second getpos "Indicate Second Point",defopt on (@key + 3) goto exit, start, second, defopt=@key wx2 = @xworld wy2 = @yworld wz2 = @zworld f = wx2 - wx1 g = wy2 - wy1 h = wz2 - wz1 ref = f * f + g * g + h * h if (ref>acc) goto next pause "Selection Is Not Correct (Press Return)" goto start :next wxc = (wx2 + wx1) / 2 wyc = (wy2 + wy1) / 2 wzc = (wz2 + wz1) / 2 a = f b = g c = h d = - ( a * wxc + b * wyc + c * wzc ) pause " (%.5f) x + (%.5f) y + (%.5f) z + (%.5f) = 0", a, b ,c, d redraw :exit clear