rem PT_GRV3.CDL rem Copy Right by International Technology Transfer Corp. rem revision 1.0 7/30/99 rem Calculate the center of gravity clear defopt = 2 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 :third getpos "Indicate Third Point",defopt on (@key + 3) goto exit, second, third, defopt=@key wx3 = @xworld wy3 = @yworld wz3 = @zworld x = (wx1 + wx2 + wx3) / 3 y = (wy1 + wy2 + wy3) / 3 z = (wz1 + wz2 + wz3) / 3 point x, y, z redraw goto start :exit