rem D_2Pt.cdl rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem Dintance between 2 points clear defopt = 2 :start getpos "Indicate 1st Point",defopt on (@key + 3) goto exit,start, defopt = @key wx1 = @xworld wy1 = @yworld wz1 = @zworld vx1 = @xview vy1 = @yview vz1 = @zview :second getpos "Indicate 2nd Point",defopt on (@key + 3) goto exit, start, second, defopt = @key wx2 = @xworld wy2 = @yworld wz2 = @zworld vx2 = @xview vy2 = @yview vz2 = @zview rem Actual Distance wdist = sqrt((wx1 - wx2) * (wx1 - wx2) + (wy1 - wy2) * (wy1 - wy2) + (wz1 - wz2) * (wz1 - wz2)) rem View Distance vdist = sqrt((vx1 - vx2) * (vx1 - vx2) + (vy1 - vy2) * (vy1 - vy2)) rem mode draw line wx1, wy1, wz1, wx2, wy2, wz2, 15, ,2 mode normal pause "Actual Distance = %.3f View Distance = %.3f",wdist,vdist redraw goto start :exit