I might just be missing something obvious but how do I calculate the x and y movement if I have the distance and the angle of the movement.
I want all coordinates to stay within a certain distance to the center. I have succeeded to get both the distance and the angle from the center with help of dist(); and atan2();
I guess it's trigonometry but my math skills haven't been refreshed since college. Could anyone help me out?
I'm working on a script where some coordinates are moving randomly around checking if other points are close to them and if so draws a line to the those points. This is the first thing I make in processing so the code isn't beautiful but it works.
The next step i would like to introduce to this script to keep these points within a vector shape. My guess is that I would need to use some kind of collision detection to make that work. But I have not been able to find any library or guide that I can understand. Would anyone be so kind and nudge me in the right direction?