how to use ModelX,Y or Z determine x,y,z location after using rotateX,Y or Z
in
Programming Questions
•
2 years ago
Here is the code I want to determine the x,y,z coordinates
http://www.openprocessing.org/visuals/?visualID=6566
http://www.openprocessing.org/visuals/applets/visualb7ee343ce6dc454f950d889d56af...
//December 15th 2009
//EasySphere v1.0
//Owaun Scantlebury
import peasy.org.apache.commons.math.*;
import peasy.*;
import peasy.org.apache.commons.math.geometry.*;
PeasyCam cam;
void setup(){
size(300,300,P3D);
background(255);
cam= new PeasyCam (this,width);
}
void draw(){
translate(-width/2,-height/2);
background(255);
for (float z=0;z<360;z+=0.1){ //0.01 to increase resolution
translate(width/2,height/2,0);
rotateX(z);
//line(0,0,30,30); //uncomment for solid sphere
point(30,30);
rotateZ(z);
point(30,30);
//line(0,0,30,30); //uncomment for solid sphere
translate(-width/2,-height/2,0);
}
}
http://www.openprocessing.org/visuals/?visualID=6566
http://www.openprocessing.org/visuals/applets/visualb7ee343ce6dc454f950d889d56af...
//December 15th 2009
//EasySphere v1.0
//Owaun Scantlebury
import peasy.org.apache.commons.math.*;
import peasy.*;
import peasy.org.apache.commons.math.geometry.*;
PeasyCam cam;
void setup(){
size(300,300,P3D);
background(255);
cam= new PeasyCam (this,width);
}
void draw(){
translate(-width/2,-height/2);
background(255);
for (float z=0;z<360;z+=0.1){ //0.01 to increase resolution
translate(width/2,height/2,0);
rotateX(z);
//line(0,0,30,30); //uncomment for solid sphere
point(30,30);
rotateZ(z);
point(30,30);
//line(0,0,30,30); //uncomment for solid sphere
translate(-width/2,-height/2,0);
}
}
1