 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 20 Jan 2009 04:50:08 -0800, cc wrote:
>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.
I haven't looked at the whole thing yet, but I can tell you that this
part at least is incorrect. If the front wheels are parallel, their
axes will never intersect. In fact when you turn, one or both wheels
will skid just a little.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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] fojar com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
cc wrote:
> I wanted accelleration and smooth steering-angle change. So I worked on a
If all you want is a nice movie, why not start with the given
shape of the curve and the location as a function of time,
and then get the angles etc. by differentiation?
> cos( sin(x) ) dx
Looks like something with a Bessel function to me. Are you sure
you want to use this?
If yes, try Gradstein/Ryshik or Abramowitz/Stegun (the first one
is a great collection of integrals ant other stuff, the second
has mostly definitions, but has all of them correct (it is
something like an ANSI standard about higher functions)).
Yet another way to do it would be to integrate numerically -- just
hack a Runge-Kutta using POV's macros.
Ralf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I haven't looked at the whole thing yet, but I can tell you that this
> part at least is incorrect. If the front wheels are parallel, their
> axes will never intersect. In fact when you turn, one or both wheels
> will skid just a little.
That is why cars use trapezoidal steering mechanisms.
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricy net>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I am just wondering, what exactly does integration do? Several people have tried
unsuccessfully to explain it to me. I believe something to do with area under a
curve? Just tell me what the input represents and what the output represents,
that's all I really want to know.
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricy net>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David Fontaine <dav### [at] faricy net> wrote in message
news:3887B189.DE2796FE@faricy.net...
> I am just wondering, what exactly does integration do? Several people have
tried
> unsuccessfully to explain it to me. I believe something to do with area
under a
> curve? Just tell me what the input represents and what the output
represents,
> that's all I really want to know.
input: a bunch of things to be added up, with a certain weight for each.
An example is the average. You add up all of them but weight
them by 1/(number of things). average of a, b, and c is
a/3 +b/3+c/3.
Usually the term 'integration' is used when the things to
be added for a continuum of values. Thats why integration is
considered 'calculus'.
Say you want to know how a planet is going to revolve around its sun.
The force of gravity on the planet is not usually constant because the
planet
can go from one distance from its sun to other distances. To find out where
it will be tomorrow, you could 'move' it (on paper) in little increments
calculating the forces on it anew for each second, using its new position
and new forces. You are actually adding up all these effects, second
after second. But since it is more accurate to consider time as a
continuum, you really should add up a continuum of miniscule
effects. That is, you 'integrate' the effects
output: the sum
oh yeah, 'the area under the curve' explanation comes from finding the
area under a curve by adding up a bunch of rectangular regions (for
which you know that area=length X width) areas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>I haven't looked at the whole thing yet, but I can tell you that this
>part at least is incorrect. If the front wheels are parallel, their
>axes will never intersect. In fact when you turn, one or both wheels
>will skid just a little.
>
>--
I used to have a radio controlled car which would turn the inside-wheel more
than the outside wheel. Whether it did it perfectly is another story... I
haven't done anything on my own to find out if real cars are that way too
but I hope that they are...
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I don't know what trapezoidal steering mechanisms do... Do they do what I
was talking about... about rotating the wheel on the inside of the turn at a
steeper angle than the wheel on the outside?
-Charles
David Fontaine wrote in message <3887B0B0.FCC0429F@faricy.net>...
>> I haven't looked at the whole thing yet, but I can tell you that this
>> part at least is incorrect. If the front wheels are parallel, their
>> axes will never intersect. In fact when you turn, one or both wheels
>> will skid just a little.
>
>That is why cars use trapezoidal steering mechanisms.
>
>--
>Homepage: http://www.faricy.net/~davidf/
>___ ______________________________
> | \ |_ <dav### [at] faricy net>
> |_/avid |ontaine <ICQ 55354965>
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I don't know what trapezoidal steering mechanisms do... Do they do what I
> was talking about... about rotating the wheel on the inside of the turn at a
> steeper angle than the wheel on the outside?
Yep!
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricy net>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wow! I'm still new to the idea of getting so many responses so quickly.
Thanks everybody :)
I think there was one thing that I should clarify regarding my original
post. The system I have now IS able to handle continuous steering-wheel
movement via small incremental changes in steering-angle. Those
incremental changes add up to a lot of number crunching during parse time.
For movements that leave the steering wheel in one position, we're just
dealing with arks and it's not too difficult. One or two of my earlier
tests animations involved a steering-angle which went instantly from 45
degrees left to 45 degrees right to instantly straight...... physically
impossible yes, but easy to work with. :-)
It was after that that I added the sweeping steering-angle movements and the
accelleration and the scripting and all that... Here's where it's a
choice of working with arcs, and crunching away at a lot of them... or
(sigh) calculus.
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> input: a bunch of things to be added up, with a certain weight for each.
> An example is the average. You add up all of them but weight
> them by 1/(number of things). average of a, b, and c is
> a/3 +b/3+c/3.
> Usually the term 'integration' is used when the things to
> be added for a continuum of values. Thats why integration is
> considered 'calculus'.
> Say you want to know how a planet is going to revolve around its sun.
> The force of gravity on the planet is not usually constant because the
> planet
> can go from one distance from its sun to other distances. To find out where
> it will be tomorrow, you could 'move' it (on paper) in little increments
> calculating the forces on it anew for each second, using its new position
> and new forces. You are actually adding up all these effects, second
> after second. But since it is more accurate to consider time as a
> continuum, you really should add up a continuum of miniscule
> effects. That is, you 'integrate' the effects
>
> output: the sum
>
> oh yeah, 'the area under the curve' explanation comes from finding the
> area under a curve by adding up a bunch of rectangular regions (for
> which you know that area=length X width) areas
Okay, I sort of follow al this, but integral outputs a function, right? What's
the different x-values of the function represent? And what would be the point of
finding the average of all points in a planet's orbit? it'd just be the center
of the ellipse
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricy net>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks for the tip :)
What exactly is a Bessel function? And no... I'm not sure about anything
regarding this :)
When I was searching for the integrals (and I'm not that experienced) I was
trying to find ways to simplify the integral I started with into something I
knew what to do with... and I tried to integrate simpler [looking] integrals
which had something in common with the original. integral of: cos( sin(x)
dx was one of the latter.
The other thing I wanted to ask you is where I can find out information
about Gradstein/Ryshik and Abramowitz/Stegun. I'm very much a novice. :)
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks for the tip! :)
I don't know anything about Bessel functions. What are they? And btw, no
I'm not sure about anything regarding this :)
When I was searching for the integrals, (and I'm not very exprienced) I
tried simplifying the integral into something I knew how to deal with. I
also tried to integrate simpler [looking] integrals that had something in
common with the actual integral I wanted to integrate. The integral of
cos( sin(x) ) dx was one of the latter.
The other thing I wanted to ask you is where can I get information about
Gradstein/Ryshik and Abramowitz/Stegun and Runge Kutta? I'm very much a
novice...
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David Fontaine <dav### [at] faricy net> wrote
> Okay, I sort of follow al this, but integral outputs a function, right?
What's
> the different x-values of the function represent?
'x's in the result of an integration usually mean you didn't
actually sum from a specific x value to another specific x, so
you get a formula instead of a definite value for the integral.
The formula then has variables in it which you can use
when you decide where among the x's the 'actual' summing
is to be done.
(Instead of a definite value which you would get if you started at a
definite place and ended at a definite place.)
>
And what would be the point of
> finding the average of all points in a planet's orbit? it'd just be the
center
> of the ellipse
oh no. the average was just one example of an 'integration'. the planet
was another.
Using the planet example, you might say: start the planet "here"
at coordinates x0, y0 going at velocity vx0, vy0. Say the sun is at 0,0.
Then, knowing the planet's position you can calculate the force the
sun has on the planet. From that you figure (using Newton's laws for
example) how the planet's velocity will change. Add that change to
the planet's velocity. That new velocity takes it to a new position.
There at the new position, it'll feel a different gravity force, and change
its velocity again, and move with that new velocity to a new position,
where it feels a different gravity force, and so on, over and over,
tirelessly adding the effects on the planet's position.
But between 'here' and 'there' the gravity is constantly changing your
velocity so you can't just say it will go with a constant velocity from
'here'
to there'. You jump ahead in small steps so the velocity doesn't change
"much" so where you calculate you will end up at the end of a small
time is pretty close to where you will actually end up.
If you make your steps infinitesimally small you can apply theorems and
rules of 'integral calculus' to get the result. And if the equations for the
forces and motion are 'nice' enough, those rules can lead to a
simple formula which might depend on where you start (x0, y0) and
initial velocity (vx0, vy0).
if there are variables in what you are summing, then the integral could
be a function, but if it is summing numbers, no its not much of a function.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I appologise for my last post being here double... I re-typed it later
after getting an error message saying it couldn't post... I posted the
second one and now they're both here. ??? I'm still new at ng posting...
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 20 Jan 2000 08:44:04 -0500 ron### [at] povray org (Ron Parker) wrote:
>I haven't looked at the whole thing yet, but I can tell you that this
>part at least is incorrect. If the front wheels are parallel, their
>axes will never intersect. In fact when you turn, one or both wheels
>will skid just a little.
Ackerman steering is an attempt to compensate for this. I believe all
modern cars (and race cars) have this ability built into their steering
components.
http://www.auto-ware.com/setup/ack_rac.htm
--
Alan - ako### [at] povray org - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 20 Jan 2009 04:50:08 -0800, "cc" <coy### [at] fojar com> wrote:
>Help? Suggestions? Is there a way to approximate these integrals w/o
>iteration?
>
>-Charles
Since I cannot be of great help with your calculus problems
(intergals? Ah yes, but that was two years ago :) ) myay I offer an
alternative solution? As I understand the problem, you don't want to
have to calculate all previous steps when doing an animation. Why
don't you use the file I/O directives to write the current state
(position, linear velocity etc.) of the car and then, in the next
frame, read it and continue your calculations from there? It is a
commonly used technique for doing non-predictable discrete
calculations such as modelling a particle system.
If I haven't understood your problem, please excuse me.
Peter Popov
pet### [at] usa net
ICQ: 15002700
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
So is the integral of sin(x) the area between the x-axis and sin(x) between x=0
and x=x?
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricy net>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
cc wrote:
> I don't know anything about Bessel functions. What are they? And btw, no
> I'm not sure about anything regarding this :)
They are a sort of special functions. One obtains them either as
solutions of the wave equation in polar coordinates or as integrals
(hard ones, which cannot expressed by using only those functions
which are taught at school).
> When I was searching for the integrals, (and I'm not very exprienced) I
> tried simplifying the integral into something I knew how to deal with. I
This can't work -- if it were possible, there were no need to
invent special functions.
> The other thing I wanted to ask you is where can I get information about
> Gradstein/Ryshik and Abramowitz/Stegun and Runge Kutta? I'm very much a
The first is probably the most famous table of integrals and related
stuff, the other a collection of mainly definitions with an emphasis
on correctness (the less-used special functions are sometimes defined
by different specialists with different factors in front of them,
A/S tries to straighten this out). Both are probably useless unless
one is a mathematician, engineer or scientist.
I still believe that differentiation is better suited to your
problem than integration for the following reasons:
1. Even if you manage the integrals, you would have to compute
the Bessel functions (or whatever) numerically. This either
requires hacking the whole Netlib into POV (which would be a
nice idea, btw. -- it would give a cool gnuplot replacement :-)
) or doing them slowly using #macro.
2. If you do it by integration, you input a strategy (steering
and speed) and get some curve of the car. Since you probably
want the curve to be where the street is, you have to use
trial and error. The other way around, you just describe the
street by a mathematical expression, and get the steering
by some derivatives.
Ralf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 21 Jan 2000 15:53:04 -0600, David Fontaine <dav### [at] faricy net>
wrote:
>So is the integral of sin(x) the area between the x-axis and sin(x) between x=0
>and x=x?
The integral of sin(x) (with respect to x :) ) is -cos(x). This is the
general form. In order to evaluate it for a particular range of x, or
in your case to find the area enclosed by the sine function and some
segment of the +x axis, you need to calculate the integral for that
range. Say the range is (a,b) then the integral evaluates to
-cos(b)-(-cos(a)) or cos(a)-cos(b). Of course this may give 0 as a
result and even though it represents an area this should not surprise
you because the part of the curve below the x axis is weighted
negatively.
Peter Popov
pet### [at] usa net
ICQ: 15002700
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
An easy way to look at the problem might be to use a simple spiral with the
radius as a direct function of the turned angle. Dead simple to calculate.
Ralf Muschall <rmu### [at] t-online de> wrote in message
news:388### [at] t-online de...
> cc wrote:
>
> > I don't know anything about Bessel functions. What are they? And btw,
no
> > I'm not sure about anything regarding this :)
>
> They are a sort of special functions. One obtains them either as
> solutions of the wave equation in polar coordinates or as integrals
> (hard ones, which cannot expressed by using only those functions
> which are taught at school).
>
> > When I was searching for the integrals, (and I'm not very exprienced) I
> > tried simplifying the integral into something I knew how to deal with.
I
>
> This can't work -- if it were possible, there were no need to
> invent special functions.
>
> > The other thing I wanted to ask you is where can I get information about
> > Gradstein/Ryshik and Abramowitz/Stegun and Runge Kutta? I'm very much a
>
> The first is probably the most famous table of integrals and related
> stuff, the other a collection of mainly definitions with an emphasis
> on correctness (the less-used special functions are sometimes defined
> by different specialists with different factors in front of them,
> A/S tries to straighten this out). Both are probably useless unless
> one is a mathematician, engineer or scientist.
>
> I still believe that differentiation is better suited to your
> problem than integration for the following reasons:
>
> 1. Even if you manage the integrals, you would have to compute
> the Bessel functions (or whatever) numerically. This either
> requires hacking the whole Netlib into POV (which would be a
> nice idea, btw. -- it would give a cool gnuplot replacement :-)
> ) or doing them slowly using #macro.
> 2. If you do it by integration, you input a strategy (steering
> and speed) and get some curve of the car. Since you probably
> want the curve to be where the street is, you have to use
> trial and error. The other way around, you just describe the
> street by a mathematical expression, and get the steering
> by some derivatives.
>
> Ralf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Peter Popov wrote in message ...
>alternative solution? As I understand the problem, you don't want to
>have to calculate all previous steps when doing an animation. Why
>don't you use the file I/O directives to write the current state
>(position, linear velocity etc.) of the car and then, in the next
>frame, read it and continue your calculations from there? It is a
Actually I already do have a system which works pretty well for the final
animation, although it doesn't work on a frame-by-frame basis. I run a pov
file which reads the motion script and calculates through the motions of the
car from start to finish. For every motion segment in the motion script,
the starting position-data of the car is recorded into a file. For final
rendering, only one motion segment (or partial segment) needs to be
calculated per frame. This is more calculation per frame than it'd be to
save data per frame, true.
Ultimately both systems have trouble when doing trial and error test frame
renders (and Ralf Muschall correctly pointed out that this is something I
currently have to do). I usually add a little bit to the end of the motion
script I'm editing and then render the final frame. One of the next things
I plan on doing is making a modification of my current system that doesn't
need to precalculate the entire sequence of motions, and which doesn't need
them in any particular order... I.e. the new system would record relative
positon data for any given initial-speed, initial-steering-angle,
speed-delta and steering-angle-delta, but Wouldn't record initial car
orientation or position for each segment. I'm thinking this should work
well for testing... the other would work better for final rendering... er um
parsing speed.
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This is true... Yes I have made animations where the road follows the car
instead of the usual car-follows-the-road situation. :) And yes I have
been having to do trial and error if I want the car to follow the road.
Trial and error is what I'm trying to make easier... faster. I like your
idea of differentiating from a pre-defined path... Really turns the problem
around. :) I'd still like to figure out how to control the car directly in
a clean, sybolic way if possible (as oppposed to numeric approximations,
Riemann (sp?) sums etc.) (I'm ignoring floating point roundoff) When you
say I "would have to compute the Bessel functions (or whatever)
numerically," do you mean something like for example taking a sum of some
formula as n goes from 1 to something aribitrarily large? Anyway it's
starting to sound doubtful that it can reasonably be done symbolically... or
maybe I should say, not without inventing some new symbols... something to
go along with the trig functions etc?...
-Charles
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
cc wrote:
> say I "would have to compute the Bessel functions (or whatever)
> numerically," do you mean something like for example taking a sum of some
> formula as n goes from 1 to something aribitrarily large? Anyway it's
Yes, someting like that. The zeroth Bessel function is like cos,
just the factorials in the denominator are squared, and the
powers are taken from x^2/4 instead of x. But usually one uses
a more complicated, but faster and preciser formula (which is
different for different values of the argument).
A pointer to a numerics site (which is considered doubtful
by professionals, but good enough for simple stuff) can be found
near the bottom of http://math.jpl.nasa.gov/nr/nr.html .
Ralf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi,
i've found a cool homepage with many links about (physics) simulation.
http://members.nbci.com/Kourdakov/Links/mathematics_links.htm
There are also some links to homepages about car physics.
Bye
Paul
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I dont know about anyone else, but you're writing from the distant
future, 2009 to be precise... How come?
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"cc" <coy### [at] fojar com> wrote in news:388702d1@news.povray.org
[...]
I guess that this post will stay on top of list until 2009 :) ?
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <Xns### [at] 204 213 191 226>, "Rafal 'Raf256' Maj"
<raf### [at] raf256 com> wrote:
> I guess that this post will stay on top of list until 2009 :) ?
No, just in your misconfigured or broken newsreader. Turn off receiving of
_all_ messages, the unsubscribe to the group and subscribe again such that
your newsreader does not get a list of _all_ messages.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tim Nikias" <tim### [at] gmx de> wrote in news:3d3c5e2d@news.povray.org
> I dont know about anyone else, but you're writing from the distant
> future, 2009 to be precise... How come?
the power of Pov-RAY ;)
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Jan 2009 21:22:46 -0800, cc wrote:
> This is true... Yes I have made animations where the road follows the car
> instead of the usual car-follows-the-road situation. :) And yes I have
> been having to do trial and error if I want the car to follow the road.
> Trial and error is what I'm trying to make easier... faster. I like your
> idea of differentiating from a pre-defined path... Really turns the problem
> around. :) I'd still like to figure out how to control the car directly in
> a clean, sybolic way if possible (as oppposed to numeric approximations,
> Riemann (sp?) sums etc.) (I'm ignoring floating point roundoff) When you
> say I "would have to compute the Bessel functions (or whatever)
> numerically," do you mean something like for example taking a sum of some
> formula as n goes from 1 to something aribitrarily large? Anyway it's
> starting to sound doubtful that it can reasonably be done symbolically... or
> maybe I should say, not without inventing some new symbols... something to
> go along with the trig functions etc?...
>
> -Charles
Charles, please fix your clock! :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 20 Jan 2009 07:50:08 -0500, cc wrote:
> 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.
If I were actually designing a simulation of car motion for car company
and wanted to earn my keep I would certainly use as complex an approach
as this so I could determine lateral strain on struts and tires.
However just to povray it ...
> ************************************************************************
>
> In the spirit of clean mathematical models, I really want to do each
> motion segment in one step using calculus.
...
> 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?
... is this not a bit on the side of overkill? Assume the front tires
turn exactly in sync and the rear wheels do not affect the resultant
motion and the problem is down to rather simple analytic geometry.
I don't mean to try to talk you out of an interesting problem but I
doubt anything you are talking about is going to improve the realism of
the motion in the least.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 23 May 2003 03:08:20 -0400, simian wrote:
> On Tue, 20 Jan 2009 07:50:08 -0500, cc wrote:
>
>> 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.
>
> If I were actually designing a simulation of car motion for car company
> and wanted to earn my keep I would certainly use as complex an approach
> as this so I could determine lateral strain on struts and tires.
>
> However just to povray it ...
>
>> ************************************************************************
>>
>> In the spirit of clean mathematical models, I really want to do each
>> motion segment in one step using calculus.
>
> ...
>
>> 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?
>
> ... is this not a bit on the side of overkill? Assume the front tires
> turn exactly in sync and the rear wheels do not affect the resultant
> motion and the problem is down to rather simple analytic geometry.
>
> I don't mean to try to talk you out of an interesting problem but I
> doubt anything you are talking about is going to improve the realism of
> the motion in the least.
A little while ago, I checked the date on the first replies to this thread
and IIRC, the actual date was 1998! Looks like CC has created an effective
P.B.A-U weed by setting his clock ahead a decade... -_- No offense simian,
I did the very same thing a little while ago. ;-)
--
light_source#macro G(E)sphere{z+E*y*5e-3.04rotate-z*E*6pigment{rgbt#end{
20*y-10#local n=162;1}#while(n)#local n=n-.3;G(n)x}}G(-n).7}}#end//GregE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |