Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
yasserslife
yasserslife's Profile
1
Posts
5
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
I cant make the 2 ellipses move ive tried everything please help
[9 Replies]
28-Mar-2013 07:57 AM
Forum:
Programming Questions
This is my code, i have tried using the float and i just cant seem to get the faces to move only a certain part,
can someone please guide me thanks a lot in advance...
////////////////////////////////////////////////////////////////////////
PVector pos1, pos2;
PVector vel1, vel2;
///////////////////////////////////////////////////////////////////////
void setup()
{
size(640, 480);
pos1 = new PVector (random(0, width), random(0, height));
pos2 = new PVector (random(0, width), random(0, height));
vel1 = new PVector (random(-2.0, 2.0), random(-2.0, 2.0));
vel2 = new PVector (random(-2.0, 2.0), random(-2.0, 2.0));
}
//////////////////////////////////////////////////////////////////////
void drawFace()
{
strokeWeight(4);
fill(255, 255, 0);
ellipse(40, 40, 80, 80);
point (30 , 30); point (50 , 30);
arc(40, 40, 50, 50, radians(0), radians(180));
}
//////////////////////////////////////////////////////////////////////
void drawFace2()
{
strokeWeight(4);
fill(255, 255, 0);
ellipse(140, 40, 80, 80);
point (130 , 30); point (150 , 30);
arc(140, 40, 50, 50, radians(0), radians(180));
}
//////////////////////////////////////////////////////////////////////
void draw()
{
background(255);
drawFace();
drawFace();
drawFace2();
drawFace2();
}
//////////////////////////////////////////////////////////////////////
«Prev
Next »
Moderate user : yasserslife
Forum