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

  1. {
  2.     hyper.cal: Create a hyperboloid ( x^2/a^2 + y^2/b^2 - z^2/c^2 = 1)
  3.  
  4.     igensurf -v -s 10 -t 30 -S 100 hyper.cal | writetddd >hyper.obj
  5. }    
  6.  
  7. #name hyperboloid
  8.  
  9. x_scale    : 1.0;        { Scale factor for the x axis }
  10. y_scale    : 1.0;        { Scale factor for the y axis }
  11. z_scale    : 1.0;        { Scale factor for the z axis }
  12.  
  13. x(s,t) = x_scale * (cos(2*PI*s) - v(t) * sin(2*PI*s));
  14. y(s,t) = y_scale * (sin(2*PI*s) + v(t) * cos(2*PI*s));
  15. z(s,t) = z_scale * v(t);
  16.  
  17. v(t) = 10 * 2 * (t - .5);
  18.