POV-Ray : Newsgroups : povray.general : Mixing transformations Server Time
30 Jul 2024 20:27:10 EDT (-0400)
  Mixing transformations (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Alain
Subject: Re: Mixing transformations
Date: 4 Nov 2008 21:54:38
Message: <49110aee$1@news.povray.org>
HelveticaFanatic nous illumina en ce 2008-11-03 23:14 -->

> My situation is different.
> http://www.flickr.com/photos/helveticafanatic/3001878662/
> 
> I use the spline to define the center line of the tracks. I have used
> Spline_Trans to get banking which successfully rotates the train car properly.
> I want, however, to not have the center of the train over the curve but the two
> points where the bogies of the train are. Furthermore, the banking of these two
> points must factor into the banking of the train.
> 
> Thanks.
> 
> 
It may not be exactly what you are looking, or physicaly acurate, but her's my 
proposition:
Take the banking at the point where the two boggies are locates. Take the 
average of those and apply to the wagon.

I think that it should be "close enough".

-- 
Alain
-------------------------------------------------
If you're ever about to be mugged by a couple of clowns, don't hesitate - go for 
the juggler.


Post a reply to this message

From: HelveticaFanatic
Subject: Re: Mixing transformations
Date: 5 Nov 2008 02:30:01
Message: <web.49114af1e475a2ad63216ea70@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> HelveticaFanatic wrote:
> > Jim Charter <jrc### [at] msncom> wrote:
> >
> >>HelveticaFanatic wrote:
> >>
> >>>Jim Charter <jrc### [at] msncom> wrote:
> >>>
> >>>
> >>>>HelveticaFanatic wrote:
> >>>>
> >>>>
> >>>>>I am modeling trains using Spline_Trans. Is there a way to average out the
> >>>>>points above each wheel set to get a position for the train so that it still
> >>>>>has the banking from Spline_Trans but shift over the side of the track so that
> >>>>>the wheels are above the tracks? Thanks.
> >>>>>
> >>>>>
> >>>>
> >>>>If I am understanding what you want, you can take points from along the
> >>>>spline on either side of a given point, together with the root point you
> >>>>can then use cross product (vcross(A,B) see the docs) to approximate a
> >>>>normal which which would reflect the banking of the spline.  You would
> >>>>'normalize it of course and then multiply by the radius of your wheel to
> >>>>get the level where the axle would be.  If you don't quite understand
> >>>>what I mean, I would suggest you research what cross product is and work
> >>>>backward from there to a solution.
> >>>>
> >>>>-Jim
> >>>
> >>>
> >>>I think that this is just regular banking (I use Spline_Trans for that now). I
> >>>need to simulate a train where there are two wheel sets on the track. I need to
> >>>take the Spline_Trans translation and rotation for each wheel set to determine
> >>>the position of the train (the center point of the train of course will not be
> >>>over the center of the track, only the centers of the bogies). I want to carry
> >>>over the bank angle and make the train actually fit over the curve.
> >>>
> >>>
> >>
> >>Yes, see my other response.  With that code snip I showed you, you
> >>should be able to contrive an answer to your needs. It utilizes the same
> >>macro that you would use to position an object along the spline,
> >>including what ever bank settings you use, to predict where any point
> >>would also be relative to the spline also. It strikes me that there is
> >>no one way to organize this though.  For instance, what do you what the
> >>spline to actually define?  The center line between the two rails?  Once
> >>you arrive at that definition, the rest should follow.
> >
> >
> > This was for a point on each side of the train (the left and right side, thin
> > axis).
> >
> > My situation is different.
> > http://www.flickr.com/photos/helveticafanatic/3001878662/
> >
> > I use the spline to define the center line of the tracks. I have used
> > Spline_Trans to get banking which successfully rotates the train car properly.
> > I want, however, to not have the center of the train over the curve but the two
> > points where the bogies of the train are. Furthermore, the banking of these two
> > points must factor into the banking of the train.
> >
> > Thanks.
> >
> >
> Okay, now that I see what you are after I would suggest to you that you
> may probably not have even been successful transforming the train car
> body in the general case, never mind the wheel carriages, or how the
> train car would bridge between a foreward and rearward wheel carriage on
> a banked curve.  If you do more extensive testing you may see that
> Spline_Trans cannot solve some basic issues with rotational transforms
> in 3 dimensions which involve that ORDER OF ROTATON matters.  It is
> often necessary to do the rotation in two steps, creating an
> intermediate axis in one plane using Reorient_Trans before using
> Spline_Trans.  I think you need to do a lot more testing.
>
> To answer the specific question about the lateral banking of the car
> body bridging a curve, you would have to know something about the actual
> engineering of train cars, but in a vacuum, I would go with this:
>
> At the center point for each wheel carriage, (single, tandem, bogie,
> whatever), forward and rearward, you can establish the direction of the
> banked (originally vertical) normal. Along these two directions you
> would have two points at different 'heigths.'  You take the bridging
> lines between these points at the two heights.  The halfway points of
> these bridging lines, when joined, would then give the average bank that
> could be used for the train car.  This would DIFFER from the bank at the
> halfway point along the spline.

Bad news: you lost me at order of rotation.

Good news: to simple solution to my problems: find the point for each bogie,
average it to find the center point of the train, find the center point along
the spline, and create a simple translate. The banking carries through! No
isssues with curves on slopes as I was careful to not design curves on slopes.

Problem solved!


Post a reply to this message

From: HelveticaFanatic
Subject: Re: Mixing transformations
Date: 5 Nov 2008 02:30:01
Message: <web.49114b4ae475a2ad63216ea70@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> HelveticaFanatic nous illumina en ce 2008-11-03 23:14 -->
>
> > My situation is different.
> > http://www.flickr.com/photos/helveticafanatic/3001878662/
> >
> > I use the spline to define the center line of the tracks. I have used
> > Spline_Trans to get banking which successfully rotates the train car properly.
> > I want, however, to not have the center of the train over the curve but the two
> > points where the bogies of the train are. Furthermore, the banking of these two
> > points must factor into the banking of the train.
> >
> > Thanks.
> >
> >
> It may not be exactly what you are looking, or physicaly acurate, but her's my
> proposition:
> Take the banking at the point where the two boggies are locates. Take the
> average of those and apply to the wagon.
>
> I think that it should be "close enough".
>
> --
> Alain
> -------------------------------------------------
> If you're ever about to be mugged by a couple of clowns, don't hesitate - go for
> the juggler.

I was really interested in moving the car over and keeping the banking, so I
just thought of it awhile ago and tried averaging the midpoint of the bogies
and creating a transform to move the train onto it. Now the train has run into
the wall of the tunnel (too tight of a radius :( )


Post a reply to this message

From: Jim Charter
Subject: Re: Mixing transformations
Date: 5 Nov 2008 23:36:43
Message: <4912745b$1@news.povray.org>
HelveticaFanatic wrote:
> Jim Charter <jrc### [at] msncom> wrote:
> 
>>HelveticaFanatic wrote:
>>
>>>Jim Charter <jrc### [at] msncom> wrote:
>>>
>>>
>>>>HelveticaFanatic wrote:
>>>>
>>>>
>>>>>Jim Charter <jrc### [at] msncom> wrote:
>>>>>
>>>>>
>>>>>
>>>>>>HelveticaFanatic wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I am modeling trains using Spline_Trans. Is there a way to average out the
>>>>>>>points above each wheel set to get a position for the train so that it still
>>>>>>>has the banking from Spline_Trans but shift over the side of the track so that
>>>>>>>the wheels are above the tracks? Thanks.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>If I am understanding what you want, you can take points from along the
>>>>>>spline on either side of a given point, together with the root point you
>>>>>>can then use cross product (vcross(A,B) see the docs) to approximate a
>>>>>>normal which which would reflect the banking of the spline.  You would
>>>>>>'normalize it of course and then multiply by the radius of your wheel to
>>>>>>get the level where the axle would be.  If you don't quite understand
>>>>>>what I mean, I would suggest you research what cross product is and work
>>>>>>backward from there to a solution.
>>>>>>
>>>>>>-Jim
>>>>>
>>>>>
>>>>>I think that this is just regular banking (I use Spline_Trans for that now). I
>>>>>need to simulate a train where there are two wheel sets on the track. I need to
>>>>>take the Spline_Trans translation and rotation for each wheel set to determine
>>>>>the position of the train (the center point of the train of course will not be
>>>>>over the center of the track, only the centers of the bogies). I want to carry
>>>>>over the bank angle and make the train actually fit over the curve.
>>>>>
>>>>>
>>>>
>>>>Yes, see my other response.  With that code snip I showed you, you
>>>>should be able to contrive an answer to your needs. It utilizes the same
>>>>macro that you would use to position an object along the spline,
>>>>including what ever bank settings you use, to predict where any point
>>>>would also be relative to the spline also. It strikes me that there is
>>>>no one way to organize this though.  For instance, what do you what the
>>>>spline to actually define?  The center line between the two rails?  Once
>>>>you arrive at that definition, the rest should follow.
>>>
>>>
>>>This was for a point on each side of the train (the left and right side, thin
>>>axis).
>>>
>>>My situation is different.
>>>http://www.flickr.com/photos/helveticafanatic/3001878662/
>>>
>>>I use the spline to define the center line of the tracks. I have used
>>>Spline_Trans to get banking which successfully rotates the train car properly.
>>>I want, however, to not have the center of the train over the curve but the two
>>>points where the bogies of the train are. Furthermore, the banking of these two
>>>points must factor into the banking of the train.
>>>
>>>Thanks.
>>>
>>>
>>
>>Okay, now that I see what you are after I would suggest to you that you
>>may probably not have even been successful transforming the train car
>>body in the general case, never mind the wheel carriages, or how the
>>train car would bridge between a foreward and rearward wheel carriage on
>>a banked curve.  If you do more extensive testing you may see that
>>Spline_Trans cannot solve some basic issues with rotational transforms
>>in 3 dimensions which involve that ORDER OF ROTATON matters.  It is
>>often necessary to do the rotation in two steps, creating an
>>intermediate axis in one plane using Reorient_Trans before using
>>Spline_Trans.  I think you need to do a lot more testing.
>>
>>To answer the specific question about the lateral banking of the car
>>body bridging a curve, you would have to know something about the actual
>>engineering of train cars, but in a vacuum, I would go with this:
>>
>>At the center point for each wheel carriage, (single, tandem, bogie,
>>whatever), forward and rearward, you can establish the direction of the
>>banked (originally vertical) normal. Along these two directions you
>>would have two points at different 'heigths.'  You take the bridging
>>lines between these points at the two heights.  The halfway points of
>>these bridging lines, when joined, would then give the average bank that
>>could be used for the train car.  This would DIFFER from the bank at the
>>halfway point along the spline.
> 
> 
> Bad news: you lost me at order of rotation.
> 
> Good news: to simple solution to my problems: find the point for each bogie,
> average it to find the center point of the train, find the center point along
> the spline, and create a simple translate. The banking carries through! No
> isssues with curves on slopes as I was careful to not design curves on slopes.
> 
> Problem solved!
> 
> 
Your welcome


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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