2016-11-03 69 views
0

大家好论点我在这里要求你的帮助 我一直在练习上处理作弄了一个月,但现在我已经开始遇到了一个大问题,现在:停止了如果处理

float w=10; //haut 
float x=14; //haut 
float y=10; // bas 
float z=24; // bas 



void setup() { 
frameRate(120); 
size(600,600); 
background (0); 
stroke(255); 
smooth(); 

} 

void draw() { 
println(frameCount); 


line (w,x,y,z); 
w=w+10; 
x=x; 
y=y+10; 
z=z; 
if ((w>580) && (y>580) && (frameCount<601) ) { x=x+30; w=10; 
z=z+30;  y=10;} 

的事情是,我要线条有点从601帧

那样弯曲:

谢谢s!

回答

0

您的代码在结尾处缺少}。 这里有一个可能的语法:

float w=10; //haut 
float x=14; //haut 
float y=10; // bas 
float z=24; // bas 

void setup() { 
    frameRate(120); 
    size(600,600); 
    background (0); 
    stroke(255); 
    smooth(); 
} 

void draw() { 
    println(frameCount); 

    line (w,x,y,z); 
    w=w+10; 
    x=x; 
    y=y+10; 
    z=z; 
    if ((w>580) && (y>580) ) { 
     x=x+30; 
     w=10; 
     z=z+30; 
     if (frameCount<=600){ 
      y = 10; 
     } 
     else{ 
      y = 15; 
     } 
    } 
} 
+0

你还知道如何在同一条线上同时弯曲和弯曲吗? –

+0

@ClézioDelescluse如果您有后续问题,请将其作为新问题发布在其自己的帖子中。但你的第一站应该是[参考](https://processing.org/reference/)。 –