home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / ply15dat.zip / SOMBRERO.PI < prev    next >
Text File  |  1992-09-20  |  583b  |  27 lines

  1. // Set up the camera
  2. viewpoint {
  3.    from <0,10,-6>
  4.    at <0,0,0>
  5.    up <0,1,0>
  6.    angle 45
  7.    resolution 160, 160
  8.    }
  9.  
  10. // Set up background color & lights
  11. background SkyBlue
  12. light <10,10,-10>
  13. include "..\colors.inc"
  14.  
  15. define a_const 1.0
  16. define b_const 2.0
  17. define c_const 3.0
  18. define two_pi_a 2.0 * 3.14159265358 * a_const
  19.  
  20. // Define a diminishing cosine surface (sombrero)
  21. object {
  22.    function y - c_const * cos(two_pi_a * sqrt(x^2 + z^2)) *
  23.                           exp(-b_const * sqrt(x^2 + z^2))
  24.    shiny_red
  25.    bounding_box <-4, -2, -4>, <4, 2, 4>
  26.    }
  27.