home *** CD-ROM | disk | FTP | other *** search
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;; ;;;;;;;;
- ;;;;;;;; Example Shape #10 - problems with SCALING ;;;;;;;;
- ;;;;;;;; ;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- SHAPE 10000
-
- ;;;;;;;;;;vertex list;;;;;;;;;;;;;;;;;;;;;;;
-
- VERTEX 1,-50,-50,-50 ;These 8 vertices define the centre
- VERTEX 2,+50,-50,-50 ;cube: 100x100x100. There are no
- VERTEX 3,+50,+50,-50 ;transformation commands used on
- VERTEX 4,-50,+50,-50 ;these vertices. The vertex coords
- VERTEX 5,-50,-50,+50 ;below have been adjusted so that
- VERTEX 6,+50,-50,+50 ;both cubes are the same size as
- VERTEX 7,+50,+50,+50 ;this one when SCALED up / down.
- VERTEX 8,-50,+50,+50
-
- OFFSET 20,0,0 ;This line OFFSETs the following 8 vertices by +20
- ;UNITS along the X axis (so the 2nd cube doesn't
- ;appear on top of the 1st). The vertices are then
- ;SCALED-UP by a factor of 10 resulting in the 2nd cube
- ;appearing 200 UNITS away. (20x10 = 200)
-
- SCALEUP 10 ;This scales the following vertices up to the same
- ;apparent size as the 1st cube (100x100x100).
-
- VERTEX 11,-5,-5,-5 ;These 8 vertices define the
- VERTEX 12,+5,-5,-5 ;right-hand, lighter cube.
- VERTEX 13,+5,+5,-5 ;As SCALEUP has been used the
- VERTEX 14,-5,+5,-5 ;vertices CLIP off screen
- VERTEX 15,-5,-5,+5 ;well before any of the other
- VERTEX 16,+5,-5,+5 ;vertices in the other two
- VERTEX 17,+5,+5,+5 ;cubes. It also trembles sligtly
- VERTEX 18,-5,+5,+5 ;due to its small (10x10) size.
-
- OFFSET -2000,0,0 ;This line OFFSETs the following 8 vertices by -2000
- ;UNITS along the X axis (so the 3rd cube doesn't
- ;appear on top of the 1st). The vertices are then
- ;SCALED-DOWN by a factor of 10 resulting in the 3rd
- ;cube appearing -200 UNITS away. (-2000/10 = -200)
-
- SCALEDOWN 10 ;This line scales the following vertices down to the
- ;same size as the first cube (100x100x100).
-
- VERTEX 21,-500,-500,-500 ;These 8 vertices define the left-hand,
- VERTEX 22,+500,-500,-500 ;darker cube. As SCALEDOWN has been
- VERTEX 23,+500,+500,-500 ;used, these vertices CLIP off screen
- VERTEX 24,-500,+500,-500 ;well after they have passed through
- VERTEX 25,-500,-500,+500 ;the viewing plane. This results in a
- VERTEX 26,+500,-500,+500 ;mathematical overflow and consequently
- VERTEX 27,+500,+500,+500 ;a distorted perspective when the
- VERTEX 28,-500,+500,+500 ;vertices reach this point.
-
- ;;;;;;;;;;facet list;;;;;;;;;;;;;;;;;;;;;;;;
-
- DRWPOLY 28,15,11,14,18 ;The rest of these lines are simply the 3 cube's
- DRWPOLY 33,05,01,04,08 ;facets. As can quite clarly be seen, the sorting
- DRWPOLY 38,25,21,24,28 ;has been achieved by facet ordering alone.
- DRWPOLY 39,26,27,23,22 ;
- DRWPOLY 34,06,07,03,02 ;
- DRWPOLY 29,16,17,13,12 ;
-
- DRWPOLY 31,01,02,03,04 ;
- DRWPOLY 32,06,05,08,07 ;
- DRWPOLY 35,02,01,05,06 ;
- DRWPOLY 36,04,03,07,08 ;
-
- DRWPOLY 26,11,12,13,14 ;
- DRWPOLY 27,16,15,18,17 ;
- DRWPOLY 30,12,11,15,16 ;
- DRWPOLY 31,14,13,17,18 ;
-
- DRWPOLY 36,21,22,23,24 ;
- DRWPOLY 37,26,25,28,27 ;
- DRWPOLY 40,22,21,25,26 ;
- DRWPOLY 41,24,23,27,28 ;
-
- RETURN
- END
-