Stack overflow
in
Programming Questions
•
5 months ago
hi all,
i have a problem running this program
size(750, 800);
background(0);
smooth();
stroke(255);
int my = height / 3 * 2;
int seed = 5;
randomSeed(seed);
float axeY = 0;
float axeX = 0;
for (int g = 30; g <= height - 30; g++) {
// upper
if (g < my) {
for (int i = g; i < my; i++) {
float rip = random(0, 1);
float xOffset = random(-10, 10);
float yOffset = random(-10, 10);
axeY = i + yOffset;
axeX = xOffset;
// upper right
for (int x = 0; x < width; x++) {
float n = norm(x, 0.0, float(width));
float y = pow(n, 2 * rip);
y *= width;
point(x + (width / 2) + axeX, - y + axeY);
}
// upper left
for (int x = 0; x < width; x++) {
float n = norm(x, 0.0, float(width));
float y = pow(n, 2 * rip);
y *= width;
point(- x + (width / 2) + axeX, - y + axeY);
}
}
}
// lower
else {
for (int i = g; i < height - 30; i++) {
float rip = random(0, 1);
float xOffset = random(-10, 10);
float yOffset = random(-10, 10);
axeY = i + yOffset;
axeX = xOffset;
// lower right
for (int x = 0; x < width; x++) {
float n = norm(x, 0.0, float(width));
float y = pow(n, 0.4 * rip);
y *= width;
point(x + (width / 2) + axeX, y + axeY);
}
// lower left
for (int x = 0; x < width; x++) {
float n = norm(x, 0.0, float(width));
float y = pow(n, 0.4 * rip);
y *= width;
point(- x + (width / 2) + axeX, y + axeY);
}
}
}
}
i think processing goes in stack overflow but I can't find the error in the code
please give me a hand to figure it out
ty in advance
a
1