rhythmiccycle
- 9
- 0
here is the pseudo java (processing) code I'm trying to run
I'm trying to run something more complex than this, but the code above shows the main point where I can't convert standard "for loop" programming to mathemitica.
please help me write an equivalent code in mathematica.
Code:
float x0,y0,x,y,t;
x0 = 2; //arbitrary value
y0 = 5; //arbitrary value
x = x0;
y = y0;
for(int t = 1; t <= 100; t++){ //one hundred iterations
t =atan2(y,x);
x += cos(t);
y += sin(t);
print( x, y)
}
I'm trying to run something more complex than this, but the code above shows the main point where I can't convert standard "for loop" programming to mathemitica.
please help me write an equivalent code in mathematica.