home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 564a.lha / igensurf_v1.0 / examples / curtain.cal < prev    next >
Text File  |  1991-09-27  |  773b  |  31 lines

  1. {
  2.     curtain.cal: Create a a curtain
  3.  
  4.     igensurf -v -s 50 -t 10 curtain.cal | writetddd >curtain.obj
  5.  
  6.     In this example, the noise functions is used to modify an otherwise
  7.     simple surface.
  8.  
  9. }    
  10.  
  11. #name  Curtain
  12. #phong on
  13.  
  14. x_scale    : 1000.0;        { Scale factor for the x axis }
  15. y_scale    : 100.0;        { Scale factor for the y axis }
  16. z_scale    : 1000.0;        { Scale factor for the z axis }
  17.  
  18. nbr_folds : 7.2;
  19. max_noise : 0.1;
  20.  
  21.  
  22. x(u,v) = x_scale * (u + xnoise(u,v));
  23. y(u,v) = y_scale * (cos(nbr_folds*2*PI*u) + ynoise(u,v));
  24. z(u,v) = z_scale * (v + znoise(u,v));
  25.  
  26.     { Let noise depend on (1-v) so that the curtain hangs ok at top }
  27.  
  28. xnoise(u,v) = (1-v) * max_noise * noise3a(5*u,5*v,0);
  29. ynoise(u,v) = (1-v) * max_noise * noise3b(5*u,5*v,0);
  30. znoise(u,v) = (1-v) * max_noise * noise3c(5*u,5*v,0);
  31.