Hello,
I have the following initial code:
My coordinate system looks like this:Code:double objectAngle = -90.0f; double objectSpeed = 3.0f; // meters per second double objectDistance = 300.0f; double objectTime = 0.0f; double objectHeading = 90.0f; double elapsedTimePerCycle = 1.0f;
Code:90 y | | | +-180 -------------------- 0 x | | | -90
I want to calculate a new x,y such that it follows a sine wave like pattern until it gets to point (0,0). I want the width of the arc to go out to about -45 degrees, and the same on the other side to about -135 degrees.
How can I compute these new x,y coordinates in C++?
Thanks!
Alex




Reply With Quote