!****h* Main/PointCloud ! NAME ! Point-Cloud -- Reads points stored in NGB-offsets-full.txt and ! plots them in VARKON [PointCloud.MBS] ! DESCRIPTION ! The steps followed are: ! * Declare a 35x2x11array (named 'Pt') to hold 3D coordinate of ! all the measured points from the 'Durant' Adirondack Guide Boat ! book. Measurements were taken by John Gardner in 1964. Data is ! in the public domain. ! * Open the 'NGB-final-offsets.txt' file for reading. ! * Loop through the text file and store the coordinates in the ! 'Pt' array. ! * Plot 3D points ('poi_free') ! ! The 'start' and 'end' values passed to this module limit ! the range of stations (between 0 and 34) which are displayed. ! ! Note: Change file location in the first line of the source code ! if the data file is relocated. ! ! SOURCE GLOBAL GEOMETRY MODULE PointCloud( INT start, ! Begining station to display (must be 0 to 34) end); ! Ending station to display (must be 0 to 34 & > start) !*** ! ! Copyright 2006, John J. Hughes ! ! This source code file is part of the 'NGBproject' files which ! execute interactively under the 'VARKON' program, which is ! distributed under the terms of the GNU General Public License. ! ! The 'NGBproject' files are also distributed under the terms of ! the GNU GeneralPublic License. See the GNU General Public License n ! included ithe file name "COPYING.txt" in the Varkon ./app/NGB/doc ! directory for more details. ! INT side,station,node; FLOAT pt_x,pt_y,pt_z; VECTOR pt(0:1,0:34,0:11); FILE f; STRING WorkDir*60; BEGINMODULE open(f,"r","/home/jjh/Desktop/Projects/NGB/Varkon-NGB/app/NGB/NGB-final-offsets.txt"); side:=0; FOR station:=0 to 34 DO FOR node:=0 to 10 DO pt_x:=inflt(f); pt_y:=inflt(f); pt_z:=inflt(f); pt(side,station,node):=vec(pt_x,pt_y,pt_z); ENDFOR; ENDFOR; side:=1; FOR station:=1 to 33 DO FOR node:=0 to 10 DO pt_x:=inflt(f); pt_y:=inflt(f); pt_z:=inflt(f); pt(side,station,node):=vec(pt_x,pt_y,pt_z); ENDFOR; ENDFOR; close(f); side:=0; FOR station:=0 to 34 DO FOR node:=0 to 10 DO IF station>=start AND station=start AND station