Sign in to follow this  
ADT_Clone

Vector applied in Circular Motion

Recommended Posts

I am currently looking for a way to program a vector applied to an object restricted to a circular path with a constant radius. An example is a object on an end of a metal post that is attached to a rotating point facing upwards. A force at 0 degrees, 1N is applied. Since the object is attached to the post, the force must be converted so that the object follows the circular path. At the moment I'm using an untested method which involves getting the x component of the applied force, then using that as the new vectors magnitude. The angle is the angle between the x component and the vector of the applied force. This ensures the New Vector cuts between two points on the circle, maintaining a constant radius and ultimately following a circular motion. Is this the correct way to do this, or is there an easier way or set formula? Any articles or ideas would be of great assistance, thanks. =d

Share this post


Link to post
Share on other sites
That sounds about right, but kinda funky. Let's say the object is looking forwards, represented by a unit vector called N. Then if a force F is applied, the actual effective force E acting on the object will be cos(angle between N and F) * |F| * N. This makes it so that if you apply a force perpendicular to the way the object is facing, the effective force is 0. If the applied force is parallel to the way the object is facing, then 100% of the force is applied.

Anyway, I hope that was clear. And I hope I didn't just give you the answer to some homework :)

Oh, and slight nitpick: You don't apply vectors to objects. Vectors are just elements of vector space. It doesn't make any sense to "apply" them to an object. You can, however, apply a force to an object.

[edit]

Fixed equation (forgot to add |F|).

[Edited by - MikeTacular on June 18, 2009 11:54:15 AM]

Share this post


Link to post
Share on other sites
I don't think this is what I want. I'm assuming your talking about a single object rotating on its axis.

I'm talking about an object attached to a rotatable connector. Like a plane propeller that isn't moving. If you attached an object to the end of one of the blades, then exerted a force lets say, 1N to the left(Bad convention), the object wouldn't move the whole propeller to the left, instead it would follow the propellers circular motion.

If this was what you were talking about, I didn't get it. =d

Share this post


Link to post
Share on other sites
Let {t,n,b} be the Frenet frame and s the arc-length parameter (the angle) of your curve. The force can be decomposed in the components along the Frenet frame so you have: F = Ft t + Fn n + Fb b. Your velocity v should always be directed in the direction of t, so you can think to add a new force r = rt t + rn n + rb b that correct the trajectory of the object.

By

ma = F + r

you obtain the system

m (d^2 s)/dt^2 = Ft + rt
m c (ds/dt)^2 = Fn + rn
rb = Fb

If there isn't any friction than rt = 0 and you can get the trajectory integrating

m (d^2 s)/dt^2 = Ft

If Ft only depends by the position of the object or is constant than it can be easily solved, in other cases a numerical integrator is probably the best solution.

Share this post


Link to post
Share on other sites
So how does a Frenet Frame work? Didn't really get much of what you said other than the velocity must face the center.

So if I integrated a vector that describes the velocity, I should get a position vector and hense should be able to apply the appropriate force?

Share this post


Link to post
Share on other sites
The velocity is tangential to the circle and doesn't face the center. The second derivatives of the angle, not position in 3D, depends on the tangential part of the force. So you are only integrating F*t and not simply the force...
The frenet frame is a frame located in a point of the curve where, if the curve is f, t = f'/|f'|, n = t'/|t'| and b = txn. It's useful to "linearize" a curve.

Share this post


Link to post
Share on other sites
Quote:
Original post by ADT_Clone
I don't think this is what I want. I'm assuming your talking about a single object rotating on its axis.

No, I'm talking about an object that is attached to some pole, which is attached to some axis that the object then rotates around. I did make a mistake in my original post (which I've fixed now). I forgot to take the magnitude of the force into account. This is what I mean:

(Click for larger image)


The rod keeps the object in circular motion, not the applied force. The applied force just causes the object to move, and the rod forces that movement to be circular. If you want to keep the object in circular motion without attaching a rod to it, then that's something entirely different. If this still isn't what you want, maybe you should try drawing a picture and uploading it. It's hard to describe these things with just words.

Share this post


Link to post
Share on other sites
I had overestimated your problem... The problem was solved in 3D for a general smooth curve (actually I think C^1 is enough) and for a force F(P, v, t) that can in general depends on time, position and velocity of the object. I think your problem is a lot easier to handle, so I have decided to solve it for two particular cases in 2D: conservative forces and impulsive forces.

Conservative forces

This is quite similar to the general case. If the circle is centered in the origin, than the object is located at

P(t) = Ru(t) = R(cos θ, sin θ)

it's velocity is

v(t) = Ru' = R θ' (-sin θ, cos θ) = R θ' w

and it's acceleration

a(t) = R θ' ' w + R θ' w' = R θ' ' w + R θ'2 (-cos θ, -sin θ) = - R θ'2 u + R θ' ' w

If there isn't friction, the reaction force is perpendicular to the velocity and by Newton Law it's possible to write the following differential system:

m R θ' ' = Fw
- m R θ'2 = Fu + R

The first one is enough to find angular acceleration. F and w are in fact functions of θ and you can simply integrate twice Fw and calculate constants from initial conditions. If you want I can do an example with something like weight.

Impulsive forces

I assume that the motion of the object before applying the impulsive force was uniform (with constant angular velocity ω). Impulsive forces are easier. If you haven't any constraint on the motion of the object than they are simply added to the velocity of the object scaled by the mass. If there are constraints than you also have an impulsive reactive force. In your case, if there isn't any friction, the reactive force cancels out the components of the active force that isn't parallel to the velocity. So you can simply calculate the component of the force parallel to the velocity (Fw), scale it by the mass and add it to the current velocity. So it's

v = R ω + (Fw)/m
ω = v / R

Note that v is simply a scalar because the direction of v is understood to be w, but there is no need to calculate it.

[Edited by - apatriarca on June 18, 2009 12:06:34 PM]

Share this post


Link to post
Share on other sites
My $0.02

//Integrate the body with any kind of crazy impulse you want,
// then call this funcion. It's sloppy but it'll get the job done.
void ConstrainBodyToAxis(Body &body, const PointDirection &axis, float radius)
{
Vector localP = body.P - axis.P;
Vector biPerp = Cross(localP, axis.D);
Vector perp = Cross(biPerp, axis.D);
perp.SetMagnitude(radius);
body.P = axis.P + perp;
}


You'd have to update the other variables too. V and W. They're just vectors too.

Google says:
http://wiki.vdrift.net/Numerical_Integration#Newton-Stormer-Verlet_.28NSV.29_.2F_Symplectic_Euler_.2F_Euler.E2.80.93Cromer_algorithm

Share this post


Link to post
Share on other sites
Sorry, but I still don't get all of this. What do I actually have to do to constraint an object to a constant ciruclar path where movement is contributed by a variable force on the object of any magnitude or direction.

Share this post


Link to post
Share on other sites
Quote:
Original post by ADT_Clone
Sorry, but I still don't get all of this. What do I actually have to do to constraint an object to a constant ciruclar path where movement is contributed by a variable force on the object of any magnitude or direction.

Read Advanced Character Physics and use Verlet integration to apply the forces. Create a physical constraint on the object such that it is always a distance of R away from the axis of which it is to rotate about, and if you're working in 3D force one of its components to always be zero (so that it constrains it to a 2D plane). This is the simplest solution and should give you good results.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this