;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;                                             ;;;;;;;;
;;;;;;;;  Example Shape #11 - IFDIST used to reduce  ;;;;;;;;
;;;;;;;;  the detail and consequent render time.     ;;;;;;;;
;;;;;;;;                                             ;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

	SHAPE 10000

;;;;;;;;;;vertex list;;;;;;;;;;;;;;;;;;;;;;;

	VERTEX 1,-100,-25,0
	VERTEX 2,100,-25,0
	VERTEX 3,100,25,0
	VERTEX 4,-100,25,0

	VERTEX 11,-72,-15,0
	VERTEX 12,-60,-15,0
	VERTEX 13,-48,-15,0
	VERTEX 14,-36,-15,0
	VERTEX 15,-24,-15,0
	VERTEX 16,-12,-15,0
	VERTEX 17,-00,-15,0
	VERTEX 18,-00,+15,0
	VERTEX 19,-12,+15,0
	VERTEX 20,-24,+15,0
	VERTEX 21,-36,+15,0
	VERTEX 22,-48,+15,0
	VERTEX 23,-60,+15,0
	VERTEX 24,-72,+15,0

	VERTEX 25,-66,-05,0
	VERTEX 26,-60,-05,0
	VERTEX 27,-72,+05,0
	VERTEX 28,-66,+05,0

	VERTEX 29,-54,-05,0
	VERTEX 30,-54,+05,0
	VERTEX 31,-54,+01,0
	VERTEX 32,-48,+01,0

	VERTEX 33,-42,-05,0
	VERTEX 34,-42,+05,0

	VERTEX 35,-30,-09,0
	VERTEX 36,-30,-05,0
	VERTEX 37,-30,+05,0
	VERTEX 38,-30,+15,0
	VERTEX 39,-26,+01,0
	VERTEX 40,-24,+01,0

	VERTEX 41,-18,-05,0
	VERTEX 42,-18,+05,0
	VERTEX 43,-18,+01,0
	VERTEX 44,-12,+01,0

	VERTEX 45,-06,-15,0
	VERTEX 46,-06,-05,0
	VERTEX 47,-06,+05,0
	VERTEX 48,-06,+15,0

;;;;;;;;;;facet list;;;;;;;;;;;;;;;;;;;;;;;;

	DRWPOLY 140,4,3,2,1		;These two lines simply draw the front and
	DRWPOLY 130,1,2,3,4		;back of the sign board.

	IFDIST > 600 GOTO far	;This line checks if the object is more than
				;600 UNITS away, jumping to the label "FAR"
				;if satisfied.

	IFVIS 2,1,4 GOTO notext	;This line checks if the front is NOT visible
				;(by checking if the back IS visible) and 
				;skips drawing the "SCORCH" text lines below  
				;if satisfied.

;VERTICES 11 TO 48 COULD BE PLACED HERE TO FURTHER SPEED RENDER TIME.
;At the moment, vertices 11-48 are always being compiled on each pass through the 
;shape. When the front panel is not visible, the vertices are unrequired and 
;consequently taking up render time for no reason. The IFVIS check above ignores
;all the following lines until the label NOFRONT, and that includes recompiling
;any vertices found here too.

	DRWPOLY 16,11,17,18,24	;These lines draw the simple but effective
	DRWLINE 47,11,17		;"SCORCH" text seen on the front of the panel.
	DRWLINE 47,24,18		;They are ignored completely if the back is 
	DRWLINE 47,11,24		;visible or the shape is more than 600 UNITS
	DRWLINE 47,12,23		;away. This obviously speeds up render time
	DRWLINE 47,13,22		;as no work is being done unnecessarily.
	DRWLINE 47,14,21		;
	DRWLINE 47,15,20		;
	DRWLINE 47,16,19		;
	DRWLINE 47,17,18		;
	DRWLINE 47,25,26		;
	DRWLINE 47,27,28		;
	DRWLINE 47,29,30		;
	DRWLINE 47,31,32		;
	DRWLINE 47,33,34		;
	DRWLINE 47,35,36		;
	DRWLINE 47,37,38		;
	DRWLINE 47,39,40		;
	DRWLINE 47,41,42		;
	DRWLINE 47,43,44		;
	DRWLINE 47,45,46		;
	DRWLINE 47,47,48		;

notext:
	RETURN

far:	DRWPOLY 47,11,17,18,24	;This line is only called when the shape is
				;more than 600 UNITS away. It simply draws a 
				;flat facet in place of the "SCORCH" text.
	RETURN
	END

