This Is Working Version of What I learn.
float[] x = new float[5];
void setup() {
size(1080,720);
noStroke();
}
void draw() {
background(0);
x[0] += 0.5;
x[1] += 0.5;
x[2] += 0.5;
x[3] += 0.5;
x[4] += 0.5;
arc(x[0], 20, 20, 20, 0.52, 5.76);
arc(x[1], 40, 20, 20, 0.52, 5.76);
arc(x[2], 60, 20, 20, 0.52, 5.76);
arc(x[3], 80, 20, 20, 0.52, 5.76);
arc(x[4], 100, 20, 20, 0.52, 5.76);
}
It’s not working version of What I learn
float[] x = {-10,10,35,18,30};
//[{
//NO new float{}
void setup() {
size(1080,720);
noStroke();
}
void draw() {
background(0);
x[-10] += 0.5; //??
x[10] += 0.5;
x[35] += 0.5;
x[18] += 0.5;
x[30] += 0.5;
arc(x[-10], 20, 20, 20, 0.52, 5.76); //??
arc(x[10], 40, 20, 20, 0.52, 5.76);
arc(x[35], 60, 20, 20, 0.52, 5.76);
arc(x[18], 80, 20, 20, 0.52, 5.76);
arc(x[30], 100, 20, 20, 0.52, 5.76);
}
I was realize working version of my code doesn’t showing what I want excatly.
I was excepting bit spread arcs. but, processing shows message that my code have
problem with [-10]…
How can I fix it??