求助大神,这个code要怎么加进去
processing吧
全部回复
仅看楼主
level 1
怎样在我写的原基础上把point = 9 变成 point的值是由 mouseX/20决定的
int point = 9;
float radius = 100;
float theta = 2*PI/point;
void setup(){
size(500,500);
background(0);
noSmooth();
}
void draw(){
for(int point =0; point<9; point++){
float x=width/2 + radius*cos(point*theta);
float y=height/2- radius*sin(point*theta);
float lastX = width/2 + radius*cos((point+1)*theta);
float lastY = height/2- radius*sin((point+1)*theta);
stroke(255);
line(x,y,lastX,lastY);
lastX = x;
lastY = y;
}
}
2015年12月11日 04点12分 1
1