topical media & game development
graphic-processing-algorithm-Ch08-p201-p201.pde / pde
size(500,500, P3D); //setup the screen
camera(-15,15,-15,0,0,0,0,0,1); //get a viewpoint
for(int i=0; i<360; i+=10)
for(int j=0; j<360; j+=10){
float x = 10 * sin(radians(i)) * cos(radians(j));
float y = 10 * sin(radians(i)) * sin(radians(j));
float z = 10 * cos(radians(i));
point(x,y,z);
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.