|
|
On Tue, 20 Jan 2009 04:50:08 -0800, cc wrote:
>In the spirit of clean mathematical models, I really want to do each motion
>segment in one step using calculus.
>
>I figured there are seven integrals I need to find:
>
>*The first one gives the cumulative of the rate of change of the direction
>the car is facing... and thus gives the final direction the car is facing
>for the given segment.
>
>*The second and third integrals find the x and y locations of the car. For
>the x position, take the cosine (or sine for y position) of the first
>integral, multiply it by the current speed as speed changes. Take the
>integral of this (in terms of time of course).
>
>*The other four integrals are of the speeds of each of the wheels. Knowing
>how far each wheel has travelled we know how many times each wheel has
>turned.
I'm not convinced that you need integrals. The lengths of circular arcs
are trivially calculated without integrals; simply multiply the radius of
the arc by the angle in radians. Each wheel will follow a circular arc,
so you just need to add them up. This covers "the other four."
The second and third aren't as hard as you're making them, either. The
easiest way to do what you want is to use POV's vaxis_rotate function,
which takes an initial position and rotates it around a given center by
a given angle, returning the final position.
The first one is probably the easiest: you just add up all of the angles
and the result is the change in direction.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|