Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ OverviewNo.1No.2No.3No.4No.5No.6No.7No.8No.9No.10No.11No.12No.13No.14No.15No.16No.17No.18No.19No.20No.21No.22No.23No.24No.25No.26No.27No.28No.29No.30No.31No.33No.34
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

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

Overview
No.1
No.2
No.3
No.4
No.5
No.6
No.7
No.8
No.9
No.10
No.11
No.12
No.13
No.14
No.15
No.16
No.17
No.18
No.19
No.20
No.21
No.22
No.23
No.24
No.25
No.26
No.27
No.28
No.29
No.30
No.31
No.33
No.34

SPROGS Note No 18: Implementation of THICK and WHILE

R E Thomas

15 March 1973

Introduction

This is the result of discussions held on 14 March 197J on possible methods of implementing the routines THICK and WHILE. Some of the ideas expressed here have already been mentioned in earlier notes.

THICK

Thickening of a line is brought about by inserting extra lines, one raster unit apart, on either side of the given line. The current proposed method of implementing this involves determining what increment in the current region will give a unit increment in the base region, and using this increment to generate a series of lines parallel to the given line, all of which will be sent down the region chain. Since it is possible to have more than one base region, the first base region encountered is used to calculate the required increment.

This method suffers from the fact that the extra lines are inserted at the highest region level, thus making the work of converting thick lines much more arduous. Also it is impossible to take advantage of any hardware thick feature on an output device. The reason it is adopted is that scissoring produced in the region chain may cut off some of the extra thickening lines, and this cutting can only be calculated by following the chain.

However, it could be nice to allow the delay to thickening in the event that the user does not care about possible scissoring. This delayed thickness should be much faster. It would still be necessary to perform the base region scissoring (if hardware thickness is not used) in case the thickened lines go outside the hardware frame. It is therefore proposed that an extra display routine give the option of specifying when thickening is to occur.

It was suggested that an alternative approach to the whole subject of region chains, thickness etc could be used to delay scissoring effects till the base region is met. Lines would then be passed down a region chain to be expanded and rotated only, together with tags to label in which region they were generated. Finally, these tags could be used to specify which lines were 'in front' of others and a hidden line removal algorithm employed for scissoring. This radical change in philosophy is documented here for later discussion, but no immediate change to SPROGS is envisaged.

WHILE

As has been stated in earlier notes, the second argument of this routine (which specifies the condition) will be in the form of two text letters, eg 'LE', 'EQ' etc. This decision, which aids readability at the expense of generality, may be altered later. The condition itself will be stored in file in real number form.

As it is impossible to read backwards through a file, a pointer will be kept so that the WHILE condition can be re-read. This pointer must be preserved on the file stack, since other files called may also contain WHILE.

The problem of nested WHILEs as also discussed. This can occur when BEGINS, ENDS brackets are used. A number of solutions were suggested.

1. Do not allow nesting. This could be somewhat restrictive, but, as the file can be re-written to DRAW another file containing the subsequent WHILE, the problem can be overcome.

2. Consider BEGINS, ENDS as defining a local file (nameless) which is DRAWn at that point. The preprocessor could remove such local files and create true files, replacing BEGINS, ENDS by DRAW, and putting the code, together with STDF, FIDF at the top of the program.

3. Continuing the idea of BEGINS, ENDS as a local nameless file, create an entry in the file stack for BEGINS and release this block when ENDS is encountered. The WHILE pointers would be saved in this way and subsequent WHILEs treated as in DRAW. No other variables from the stack ill be restored, however.

This last method will be the one initially adopted. However, care must be taken over the use of local variables in the file. The nameless file will need to access the local variables defined in the parent file, unlike a normal file called by DRAW. An entry on the variable stack must also occur therefore, in which entries must be made as if the new nameless file had declared, as arguments, all the current local names, and all argument values had been passed across.

If the user calls LOCAL or LOCARG inside a BEGINS, ENDS nameless file the variables so defined will be local to the nameless file only, and will remain unknown to the parent file.

⇑ 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