POV-Ray : Newsgroups : povray.advanced-users : Collision with energy loss Server Time
29 Jul 2024 14:14:05 EDT (-0400)
  Collision with energy loss (Message 12 to 21 of 21)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Anders K 
Subject: Re: Sliding / flowing
Date: 27 May 2002 11:52:47
Message: <3cf2564f$1@news.povray.org>
There's more to bouncing than just a simple decrease in vertical/horizontal
speed. In the case of a ball, for example, bouncing also gives the ball a
rotation (if the collision angle isn't 90 degrees). When the ball stops
bouncing, the ball's rotational momentum keeps it rolling.

Anders

--
light_source{6#local D=#macro B(E)#macro A(D)#declare E=(E-#declare
C=mod(E D);C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(
C>2)}torus{1..2clipped_by{box{-2y}}rotate<1 0C>*90translate<D+1A(2)
*2+1#else}cylinder{0(C-v=1).2translate<D+C*A(2)A(4)#end-2 13>finish
{specular 1}pigment{rgb x}#end#end#end-8;1B(445000298)B(519053970)B
(483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}


Post a reply to this message

From: TinCanMan
Subject: Re: Collision with energy loss
Date: 27 May 2002 11:53:30
Message: <3cf2567a$1@news.povray.org>
> Energy can't be perpendicular to anything, because it isn't a vector.
> What you mean is velocity.
>
> The reason why a ball loses energy is because of friction inside it, and
> the amount of friction is dependent on the deformation, wich is dependent
> on the acceleration/change of velocity.
>
> Probably this friction mainly (maybe only) slows down the velocity
> perpendicular to the surface, but if the ball has a velocity-component
> parallel to the surface it will slide (or roll) on it while in contact
> with it, resulting in friction between the surface and the ball wich
> slows it down in this direction, too.
>
> How about letting the user specify the ratio between horizontal and
> vertical friction?
>

Yes, this is all true, I was just trying to simplify the matter without
getting too technical.  By energy i really meant (and should have said)
momentum.  The amount of energy lost is dependent on the plasticity of both
objects involved in the collision, for simplistic purposes you can express
this as a percentage.  I also like to assign energy loss in two parts,
elastic and plastic, (maybe not the most correct terms) with elastic energy
loss being a percent and plastic being an absolute value (this keeps the
ball from bouncing forever as it would if you used a pure percentage). If
you want to use friction, I would apply it separate (not a ratio) as it
would depend on the material of the two impacting objects, and it would
apply to the parallel vectors.

Also, I have noticed I misstepped a bit in my initial explanation.  When
resolving the momentum vectors into x y z components, these are according to
a local frame of reference aligned to the plane of impact, not the global x
y z, so I suppose I should call them u v w instead, with u being the
perpedicular vector and v and w being (perpendicular) vectors lying on the
plane of impact.

Let me know if further clarification is needed.  I will explain a bit more
later when I rehash my code.

-tgq


Post a reply to this message

From: Scott Moore
Subject: Re: Sliding / flowing
Date: 27 May 2002 14:04:47
Message: <0cn4fu4puklmvd51897614pal1fpobr6ap@4ax.com>
On Mon, 27 May 2002 15:54:13 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

>But that's not the point here. If I have understood you correctly, ball
>bearings don't have freedom of movement so it doesn't make sense to talk
>about the incoming and outcoming angle... :/
>
>You're right though that the bouncing often continues many many times,
>but after the last tiny bounce the ball or particle should still roll or
>flow or slide or whatever you want to call it. Did you see that image in
>povray.binaries.images I mentioned?
>
>Rune

Actually, I hadn't looked at the images - have now though 8o)

If you're trying to keep things simple then maybe you could treat the
vertical and horizontal energy loss coefficients separately (maybe
coefficients isn't the right word but I'll use it anyway!) By vertical
I mean perpendicular to the tangent of the collision point and by
horizontal I mean the tangent of the collision point. The horizontal
energy loss is handled by the material's friction coefficient and the
vertical energy loss is handled by the elasticity coefficient. When
either component gets below a certain threshold you can consider that
component to have zero energy - this could stop the (near) infinite
smaller bounces problem?

Basically, with this you will be able to get the sliding to come to a
half after the bouncing has stopped.

Don't take any of this too seriously - I am probably way of base here
... just a bunch of ideas ...

Bye,

Scott


Post a reply to this message

From: Rune
Subject: Re: Sliding / flowing
Date: 27 May 2002 14:53:36
Message: <3cf280b0$1@news.povray.org>
Scott Moore wrote:
> If you're trying to keep things simple then maybe you could treat the
> vertical and horizontal energy loss coefficients separately (maybe
> coefficients isn't the right word but I'll use it anyway!) By vertical
> I mean perpendicular to the tangent of the collision point and by
> horizontal I mean the tangent of the collision point. The horizontal
> energy loss is handled by the material's friction coefficient and the
> vertical energy loss is handled by the elasticity coefficient.

Yes, this is what some others have suggested too, and I think I'll use
this approach. :)

> When either component gets below a certain threshold you can
> consider that component to have zero energy - this could stop
> the (near) infinite smaller bounces problem?

Well, the infinite bouncing problem shouldn't be a problem at all when
the perpendicular loss of momentum is greater than the tangential,
because the bounces will become more and more flat, thus being the same
as sliding in effect. A threshold is what I want to avoid, because it
means one setting less for the user to worry about. :)

Thanks for the feedback. :)

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated May 20)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

From: Mark James Lewin
Subject: Re: Sliding / flowing
Date: 27 May 2002 18:09:52
Message: <3CF2AED0.238C961B@yahoo.com.au>
Rune wrote:

> Scott Moore wrote:
> > If you're trying to keep things simple then maybe you could treat the
> > vertical and horizontal energy loss coefficients separately (maybe
> > coefficients isn't the right word but I'll use it anyway!) By vertical
> > I mean perpendicular to the tangent of the collision point and by
> > horizontal I mean the tangent of the collision point. The horizontal
> > energy loss is handled by the material's friction coefficient and the
> > vertical energy loss is handled by the elasticity coefficient.
>
> Yes, this is what some others have suggested too, and I think I'll use
> this approach. :)

This is the approach I took for my system and it works ok. Good luck with it.

MJL


Post a reply to this message

From: Rune
Subject: Re: Collision with energy loss
Date: 27 May 2002 18:53:44
Message: <3cf2b8f8$1@news.povray.org>
Lutz-Peter wrote:
> How about letting the user specify the ratio
> between horizontal and vertical friction?

That seems to be what people generally suggest. :)
Yes, I've already recoded my system to use this method, and the first
tests look promising.

TinCanMan wrote:
> I also like to assign energy loss in two parts,

> plastic being an absolute value (this keeps the
> ball from bouncing forever as it would if you
> used a pure percentage).

I don't think it matters that the particles keep bouncing forever, when
the bounces get flatter and flatter, so that it is in effect the same as
sliding.

> Also, I have noticed I misstepped a bit in my
> initial explanation. When resolving the momentum
> vectors into x y z components, these are according
> to a local frame of reference aligned to the plane
> of impact, not the global x y z, so I suppose I
> should call them u v w instead, with u being the
> perpedicular vector and v and w being
> (perpendicular) vectors lying on the plane of impact.

That's what I assumed, and I think that only two vectors are needed for
this, the second being the tangential vector.

Thanks for the feedback everyone! :)

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated May 20)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

From: Alex Falappa
Subject: Re: Collision with energy loss
Date: 28 May 2002 04:01:49
Message: <3cf3396d@news.povray.org>
...
> So how should energy loss be applied? One Idea I had was that the energy
> loss should only apply to that part of the movement vector that is
> perpendicular to the surface the particle collides against. ( See
> illustration II in the before-mentioned image. ) But this would mean
> that the outcoming angle would not be equal to the incoming angle. In
> reality is the incoming angle always equal to the outcoming angle, also
> when energy loss is taken into consideration?

This is IMHO the best option, and the most physically based.
I've implemented in the past a particle system, and my bounces followed this
law.
A damping factor could be applied to the tangential component of the
movement factor to take into a first account friction between surfaces. A
more complex model would modulate this tangential damping factor according
to the angle of incidence as in your third option.

I found a lot of inspiration in the particle system library by David
McAllister found at www.cs.unc.edu/~davemc/Particle/, I suggest you to dig
into the source of that API which is available for free.

Alex


Post a reply to this message

From: Peter Popov
Subject: Re: Collision with energy loss
Date: 31 May 2002 15:16:14
Message: <6n27fucripeun2eds4f6ngpqothun655be@4ax.com>
On Mon, 27 May 2002 11:43:41 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

>What are your thoughts on this?

Rune,

sorry I don't have the time to read the whole thread right now so I
apologize in advance if what I write is nothing new.

There are two laws which you should observe. One is the law of
conservation of energy and the other is the law of conservation of
momentum.

Now, I know you know these laws, but I'll write them down to make my
points more clear.

The law of conservation of energy states that:

E_b,t = sum(E_b,k) + sum(E_b,p) = E_a,t = sum(E_a,k) + sum(E_a,p) + Q

where the index "b" indicates the time before collision and the index
"a" indicates the time after the collision. Also, "k" is for kinetic,
"p" is for potential, "t" stands for "total" and "Q" is heat produced
in the collision (you may also add m*c^2 to the right hand side of the
equation if there is some mass converted into energy, as in the
collision of several close-to-critic-mass pieces or plutonium... but
that's probably overkill). The sums indicate summing of the respective
energy components of all bodies.

Kinetic energy E_k comes from two components - linear and angular.
They are equal to m*[v]^2/2 and J*omega^2/2, respectively, where m is
mass, v is linear velocity, J is moment of inertia about the rotation
axis, and omega is angular velocity. Brackets indicate vector
quantities.

The law of conservation of momentum states that:

[P_b,t] = sum([P_b,r]) + sum([P_b,l]) = [P_a,t] = sum([P_a,r]) +
sum([P_a,l])

where r stands for "rotational" (should be angular, but 'a' is used
already) and "l" stands for linear. Moreover,

P_l = m*[v]
P_a = J*omega

The last thing which should be mentioned is that reaction forces are
always normal to the common tangent plane of the two objects at the
point of collision.

The most simple collision model is the completely elastic collision
without rotation. The only things you have to observe are linear
motion kinetic energy and momentum. In partially inelastic collisions
without rotation, you have to define the loss either as a loss of
momentum or as a loss of energy (they are linked together through
linear velocity).

If you throw in rotation, you'll have to account for the conservation
of angular momentum and the kinetic energy of rotational motion.
Things get more dicey in this case, but allow for very cool
simulations such as a rubber ball bouncing around with a top- or side
spin, or a pool table simulation. Again, if you want to have inelastic
collisions, you have to define the loss as either loss of momentum or
of energy.

Potential energy doesn't make much sense in collision models except in
very special cases such as prolonged (i.e. not instantaneous)
collision with material deformation, for example a ball falling on a
stretched rubber sheet. In this case the kinetic energy of the ball is
converted into potential energy of deformation of the material, and
after reaching zero, the reverse process begins. The main losses here
are due to internal friction loss in the deformed material, usually
represented using a viscuous friction damping model in either a
mass-spring (iterative) or a finite element (matrix) model. Things are
*really* dicey here and even the real pros (David Baraff, Andrew
Witkin, James O'Brien etc.) don't have all the answers.

Losses can also occur due to friction. The losses then are best
expressed in terms of a friction coefficient, because you're summing
up forces anyway. The friction force is parallel to the common tangent
and is proportional to the friction coefficient and the normal
component of the forces of motion,

[F_fr] = -k_fr * |[F_n]| * F_t / |[F_t]|

where the bars indicate length, "fr" is "friction", "t" is
"tangential" and "n" is "normal."

How friction affects angular motion, my high-school physics does not
tell. I only know Euler's friction between two bodies with a common
axis and contacting along a circular arc,

F_fr = -e^(k * phi)

where "k" is the coefficient of friction and "phi" is the angle of the
arc along which the two bodies contact. IIRC the formula indicates
both static and dynamic friction and is most commonly used when
dealing with ropes or belts contacting with drums, as well as with
hinges.

Enough of high-school physics :) About the only thing I want to
mention, which should be obvious since you already have a working
system, is that there is a shortcut in calculations in the case of a
finite-mass body colliding with an infinite-mass body.

Hope this helps. Sorry again if this is no news or has been mentioned.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: David Fontaine
Subject: Re: Collision with energy loss
Date: 4 Jun 2002 00:58:28
Message: <3CFC4A33.1020603@faricy.net>
Christoph Hormann wrote:

> 
> rolling (although rolling is something not considered in a particle
> system by definition since the particles have no size and therefore no
> moment of inertia).

What if you want to program a 10-dimensional p-brane system?  <g>

-- 
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: David Fontaine
Subject: Re: Collision with energy loss
Date: 4 Jun 2002 01:07:28
Message: <3CFC4C50.8010408@faricy.net>
The collision only robs the ball of vertical momentum.  Since the normal 
force is (by definition) vertical, it cannot change the ball's 
horizontal momentum.  Any horizontal change comes from friction or 
conversion to rotational energy, which doesn't exist in a particle 
system anyway.

-- 
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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