move a point away
in
Programming Questions
•
1 year ago
How can i move a point up and down and left and right.
It has to be a bit smooth but not like sin and cos for a perfect circle.
I did a few attempts, either it's jagging or it moves in one direction.
Also if i use it for more points then they should not do all the same.
- float x1, y1;
- void setup() {
- size(400, 400);
- x1 = width/2;
- y1 = height/2;
- }
- void draw() {
- background(0);
- x1 += noise(frameCount) - noise(frameCount)/2;
- y1 += noise(frameCount) - noise(frameCount)/2;
- ellipse(x1, y1, 5, 5);
- }
1