Skip to main content
2 of 3
added 1 character in body
Peter
  • 13
  • 3

Calculate path segments size

I have a problem more closely described on a picture below. The idea is that I have my agent in point A and I want to get to the point B. The problem is, that agents rotation towards point B is alpha degrees. I want to get to the point B in n steps (path segments) such that at each step, I rotate towards point B by uniform degrees. That should be (if I am not mistaken) \$2\times\frac{alpha}{n}\$ degrees at each step.

enter image description here

I want to know how big of a steps (path segments) I need to make so they all have same size and will get me to the point B.

Peter
  • 13
  • 3