|
|
Roads and railways use 'transition' curves... a curve based on a
continuously variable radius throughout the turn. That is why you slowly
increase and decrease the steering wheel offset while driving. A fixed
radius curve would require a sudden change in road wheel and steering wheel
angle.
cc <coy### [at] fojarcom> wrote in message news:388702d1@news.povray.org...
> I'm new to ng posting, so let me know if i screw something up. :)
>
> Long background description of the project. If interested read it :)
> otherwise I have a math question at the bottom.
>
> I've been working on a system for scripting car-motion. It's
> geometry-based. ... Based on the idea that when turning, the car will
> revolve around some point which is located at the intersection of where
the
> normals (if extended) of all four wheels interrsect. Each wheel is then
> tangent to the overall axis of rotation and... tracks along the ground
> rather than skids. That point of course always be inline with the back
> axle.
>
> The steering angle of the car is defined by an imaginary middle front
wheel.
> If it is say... 45 degrees left, the angle of the left and right front
> wheels are calculated separately. The wheel on the inside of the turn
will
> be something steeper than 45 and vice versa for the wheel on the outside
of
> the turn.
>
> This approach is very geometry based... as opposed to an approach
involving
> a simple physics model. (I know of at least one commercial package for
> animators which models forces and is specifically for people who want to
> animate vehicles.) But that's what I intended it to be. I was shooting
> for something backed by nice clean math.... (...in theory....however
pretty
> or ugly the the actual code looks is another story. :) So far so good.
>
> I wanted accelleration and smooth steering-angle change. So I worked on
a
> simple scripting system where you can tell it initial speed, speed delta,
> initial steering angle and steering delta. ...And how long to do it.
Any
> time one of the variables changes, it defines a new motion segment.
> Realistic car motion can (well hopefully) be created by stringing together
a
> sequence of segments.
>
> The problem is in the iterative approach calculating each segment. I use
> macros to move the car through many small movements for different steering
> angles if the steering delta is non-zero. (The final position of the car
> is easy to calculate in one step as long as the steering angle for the
> segment is constant.) When an animation involves a long list of motion
> segments, recalculating the movement of the car from the beginning for
each
> frame puts a real parsing burdon on my almost antique computers. :)
>
> So now I have a system that pre-processes all of the motion segments and
> saves the results in a file. For each frame only one motion segment (or
> partial motion segment) will need to be calculated. This works great for
> final rendering but I still need to work on a generalized system for when
> I'm doing test renders. (I.e. one that can separately remember individual
> segments rather than pre-calculating The Whole Thing.)
>
> ************************************************************************
>
> 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.
>
>
>
> The first integral is do-able. The second and third might not be.
(4,5,6
> &7 I haven't bothered with yet... at least they're not all completely
> different....) I'm having trouble integrating anything with a trig
> function within a trig function... Say the integral of:
> cos( sin(x) ) dx
> Seems like everything I try leads me in circles.
> If it were something like:
> cos( sin(x) ) * cos(x) dx
> it would be easy with substitution.... but unfortunately... :)
>
> I've been looking for a way I can simplify the actual problem so that the
> trig-within a trig function goes away... or something...
>
> If mathematica can't do it, is that a bad sign? I threw a few things into
> the online mathematica integrator. http://integrals.wolfram.com/
> Unfortunately it wasn't able to do them.
>
> Help? Suggestions? Is there a way to approximate these integrals w/o
> iteration?
>
> -Charles
>
>
>
>
>
Post a reply to this message
|
|