author | Dmitriy Morozov <morozov@cs.duke.edu> |
Mon, 21 Jul 2008 17:33:20 -0400 | |
changeset 13 | 554df9494fd2 |
parent 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);