• Advertisement

Archived

This topic is now archived and is closed to further replies.

Rotation Radius

This topic is 5999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok , im trying to create path finding to my game. now , to make my units avoid obstacle , i have to rotate them (actually rotate the image) , now , lets say my unit velocity on X is 2 pixels per frame and on the Y is 3 pixels per frame , now , lets say my unit is moving in a circle movement , how can i know my rotation radius? i dont know the frequency of the unit''s circle movement and i dont know the time that takes for the unit to complete one cycle. what should i do then? how can i know the rotation radius? Thanks a lot!

"Thats who you are. Thats what you could." ------------------------------ - Goblineye Entertainment ------------------------------

Share this post


Link to post
Share on other sites
Advertisement
I think you don't have enough information to find that out...

Since you have no linear acceleration (I'm assuming you have a constant linear velocity of radical 13), you know one variable, namely v . And you want to know the radius of the circle, r .

So what equations can we come up with?

Using rotational kinematics, we know that r * omega = v , where omega is the rotational velocity (radians/second).

There's also d = v * t , d = r * theta , and theta = omega * t , where d is linear distance, t is time, and theta is the angle on the circle to the point.

So how many variables do we have? r, omega, v, d, t, theta . 6 variables; 4 equations. Knowing your initial velocity reduces your variables by one: 5 vars in 4 eqs. Since you don't know any other variables (or do you?), the best you can get is an infinite number of answers.

And really, that makes sense. If you're in a car going 40mph, you can make a really slow turn around a bend, and you can make a pretty quick turn. Granted, there is a limiting point as to how small a turn you can make at that speed , but you don't just have one -- it depends more on how much you turn the steering wheel .

If you do know another of the other unknown variables you didn't mention (linear distance or angular position on the circle), then just use the 4 equations above to solve them all...

~ Dragonus
If F = ma, and Work = Fd, does that mean that Work = mad?

Edited by - Dragonus on August 17, 2001 4:25:49 PM

Share this post


Link to post
Share on other sites
Wait , i think i do know the angle , well , if the angle is what i think , which is the actual of the object (after i rotated it) , hen i know the angle.


"Thats who you are. Thats what you could."
------------------------------
- Goblineye Entertainment
------------------------------

Share this post


Link to post
Share on other sites
  
.-----.
/ / \
| / |
| -----|
| |
\ /
°-----°


Pardon the horrendous ASCII art.

The angle you need is the angle shown above. Given that an object is going along a circular path, it''s the number of radians it has travelled along the circular path. So (as shown in the picture above) if we start off on the right side of the circular path and are heading counterclockwise, our "angle" is the angle shown above.

Dragonus
Thought of the Moment
If F = ma, and Work = Fd, then does Work = mad?

Share this post


Link to post
Share on other sites
pardon the pixel graphics!

well , actually i can get this angle with some analitic geometry tricks





as u can see in this pic , i can get the green line formula easily , and then i can find the center of the circle with just puting 0 in the green line fomula ( y = mx + n ) , then i can find the vector which points from the center of the circle to the object which moving along the circle , after that , i just perform a DotProduct between the v(1,0) vector , and the vector that points to the object. and thats it , i got the angle...
then , anyway , how can i get the rotation radius then ?


"Thats who you are. Thats what you could."
------------------------------
- Goblineye Entertainment
------------------------------

Share this post


Link to post
Share on other sites
errr.... the pic cannot be accessed from a remote site , can i send it to u in mail?

Share this post


Link to post
Share on other sites
Right-click the bad image and click Properties. Copy the URL in the window that pops up into your browser to see it. ^_^

Dragonus
Thought of the Moment
"Everything, no matter how unlikely, has a very small yet finite chance of happening." ~Heisenburg''s Uncertainty Principle
That still gives me hope that, one day, I''ll be teleported to some remote desert isle surrounded by women who think I''m a god.

Share this post


Link to post
Share on other sites

  • Advertisement