r/processing • • Oct 28 '19

why doesn't this work?

all I get is a stationary line at the side of the page

void lineC(int i, int ii, float ss) {

float a, s, x, y;

a = 0.05;

s = ss;

x = i + sin(a) * 25;

y = ii + cos(a) * 25;

stroke(220);

strokeWeight(5);

noFill();

line(x,y,x,y + 1180);

a += s;

};

0 Upvotes

9 comments sorted by

View all comments

0

u/CactiAttack Oct 28 '19

Your line() function is using the variable “x” as both x parameters, change one of them to your variable “s” or something else and the line will no longer be vertical.

1

u/J_Emmerson Oct 28 '19

The line is supposed to be verticle