Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ OverviewNo.1No.2No.3No.5No.6No.7No.8No.9No.10
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureProgress ReportsGraphics User Notes
ACLLiteratureProgress ReportsGraphics User Notes
ACL ACD C&A INF CCD CISD Archives
Further reading

Overview
No.1
No.2
No.3
No.5
No.6
No.7
No.8
No.9
No.10

Graphics User Note No 3: Displaying Complex Three-Dimensional Objects

F R A Hopgood, D C Sutcliffe, M F Chiu

28 April 1976

3.1 INTRODUCTION

The package for drawing three-dimensional objects, which was described in FR80 User Note 10, has been added to the Graphics Algorithms Library. FR8O User Note 10 should be consulted before the package is used but a brief description of the package is given here, together with some notes on its use. (The macro call for running programs using the package on the 1906A should be changed slightly and the package is now available on the 360/195.)

Input consists of concave and convex polygons. However, a number of high-level routines can shield the user from the details of how objects are defined. These enable. the user to define a surface in several different ways, translate it, rotate it and display it. For the more experienced user, there are a number of intermediate-level routines which provide more flexibility in defining objects. These enable information about the objects to be passed to the system one polygon at a time.

Output can be either line drawings, shaded raster lines or three-dimensional contour plots.

The package was produced by Michael J Archuleta of the Lawrence Livermore Laboratory and is a development of the work of Gary Watkins at the University of Utah. The low-level routines have been rewritten so that the package sits on top of either SMOG or SPROGS. The current version is an interim release which will be enhanced and made more efficient if the frequency of use demands it.

The Watkins algorithm accepts as input convex or concave polygons whose coordinates are defined in a left-handed coordinate system. Polygon clipping is performed to a frustum of vision that opens out along the positive Z axis. The algorithm assumes that the eyepoint is located at the origin of the system. All 3-dimensional polygons are projected onto a 2-dimensional plane. The projection plane is divided into horizontal raster-lines and the algorithm computes the visibility of the polygons a raster-line at a time. A segment (the portion of the raster-line which intersects the polygon) is sorted and compared with other segments to see which are visible.

One drawback of the Watkins' algorithm is that adjacent polygons had to store the shared edge twice. Archuleta has modified the algorithm to allow shared edges to be defined. It is possible to choose whether or not to display shared edges. This is useful when contour plots are required as it stops the confusion between edges and contour lines.

3.2 NOTES ON USE ON THE 1906A

These notes should be used instead of Section 6 in FR8O User Note 10.

(1) The package can be used with either SMOG or SPROGS.

(2) The package does not set up its own coordinate system. The user should set up his own first.

(3) The package is accessible from the 1906A library file :GRAFLIB.GRAFLIB and this name must be included in a LIB parameter in a macro call. For example, if one of the examples in FR80 User Note 10 were in a file ARCHTEST then the following SMOG call could be used to run it on the 1906A:

SMOG *CR ARCHTEST,LIB :GRAFLIB.GRAFLIB,TI60,JT70 

(4) The package is quite slow in execution and will take of the order of 10 seconds to process a picture of 200 polygons. The exact time depends quite critically on the form of the picture and how many surfaces hide others.

(5) To keep running times down in the development stage, users are recommended to lower the resolution of the scanning and only use a resolution of 512 or greater when the picture is fully debugged.

(6) The package uses the following names which should be avoided by the user:

Routine names: 
    CDISP,CINIT,CINTER,CLIP,CLIP3D,CONSHO,CSCAL,CTRAN,CXROT,CYROT, 
    CZROT,DRAWIT,EDGMAK,ERRMSG,ERRSUR,ESURFD,ESURFI,FACMAK,FSURFD, 
    FSURFI,GETGLK,GETVAR,GSURFD,GSURFI,HIDDEN,INFREE,INTCLP,LINSHO, 
    LSTSET,PACKER,PATCHD,PATCHI,POLCLP,POLDIR,POLMAK,POLSMO,POLSNP, 
    RETBLK,RSURFD,RSURFI,SHOW,SRL,SURF,UNPACK,WEBD,WEBI 
    
COMMON block names: 
    BUCKY,CLIBOP,CLIP2,CLIP3,COMNIO,CONLEV,CORE,EDGARG,EDGBLK, 
    EYES,FACEFG,FREE,INTENS,LINOUT,LIN3IN,MAXMUM,PGNCNT,POLDAT, 
    QFORIO,QQQMAT,SEGPTR,SEYES,SHOWER,SNPDAT,YSCLIN,ZFIXER,ZRANGE 

3.3 NOTES ON USE ON THE 360/195

As implemented on the 360/195, the package may be used in much the same way as described for the 1906A. There are, however, a number of important exceptions.

(1) The array IFREE in COMMON/FREE/ is one-dimensional viz

 
      COMMON/FREE/IFREE(iG) 

where i is the same parameter as that described in section 2.2 of FR80 User Note 10.

(2) The name of COMMON/CORE/ is COMMON/KORE/ on the 360 to avoid clashing with the RL library routine CORE which is invoked by many RL routines.

(3) Because the Archuleta package relies on pre-zeroed core in many places, a block data statement zeroing all the package COMMON blocks except /FREE/ is included and attached to the routine HIDDEN.

In this block data statement it is assumed that the maximum size of arrays CLEVEL in COMMON/CONLEV/ and IB in COMMON/BUCKY are 30 and 512 respectively.

Attempts to exceed these sizes will, therefore, cause a linkage-editor error.

(4) The 1906A versions of the packing and unpacking routines require 11 or 13 words of COMMON/FREE/ storage per edge (44 to 52 words per square of the grid to be plotted). On the 360 this information has been packed into 4 or 5 words per edge (16 to 20 words per square). However, additional storage is also required in /FREE/ to hold information relevant to the current projection of the object being viewed. The amount of storage depends on the complexity of the object and how much of it is visible from the viewing point, so for an N×N grid the user should look on 16N2 words of /FREE/ as a lower limit and allow space accordingly.

The Archuleta routines on the 360/195 are stored on disk as members of the catalogued data set SYS1.SMOG and so the ordinary JCL for running a SMOG job should be used to run the examples in FR80 User Note 10.

(Note that the MASTER statement is 1906A specific and irrelevant on the 360/195.)

3.4 ERRATA TO EXAMPLES IN FR8O USER NOTE 10

The following corrections should be made to the example programs in FR80 User Note 10.

Page 16     Line 20 of program should read: 
      DO 1 J=1,IO 
Page 18     Line 23 of program should read:
      CALL CSURFD(X,1,16,1,Y,1,16,1,Z,16,1,90.)
      
Page 24     Line 17 of program should read:
      CALL LIMITS(-10.,-10.,512.,512.,1.,1.)
Page 26     Line 1 of program should start in column 7.

Note that in all the examples the MASTER statement is 1906A specific and irrelevant to the 360/195.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site