POV-Ray : Newsgroups : povray.binaries.animations : Re: Marbles : Re: Marbles Server Time
19 Jul 2024 02:19:58 EDT (-0400)
  Re: Marbles  
From: Chris Johnson
Date: 30 Sep 2003 20:30:06
Message: <3f7a200e$1@news.povray.org>
The quadratic I was talking about (for 2D):

d = sum of radii of the two spheres
dvx = difference in sphere x-velocities (e.g. xv1-xv2)
dvy = difference in sphere y-velocities
dx = difference in sphere x-positions
dy = difference in sphere y-positions
t = time

The quadratic is:


You need to find the solution that is

since the other solution:

is the time at which the balls (had they gone through each other) would separate the
'other side' of
the collision. Note that if the value of t is negative, it means that the collision
has 'already
happened' - i.e. the spheres are going away from each other. Since they won't collide
again on their
present courses, this case can be ignored.

-Chris



Post a reply to this message

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