author | Dmitriy Morozov <morozov@cs.duke.edu> |
Mon, 07 Aug 2006 09:36:23 -0400 | |
changeset 9 | b16a476ef46d |
permissions | -rw-r--r-- |
/* Create a sphere centered at c, with radius r, and precision n Draw a point for zero radius spheres Code by Paul Bourke <http://astronomy.swin.edu.au/~pbourke/opengl/sphere/> */ #include <GL/gl.h> const double TWOPI = 2*3.14; const double PID2 = 3.14/2; struct XYZ { XYZ(GLfloat xx = 0, GLfloat yy = 0, GLfloat zz = 0): x(xx), y(yy), z(zz) {} GLfloat x,y,z; }; void CreateSphere(XYZ c,double r,int n);