;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;                                             ;;;;;;;;
;;;;;;;;  Example Shape #6 - Parts of the shape are  ;;;;;;;;
;;;;;;;;  "skipped" when not visible using IFVIS to  ;;;;;;;;
;;;;;;;;  check the reverse of "theoretical" facets  ;;;;;;;;
;;;;;;;;                                             ;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

	SHAPE 10000

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

	VERTEX 01,00,-120,-20
	VERTEX 02,114,-36,-20
	VERTEX 03,70,98,-20
	VERTEX 04,-70,98,-20
	VERTEX 05,-114,-36,-20
	VERTEX 06,28,-36,-20
	VERTEX 07,44,16,-20
	VERTEX 08,00,48,-20
	VERTEX 09,-44,16,-20
	VERTEX 10,-28,-36,-20

	VERTEX 11,00,-120,20
	VERTEX 12,114,-36,20
	VERTEX 13,70,98,20
	VERTEX 14,-70,98,20
	VERTEX 15,-114,-36,20
	VERTEX 16,28,-36,20
	VERTEX 17,44,16,20
	VERTEX 18,00,48,20
	VERTEX 19,-44,16,20
	VERTEX 20,-28,-36,20

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

	IFVIS 18,20,16 GOTO no_hole	;this one line checks if the cavity mouth is 
				;NOT visible by checking the reverse side of
				;the hole. If the check is TRUE then the hole
				;mouth is not visible and the following seven
				;DRWcommands are bypassed by the GOTO command.
				;Note how the three vertices used do not belong
				;to an actual facet but a THEORETICAL FACET
				;that defines the hole mouth.

	DRWPOLY 091,10,06,16,20	;these facets belong to the 
	DRWPOLY 090,06,07,17,16	;cavity in the back of the 
	DRWPOLY 088,07,08,18,17	;star.
	DRWPOLY 089,08,09,19,18	;
	DRWPOLY 090,09,10,20,19	;
	DRWPOLY 092,06,10,09	;
	DRWPOLY 092,08,07,06,09	;

no_hole:

	DRWPOLY 220,01,10,20,11	;these 10 facets make up the
	DRWPOLY 220,02,06,16,12	;outside edge of the star. The
	DRWPOLY 220,03,07,17,13	;same colour trick has been used
	DRWPOLY 220,04,08,18,14	;to avoid sorting as can be seen 
	DRWPOLY 220,05,09,19,15	;in EXAMPLE#03.
	DRWPOLY 218,10,05,15,20	;
	DRWPOLY 218,09,04,14,19	;
	DRWPOLY 218,08,03,13,18	;
	DRWPOLY 218,07,02,12,17	;
	DRWPOLY 218,06,01,11,16	;

	IFVIS 1,4,3 GOTO no_face	;this line checks if the star face is NOT visible
				;by checking its reverse side. Again, note that
				;the three vertices used in this check do not
				;belong to any one existing facet but cover the
				;largest area of the face being tested. It is wise
				;to check the largest surface area as this avoids
				;possible IFVIS errors arising from performing the
				;maths on very small areas.

	DRWPOLY 216,01,06,10	;these 7 facets make the front
	DRWPOLY 216,02,07,06	;face of the star 
	DRWPOLY 216,03,08,07	;
	DRWPOLY 216,04,09,08	;
	DRWPOLY 216,05,10,09	;
	DRWPOLY 216,09,10,06	;
	DRWPOLY 216,06,07,08,09	;

no_face:

	DRWPOLY 222,20,16,11	;these 5 facets make the back
	DRWPOLY 222,16,17,12	;face of the star 
	DRWPOLY 222,17,18,13	;
	DRWPOLY 222,18,19,14	;
	DRWPOLY 222,19,20,15	;

	RETURN
	END
