home *** CD-ROM | disk | FTP | other *** search
- {
- mountain.cal: Create a 'mountain' landscape
-
- igensurf -v -s 30 -t 30 mountain.cal | writetddd >mountain.obj
-
- In this example, the noise functions is used to modify an otherwise
- simple surface.
-
- Three color functions are defined to add some color to the landscape.
- }
-
- #name mountain
- #color on
-
- x_scale : 300.0; { Scale factor for the x axis }
- y_scale : 300.0; { Scale factor for the y axis }
- z_scale : 100.0; { Scale factor for the z axis }
-
- x(u,v) = x_scale * u;
- y(u,v) = y_scale * v;
- z(u,v) = z_scale * (fnoise3(3*u,3*v,0) + 1);
-
- { Color functions: Let top be white, and everything else green }
-
- cr(u,v,x,y,z) = if (1.5 * z_scale - z, .2, .9);
- cg(u,v,x,y,z) = if (1.5 * z_scale - z, .9, .9);
- cb(u,v,x,y,z) = if (1.5 * z_scale - z, .2, .9);
-