POV-Ray : Newsgroups : povray.animations : simple kinematic : Re: simple kinematic Server Time
25 Apr 2024 04:09:18 EDT (-0400)
  Re: simple kinematic  
From: CAD-Andi
Date: 11 Feb 2014 10:35:02
Message: <web.52fa41b5493122f9ec12b4220@news.povray.org>
"Jeff Reifel" <jef### [at] rocketmailcom> wrote:

> I played around with your problem and came up with this. It might need some fine
> tunning.

Thank you Jeff! Thank you so much for the code! Nothing is worst for me than to
start out with an absolute empty page without anything on it. With the help of
you kickstarting me I might just get to a solution for my problem.

You were right, it might need some "tweaking" :-) I'm a very visual oriented
person and a look at the finished rendered anim made it very easy for me to
follow your code: In simple words you used the clock and set values (Truck 1.5,
and Trailer 0.5) to "look into the future" and "anticipate" the angle of turning
by calculating the angle of the line between now and then (two points) and the
current tangent trajectory. You made the hinge point move on the spline and used
the "delayed" reaction of the trailer to create the "illusion" of the trailer
"following" the truck. ... Very clever and simple approach!

In "theory" I have a solution for my problem, But I'm missing one important
example. How to calculate an intersection point of a circle-arc with a spline in
POVRay. Is this possible? If not, then there is no need to read further on,
because my Idea is based on this. Please someone let me know.

For my purpose I come to the realization that I will have to work with 2
splines. One for the Tractor and one for the Trailer. The geometry of these
splines will be determined by external software. There is one key calculation
that I need to accomplish to pull this off. I must know how to calculate an
intersection point of a circle-arc (or sphere segment) with a spline in POVRay.

There will be two arcs. One for the Tractor and one for the Trailer. I imagine a
point moving along the Truck spline. This is the point between the front wheels.
I need to figure out the position of the 5th wheel on the spline. I plan on
doing this by getting the coordinates of the intersection of the spline with an
circular arc of lets say +/- 45 deg with the radius equal to the distance
between the front axis point to the 5th wheel. That will determine my two vector
points for the tractor orientation. (I plan on using the arc instead of the full
circle to avoid getting multiple results.)

Next I do exactly the same with the distance between that 5th wheel point and
the center between my rear trailer wheels for the second arc radius,
intersecting it with my rear trailer path spline. That will give me the vector
for the Trailer orientation.

I can (and have) simulated that in CAD, but I need to get this done in POVRay to
save me from doing it all "by hand" point by point. This would also allow me to
use the distance of my first spline nodes for determining the speed of my truck.

Sorry for this long post, but I just don't know how to express what I need to
accomplish using less words.

Thanks for all your help!

Andi


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.