We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › le people action cricle
Page Index Toggle Pages: 1
le people action cricle (Read 157 times)
le people action cricle
Nov 30th, 2008, 12:01am
 
hi,i worked a stick people like people,but the hands and the  foots aren't fore-and-aft when the programme was worked.how can i ..?
thank u.

int x1=10;
int x2=30;
int x3=60;
int x4=80;
int x5=20;

void setuo(){
size(300,300);
 smooth();
 noStroke();
 frameRate(2);
 
}
 void draw(){
    background(255);
ellipseMode(CENTER);
 rectMode(CENTER);
 x1++;
 if(x1>0){
 x1=width;
 }
    line(x1,x2,x1,x2+40);
   
    ellipse(x1,x2,x5,x5);
   

   
   line(x1,x2+12,x2-5,x3);//behind main
   line(x1,x2+15,x1-10,x3);//front main
 
   line(x1,x3+10,x1-10,x4);//behind foot
   line(x1,x3+10,x2-10,x4);//front foot
   
 }
Re: le people action cricle
Reply #1 - Nov 30th, 2008, 12:36am
 
Try this:

int x1=10;
int x2=30;
int x3=60;
int x4=80;
int x5=20;

void setup(){
 size(300,300);
 smooth();
 //noStroke();
 frameRate(24);
 
}

void draw(){
 
    background(255);
    translate (-10,0);
     ellipseMode(CENTER);
     rectMode(CENTER);  
     x1 -= 2;
 if(x1<0){
   x1=width;
   
 }
    line(x1,x2,x1,x2+40);
   
    ellipse(x1,x2,x5,x5);
   

   
   line(x1,x2+12,x1+10,x3);//behind main
   line(x1,x2+15,x1-10,x3);//front main
   
   line(x1,x3+10,x1-10,x4);//behind foot
   line(x1,x3+10,x1+10,x4);//front foot
   
   /*
   translate(-50,0);
   
   line(x1,x2,x1,x2+40);
   
    ellipse(x1,x2,x5,x5);
   
   
   
   line(x1,x2+12,x2-5,x3);//behind main
   line(x1,x2+15,x1-10,x3);//front main
 
   line(x1,x3+10,x1-10,x4);//behind foot
   line(x1,x3+10,x2-10,x4);//front foot
    */
   
}
Page Index Toggle Pages: 1