home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Bezier patch example
- // by Alexander Enzmann
-
-
- #include "shapes.dat"
- #include "colors.dat"
-
- object
- bicubic_patch 1 5 5
- // bicubic_patch 3 0.05 5 5
- < 0.0 0.0 2.0> < 1.0 0.0 0.0> < 2.0 0.0 0.0> < 3.0 0.0 -2.0>
- < 0.0 1.0 0.0> < 1.0 1.0 0.0> < 2.0 1.0 0.0> < 3.0 1.0 0.0>
- < 0.0 2.0 0.0> < 1.0 2.0 0.0> < 2.0 2.0 0.0> < 3.0 2.0 0.0>
- < 0.0 3.0 2.0> < 1.0 3.0 0.0> < 2.0 3.0 0.0> < 3.0 3.0 -2.0>
- texture
- checker
- color red 1.0 color blue 1.0
- rotate <90 0 0>
- phong 1
- end_texture
- end_bicubic
- color red 1.0
- translate <-1.5 -1.5 0>
- scale <2 2 2>
- rotate <30 -70 0>
- end_object
-
- // The viewer is eight units back along the z-axis.
- view_point
- location <0.0 0.0 -15.0>
- right <1.3333 0.0 0.0>
- up <0.0 1.0 0.0>
- direction <0.0 0.0 1.0>
- end_view_point
-
- // Light source
- object
- sphere <0 0 0> 0.1 end_sphere
- translate <100 100 0>
- texture
- colour White
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- colour White
- end_object
-
-