Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
mod345
mod345's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
How do i adjust rotate radius
[4 Replies]
20-Apr-2011 12:26 PM
Forum:
Programming Questions
Hello im new to processing and need help with rotate
i have a vertex image which i want to draw multiple times around a fixed point
how do you adjust the radius from the fixed point to the vertex image
have tried translate(0,0,0) does not work ?
PVector v1,v2,v3,v4;
int px;
void setup(){
size(800,400,P3D);
translate(0,0,0);
}
void draw() {
px=px+1;
rotateZ(px);
v1 = new PVector(400,200,0);
v2 = new PVector(400,200,0);
v3 = new PVector(400,200,0);
v4 = new PVector(400,200,0);
PImage aa = loadImage("tile.jpg");
textureMode(NORMALIZED);
beginShape();
texture(aa);
vertex(v1.x,v1.y,v1.z,0,0);
vertex(v2.x+50,v2.y,v2.z,1,0);
vertex(v3.x+50,v3.y+50,v3.z,1,1);
vertex(v4.x,v4.y+50,v4.z,0,1);
endShape();
}
here is the code thanks !!
«Prev
Next »
Moderate user : mod345
Forum