POV-Ray : Newsgroups : povray.off-topic : Urk.. This is why I hate complex math... Server Time
31 Oct 2024 23:27:51 EDT (-0400)
  Urk.. This is why I hate complex math... (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Patrick Elliott
Subject: Urk.. This is why I hate complex math...
Date: 26 Aug 2012 16:53:15
Message: <503a8cbb$1@news.povray.org>
I am looking at a situation in the future where I plan to simulate an 
entire area that is rotating, like a big drum. This will be done by 
simply having the wall texture on the entire outer surface drift, as 
though its spinning. But, I also want to place a suspended rail tram in 
there, and have it react (sadly, due to the limits of the system, only 
with one angle, since I can't have more than one pivot point), as though 
its being effected by the rotation, as well as its changes in momentum. 
I am presuming that the math for this has to be:

http://www.myphysicslab.com/pendulum_cart.html#navsite

But.. then I run into a problem... Basically, I am not sure what the 
frak is going on there...

Biggest issue is, there is a lot of stuff in it that won't help me. 
Friction.. Well, no, the cart isn't going to be controlled via "forces", 
its running a plotted course, so half the stuff in the "force of the 
cart" part is just flat out meaningless. Then there is the fact that my 
force calculations need to be only the force that its being applied "at 
that moment" in one direction, two 3D vectors. That one is going to give 
me issues, as it is. But, maybe I can direct substitute it in as F, or 
something. Do I assume the cart mass itself is 0? Why can't there ever 
be a simple, "Someone did this once, for a very similar situation, so 
here is the math, and all you need to do in integrate the other rotation 
thing you are doing." You know, instead of googling, and getting page 
after page of descriptions, without math, of the things, or articles on 
control systems, without math, for them, or just about anything other 
than an explanation of how the frak it works in a real world, 3D 
situation. lol

At the very least, some idea what I can/should do to cut extraneous data 
out of the equations I do have, would be helpful. I am just real glad 
the "pendulum" is going to be "one directional" just like the example, 
and not with two axis of rotation, like.. a lot of them have.


Post a reply to this message

From: waggy
Subject: Re: Urk.. This is why I hate complex math...
Date: 26 Aug 2012 21:20:01
Message: <web.503aca99af4d86e69726a3c10@news.povray.org>
Patrick Elliott wrote:
> I am looking at a situation in the future where I plan to simulate an
> entire area that is rotating, like a big drum. This will be done by
> simply having the wall texture on the entire outer surface drift, as
> though its spinning. But, I also want to place a suspended rail tram in
> there, and have it react (sadly, due to the limits of the system, only
> with one angle, since I can't have more than one pivot point), as though
> its being effected by the rotation, as well as its changes in momentum.
> I am presuming that the math for this has to be:
>
> http://www.myphysicslab.com/pendulum_cart.html#navsite
>
> But.. then I run into a problem... Basically, I am not sure what the
> frak is going on there...
>
It looks to me like you might have a modelling problem to figure out first. Are
you talking about something like the following, with the track attached to the
inside of a rotating drum instead of the surface of the earth? Is there any
actual gravity?

http://www.nycsubway.org/wiki/Wuppertal,_Germany

The important thing here is whether the tram swings in the direction of its
motion (as in your link), or whether it only swings significantly from
side-to-side (as in the link I posted).

> Biggest issue is, there is a lot of stuff in it that won't help me.
> Friction.. Well, no, the cart isn't going to be controlled via "forces",
> its running a plotted course, so half the stuff in the "force of the
> cart" part is just flat out meaningless. Then there is the fact that my
> force calculations need to be only the force that its being applied "at
> that moment" in one direction, two 3D vectors. That one is going to give
> me issues, as it is. But, maybe I can direct substitute it in as F, or
> something. Do I assume the cart mass itself is 0?

If I have managed to get the gist of what what you're modelling, you might be
able to reduce your system to a single degree of freedom, vastly simplifying the
math. (Sort of, you would only need to solve for one unknown.)

> Why can't there ever
> be a simple, "Someone did this once, for a very similar situation, so
> here is the math, and all you need to do in integrate the other rotation
> thing you are doing." You know, instead of googling, and getting page
> after page of descriptions, without math, of the things, or articles on
> control systems, without math, for them, or just about anything other
> than an explanation of how the frak it works in a real world, 3D
> situation. lol
>
I'm completely with you here. I do whacky math for a living, and it is
tremendously difficult to find out if someone else has solved a problem I'm
doing. Not only would I like to check my work, I also need to properly cite the
original author if I end up publishing something about it.

> At the very least, some idea what I can/should do to cut extraneous data
> out of the equations I do have, would be helpful. I am just real glad
> the "pendulum" is going to be "one directional" just like the example,
> and not with two axis of rotation, like.. a lot of them have.

If I'm on the right track here, I personally wouldn't use either of the
approaches in the link you posted. What makes your problem quite different from
what thousands of mathmaticians, physicists, and engineers have solved countless
times over the years is the rotating coordinate system inside the drum. Plus,
the local coordinate system of the tram is varying along its (rotating) path.

However, I'm still not certain if I'm thinking about the same problem you are.
Are you trying to come up with an exact symbolic solution, perhaps so you can
design a control system? Or, do you just need a reasonable numerical
approximation, perhaps just for animation?


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Urk.. This is why I hate complex math...
Date: 27 Aug 2012 06:26:06
Message: <503b4b3e$1@news.povray.org>
I quite enjoyed complex math - you know, once I wrapped my head around 
the whole "i = sqrt(-1)" thing...


Post a reply to this message

From: Warp
Subject: Re: Urk.. This is why I hate complex math...
Date: 27 Aug 2012 08:06:44
Message: <503b62d3@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> I quite enjoyed complex math - you know, once I wrapped my head around 
> the whole "i = sqrt(-1)" thing...

Trying to visualize in your head how spacetime works around a massive
object according to general relativity, and why objects moving at
different speeds traverse through the trajectories as they do, and
finally getting a grasp of it, is quite enlightening.

-- 
                                                          - Warp


Post a reply to this message

From: waggy
Subject: Re: Urk.. This is why I hate complex math...
Date: 27 Aug 2012 12:55:01
Message: <web.503ba5e4af4d86e69726a3c10@news.povray.org>
Orchid Win7 v1 wrote:
> I quite enjoyed complex math - you know, once I wrapped my head around
> the whole "i = sqrt(-1)" thing...

If you like complex math, you might love the multicomplex algebras I've been
working with lately.

http://russell.ae.utexas.edu/FinalPublications/ConferencePapers/2010Feb_SanDiego_AAS-10-218_mulicomplex.pdf


Post a reply to this message

From: Patrick Elliott
Subject: Re: Urk.. This is why I hate complex math...
Date: 27 Aug 2012 18:01:46
Message: <503bee4a$1@news.povray.org>
On 8/26/2012 6:17 PM, waggy wrote:
> However, I'm still not certain if I'm thinking about the same problem you are.
> Are you trying to come up with an exact symbolic solution, perhaps so you can
> design a control system? Or, do you just need a reasonable numerical
> approximation, perhaps just for animation?
>

Hmm. First, its for simulation. I want to create the illusion that a 
large underground complex was built, and by large I mean "really large", 
and it is rotating around a center, and someone built a tram system in 
it. So, no, this isn't real world, its entirely simulated, and won't 
even be using real phsyics (hell if it was, I wouldn't need to compute 
all this myself.. They don't even have a "curve" based movement system, 
you can feed in the "rotation" and "location" data now, to define where 
something should be at each point, but you have to "precompute" the 
results. Hell, I have an experimental system that does that already, 
using a curve that "fits" the control points, it just uses more script 
resources to do it, so causes more lag in the simulator. Apparently, 
basic curve math is either too confusing for them, or they actually 
think it makes sense to waste script memory storing 500 data points, and 
the needed rotations, instead of computing them for you. Though, I 
admit, the one hickup I have been still trying to work out why my 
version is taking the last point, and the next, and figuring out what 
the proper change in rotation needed to be. I don't remember if I ever 
actually figured that one out...

To clarify how the thing needs to work though, lets set this up. Imagine 
a huge "platform", say 250 meters each direction. This platform is 
rotating around its center. The "track" is set up on this rotating 
platform. The tram itself is suspended from a single rail, and due to 
the limitations of the kinematics in the system I am using, it ***can't 
have*** more than one direction of movement, or at least not if its like 
the image you linked, which is an actual car design. If it was set up 
as, say, a two seated thing, this would be different, since there would 
only be one point of suspension. For my case, I have two attachment 
points, and since I can't hinge any other points, its limited to side to 
side movement, as you describe.

So, what I am looking for is the angle that the pendulum has swung to, 
depending on the "external" motion of the platform, as it applies to the 
side to side motion, and the motion induced by turns taken by the tram. 
Changes in forward motion, such as slowing down and speeding up, won't 
have an effect, in principle. In fact, I don't think it has an effect at 
all, since the only thing it could do is counter the motion of the 
centrifugal forces, or increase them, in the forward direction, and 
since there is no rotation in that direction...

Now.. Functions available -

I have vectors, so all the "math" can be handled without having to 
monkey too much with non-matrix math, unless I have to. Its also easier 
to leave things as they are, since its using quaternions.

I can get the location of the tram, at that time, its rotation, as well 
as computing:

Rotation to Axis: VectorNormal(a.x,a.y,a.z) * (1 | -(a.s <0))

Rotation to Angle: ACos(Abs(a.s)) / Sqrt(a.x^2 + a.y^2 + a.z^2 + a.s^2)) * 2

Axis Angle to Rotation: axis = VectorNormal(axis) * Sin( angle / 2) 
{returns- axis & Cos(angle/2)

Rotation to Left: VectorNormal(<0, 1, 0> * q)

Rotation to Forward: VectorNormal(<1, 0, 0> * q)

Rotation to Up: VectorNormal(<0, 0, 1> * q)

Vector Normal

Angle Between: 2 * ACos((a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) 
/ Sqrt((a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s) * (b.x * b.x + 
b.y * b.y + b.z * b.z + b.s * b.s)))

Rotation Between: Umm. Complication and not a single equation. It also 
bugs out, if the rotations are nearly opposite of each other.

It might be nice to also have the math for something that actually can 
wobble in more than one axis, on the off chance a short "point to point" 
zip line like thing was needed some place, but that isn't something I 
had planned for, and I could live without it.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Urk.. This is why I hate complex math...
Date: 2 Sep 2012 20:30:51
Message: <5043fa3b@news.povray.org>
So.. guess I am trying to work this out myself after all. lol


Post a reply to this message

From: scott
Subject: Re: Urk.. This is why I hate complex math...
Date: 5 Sep 2012 04:49:35
Message: <5047121f$1@news.povray.org>
> So.. guess I am trying to work this out myself after all. lol

So what you're saying is the following are known:
Position and velocity of the top of the train over time (following a 
pre-determined track at a pre-determined speed), call this point A.
Angular speed of the platform (but that will be taken into account in 
point A, as presumably the whole track and train are rotating with the 
platform)

And you want to find out how much the train swings sideways as point A 
goes around this track?

I assume you're doing this at discrete time steps and just want a 
solution to the current time step based on the data from the previous step?

In that case why not just model it as a point mass at B connected by a 
suitably stiff spring to point A? Keep track of the position and 
velocity of B and you can use normal numerical integration to update B 
(there will be a gravity force and a spring force towards A). In your 
graphics you can use the angle between the vertical and the line A-->B 
to draw your train.

It may not be 100% physically accurate but much simpler than trying to 
work through all the maths related to dynamics in a rotating reference 
frame...


Post a reply to this message

From: scott
Subject: Re: Urk.. This is why I hate complex math...
Date: 5 Sep 2012 04:59:58
Message: <5047148e$1@news.povray.org>
On Mon 27/08/12 23:01, Patrick Elliott wrote:
> Changes in forward motion, such as slowing down and speeding up, won't
> have an effect, in principle.

Won't speeding up and slowing down make the train swing out more or 
less? (Like going round a corner in a car, if you speed up it rolls more).

In a rotating reference frame you'd be essentially turning even when on 
a straight piece of track, so I would not say that changes in forward 
motion won't have any effect.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Urk.. This is why I hate complex math...
Date: 5 Sep 2012 15:14:52
Message: <5047a4ac$1@news.povray.org>
On 9/5/2012 1:49 AM, scott wrote:
>> So.. guess I am trying to work this out myself after all. lol
>
> So what you're saying is the following are known:
> Position and velocity of the top of the train over time (following a
> pre-determined track at a pre-determined speed), call this point A.
> Angular speed of the platform (but that will be taken into account in
> point A, as presumably the whole track and train are rotating with the
> platform)
>
> And you want to find out how much the train swings sideways as point A
> goes around this track?
>
> I assume you're doing this at discrete time steps and just want a
> solution to the current time step based on the data from the previous step?
>
> In that case why not just model it as a point mass at B connected by a
> suitably stiff spring to point A? Keep track of the position and
> velocity of B and you can use normal numerical integration to update B
> (there will be a gravity force and a spring force towards A). In your
> graphics you can use the angle between the vertical and the line A-->B
> to draw your train.
>
> It may not be 100% physically accurate but much simpler than trying to
> work through all the maths related to dynamics in a rotating reference
> frame...
Uh, yeah, so how do you do that? lol Seriously, the closest I have come 
to differentials is a book promising to take you from basic math up to 
basic calculus, and I got lost like 3/4 of the way through it. :p But, 
yeah, it sounds good...


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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