plane

        plane [surface-desc]  x y z  nx ny nz
Figure 2-12

Create a plane that passes through (x y z). The normal (nx ny nz) is a vector from (x y z), if you want a horizontal plane then specify a normal of 0 0 1. It is generally more efficient to use poly or box instead of plane; they will usually require less computation time.

In the example below, two planes are used to create a sea and sky and the yellow sphere provides the sun! Note that the sea plane has two bump textures applied to it. Also of note is the effect that the different diffuse and specular colours have on the appearance of the surface "water".

Figure 2-13

        /*
           waves.ray
           written by Graham Hannah 1990
           Email:  graham@keystone.arch.unsw.edu.au
        */
        eyep 6 -20 1.75
        lookp 0 0 1.3
        screen 300 200
        fov 48

        light 0.2 point 4 -18 10
        light 1.4 point -28 100 7
        light 0.9 0.9 0.4 point -28 100 7

        surface g-sky
            ambient 0.6 0.1 0.1
            diffuse 0.3 0.3 0.01
            specular 0.3 0.2 0.2

        surface water
            ambient 0.01 0.03 0.15
            diffuse 0.02 0.03 0.4
            specular 0.6 0.6 0.4
            specpow 30
            reflect 0.6
            transp 0.5 index 0.5

        surface yellow
            ambient 0.1 0.1 0
            diffuse 0.3 0.3 0.07
            specular 0.3 0.2 0.03
            specpow 0.01
            reflect 0.3
            transp 0.8

        plane water 0 0 -1.2  0 0 1
            texture bump 0.5  scale 4.1 4.1 4.1
            texture bump 0.1  scale 0.9 0.9 0.9

        plane g-sky 0 0 15  0 0 1
            texture bump 0.35  scale 10 10 10

        sphere yellow 4.5  0 0 0
            scale 1 0.1 0.9    translate -35 140 6.4
            texture gloss 0.8

Go to next primitive:
poly.

Return to Contents.

THE END - Notes on Rayshade - 2 - Rayshade Primitives - Plane