Why do you loop it 4 times? (the n loop).
Is it for precision, if i looped 20 times would it be more precise?
In every loop we gain precision by correnting the distance and angle between the dots and we lose precision by using computer math. So after a certain point (I'm not sure how many loops exactly) we will actually lose precision...Is it for precision, if i looped 20 times would it be more precise?
you can put the lines with the angle calculation in the following IF because you dont need the angle unless the IF conditions are met
I hacked this together in a few minutes - it's 100% unoptimised. ;-) Yep I get it. How did you learn this or did you just invent the solution here?
It's an algorithm to model strings in physical simulations. I think I got it from here...-- Byteemoz
PS: I changed the example to use float instead of integer math.