COMPUTER ILLUSTRATION OF NANNOFOSSILS
Jeremy R. Young, Geology Dept., Imperial College, London SW7 2BP.
1. INTRODUCTION
At the London INA meeting, a number of people expressed interest in thecomputer programs I demonstrated, for drawing coccoliths and discoasters,in two dimensions. Since these were written on a BBC micro in BBC BASIC
the actual programs cannot be directly used on many computers, but theunderlying principles are reasonably simple.
The following notes areintended to help others use the same technique. Inevitably they will seemtrivial to some workers, but I would have found the discussion useful when
I started programming, and hopefully others will do.
My primary reason for writing the programs was to use the computer as atechnical drawing tool; to remove some of the labour involved in producing
complex geometrical figures.
In addition, computer drawings have theconsiderable advantage that, like word-processed text, they can readily bealtered and reused. Finally, for the more asymmetric forms of ellipticalcoccoliths, the rather indirect technique of computer illustration required
development of a model for coccolith geometry; and provided a means ~ftesting the predictions of this model.
2. BASIC TECHNIQUE, AND ILLUSTRATION OF DISCOASTERS.
Computer graphics work primarily by cartesian co-ordinates, dividing
the screen into several thousand pixels. These pixels are illuminated or
not according to the values held in a corresponding area of screen memory.
This screen memory can also be readily saved on disc, or dumped to aprinter, to produce hard copy of the screen display. There are two basic
types of technique for producing computer graphics: The first is fromwithin languages, such as BASIC, using simple graphics commands (such asDRAW), working directly with the cartesian co-ordinate system. The second
technique is to use specialist graphics packages, which allow more directinteraction between the user and the graphics, with the aid of mice, cursorcontrols, or whatever. I have used the former technique since it is moresuitable for handling geometrical and symmetrical figures.
Drawingnannofossils,
such as dlscoasters, with perfect radial symmetry isparticularly easy. Irregular forms, such as ceratoliths, are unsuitablefor illustration by this technique.
The problem of drawing discoasters consists of two main parts defining the shape of a single ray, and symmetrically reproducing it asrequired.
The shape of the ray needs to be defined in terms of theco-ordinates of a series of points around its edge. I did this by the mostrudimentary digitising technique available, drawing the ray on graph paper,and using the resultant points as data statements at the end of theprogram.
Alternatives would be to use a digitising tablet; or to write aseparate program to interactively design the shape on the screen.
Given the co-ordinates of a set of points itisasimple
trigonometrical problem to reproduce these points in other orientations, atdifferent scales, etc. Some graphics systems include commands to do this,but writing the program directly is more flexible. The main equations arethose for rotating a point (X,Y) about the origin through an angle (a), toa new position (X', Y'):X'= Xf-COSa + YfSINa & V'= XfSINa + YfCOSa •INA Newsletter vol.9- 1987116

The listing shows how these elements can be combined into a shortprogram.
This is written in BBC BASIC, but since it contains few obscurecommands it could easily be converted into other versions of BASIC, or
another language.
It is a convenient start point for experimenting with,and can be used for any radially symmetrical forms.
3. COCCOLITH DRAWING PROGRAM
Circular coccoliths can be drawn in a similar way to discoasters, but
ellipticalcoccoliths
have a greatly reduced symmetry and a more
specialised program is needed. For this a set of assumptions, or model, ofcoccolith geometry is needed. I used the following assumptions; theirjustification, and implications, are discussed in detail elsewhere (YOUNG
1987, and in prep.).
1. All rays are similar in size and shape - although to compensate forthe ellipticity they overlap, or grow sideways, to differing extents. Thisis based mainly on observations of electron micrographs of coccoliths, inparticular rim width, and so element length can be shown to be constant.
2. The rays grow from an initial ellipse, or proto-coccolith ring, near
the inner margin of the coccolith rim. This is based on the sequence ofcoccolith development documented in studies of coccolithogenesis.
3. The rays are evenly spaced around this initial ellipse.
4. The rays radiate from this initial ellipse at a constant angle, tothe local tangent to the ellipse.
The last two assumptions, and the use of a true ellipse for theproto-coccolith ring, are convenient assumptions based on examination ofelectron micrographs, but are not rigorously proven.
Converting these into a program involved a straightforward, but rathercomplex, development of the approach used in the discoaster drawing
program.
I defined the shape of individual rays in the same way as forthediscoasters.
In addition theellipticity and radius of the
proto-coccolith ring, the ray spacing, ray angle, and ray scale, need to bespecified for each drawing. One of the advantages of the technique is thateach of these parameters can be altered independently; and so therelationship between them and the final coccolith form can be explored.
Additional routines were needed to determine, the origin positions, andangles, of each ray (using Assumptions 2-4). Also, to compensate for theoverlap of rays, further routines were necessary; in order not to draw theportions of rays covered by adjacent rays (ie to vary the width of therays). This was done by testing each pixel between the start and end
positions of relevant lines, until the edge of the preceding ray was found.
This position was then taken as the end of the line.
This program is too long to list conveniently, and would requireconsiderable modification to convert from BBC BASIC.
An experienced
programmer should, however, be able to write a similar program reasonably
easily from, the assumptions above.
REFERENCESYOUNG J.R. 1987: Neogene nannofossils from the Makran of Pakistan and theIndian Ocean. Unpubl. PhD thesis, University of London.
YOUNG J.R. in· prep: Heterococcolith structure and development. For, CRUX
J.A. & van HECK S.E. (Eds.), Procs. INA Con£., London 1987.

.

INA Newsletter vol.9- 19B7117

DISCOASTER DRAWING PROGRAM: LINE NOTES'(See listing on next page)
10-40. PRELI"INARIES
20. Asks if print out is wanted. If so diagra1 needs to be stretched slightly to co1pensate for thedistortion produced by the printer.
30,40. Clears the screen; sets graphics 1ode; sets up array co-ords for DATA; and draws border.
60-210. "AIN PR06RA" LOOP, repeated for each of the three sub-diagrals (distal, proxiaal and side views).
70. READ fro• DATA: the origin <OX%, OYI>; scale; orientation (angl; nu1ber of rays <RI>; and na1e (Jatell,of sub-diagral. Set graphics origin for sub-diagraa.
80-190. Sub-loop drawing each feature of sub-diagraa, (e.g. ray outlines, or central boss),
90. READ fro1 DATA the nuaber of steps (S%l, and PLOT aode <Kil, of feature.
100-120. READ co-ordinates of each step fro1 DATA ·into array (co-ordsl. N.B. contrail is priaarily aseparator in the data stateaents (usually £).
130-180. Plotting loop, repeated for each ray; a is the angle of the r~y.
140. "ove <PLOT aode 4l to beginning of feature.
150. Draw first half-ray of feature.
170-180. Draw second half-ray of feature (oaitted for asyaaetrical ray features),230. Print screen, if required.
250-270. Procedure PROCdr: Called fro1 the progra1 1 for drawing froa current point to the next. The
co-ordinates of the new point are talculated for the current ray angle (al, fro• the co-ordinates for theequivalent point on the first ray <p,ql. This uses the general equation for rotation of cartesianco-ordinates. A line is then drawn fro1 the current point to the new point, in PLOT aode K% (53 dottedline, 5 solid line, 4 no line).
290-390. DATA
290. Basic DATA for first sub-diagraa <READ by line 70).
300. DATA for first feature of sub-diagraa <READ by lines 90 and 110). The first two figures are the nuaberof points (Sll and the PLOT 1ode <Kil. Subsequent numbers are the x and y co-ordinates of each point,
separated by the filler contrail.
cottroll is also used to note what each data set draws, and toindicate the end of sub-diagraas <STOP>, and of the entire diagraa <EHD>.

EXAMPLE FROM COCCOLITH PROGRAMINA Newsletter vol.9- 1987
118

10 REK DISCOASTER DRAWING PROGRAM
20 INPUT printS: IF printS='Y' THEN dist=1.193 ELSE dist=1
30 KODE12B: DIKco_ords!25,2)
40 PLOT5,5,5: PLOT5 151 1010: PLOT5,1274 1 1010: PLOT5,1274,5: PLOT5 1515
50 :60 REPEAT
70
READ DXI,DYI,scale,ang,RI,na•eS: VDU29,DXI;DYX;BO
REPEAT
90
READ SI,KX
100
FOR step = I TO S%
110
READ co_ords(step 1 1), co_ords(step 1 2), controlS
120
NEXT step
FOR a=2•PI/RI+RAD!ang) TO 2tPI+RAD!ang) STEP 2tPI/RX
130
140
N=KX: K7.=4: PROCdraw(co_ords<l,ll,co_ords(1,2)): KX=N:
150
FOR T%=1 TO Sl: PROCdraw<co_ords<TX,1>,co_ords(Tl,2)): NEXT Tl
IF controiS='ASYK' GOTOI90
160
N=K%: K%=4: PROCdrau(-co_ords(S%,1),co_ords(SX,2)):KX=N
170
180
FOR TX=S7. TO 1 STEP -1: PROCdraw(-co_ords(Tl,ll,co_ords(TX,2)): NEXT T%
190
NEXT a
UNTIL controlS='STOP' OR controlS='END'
200
210 UNTIL controlS~'END'
220
230 VDU26: IF printS='Y' THEN •RUN SCREENDUKP240 END
250 DEFPROCdraw<p,q)
260 PLOT KX, scalet(pt-COSa+qtSINa>, scaletdistl(ptSINa+qtCOSa>
270 ENDPROC
280 REK Date to draw Discoaster bollii
290 DATA 600,50,2.5,0,1, SIDE VIEW
300 DATA 5,5,12,50,distal boss,11,64,t,l4,72,t,10,BO,t,0,7B,l
310 DATA 3,53,63 1 33,prox ridges,26,28,£,22,16,t
320 DATA 10,5,0,50,1ain rays,50.,50,£,65 145,l,120,42,t,I20,3B,£,63,33,£ 152,23 1l,22,16,t,12,7,t,0,7,STOP
330 DATA 960,600,2.5,0,6, PROXIMAL VIEW
340 DATA 2,5,6,11,prox boss,0,19,£,3,53 1 11 19,£,3,30,l,3,60,t
350 DATA 10,5,23,40,body,l7,43,£,11,52,t,6,70,t,5,100,t,12;t10 1 t,l4,120,t,l1,120,£,5,113,t,0,111,STOP
360 DATA 320 1600 1 2.5,0,6, DISTAL VIEW
370 DATA3,5,13,22,distal boss,10 1 22,t,0,14,t
380 DATA 2,53,23,40,sutures,I3,22,ASYK
390 DATA 10,5,23,40,body 1 17,43,t,11 152,£,6,70,t,5,100,t,12,110,t,l4,120 1 t,11,120,t,5,113,£,0,111,END

INA Newsletter vol.9 - 1987

119