Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Algorithms] Spin of sphere

 Re: [Algorithms] Spin of sphere From: Scott Le Grand - 2001-08-30 23:41:28 ```At 02:07 PM 8/29/2001 +0300, you wrote: >I am doing a table football simulator. I did the collusions with the walls >and the players. I want to add more reality. Does anybody knows how to add >spin in the ball? That's what you'd call an area of "active research." Frictional modeling has been pretty ad-hoc in everything I've seen so far. With a sphere/wall collision, it ought not to be hard to come up with something approximate based on the normals of the colliding surfaces, but it's likely something you'll be tuning until it feels right, as opposed to some model of reality. At least that's been my experience... Scott ```

 RE: [Algorithms] Bounding sphere of spheres From: Wayne Coles - 2001-08-29 09:12:37 ```Off the top of my head... float GetSphereSetRadius( Sphere *pSphere, const int nSpheres ) { float fRadius = 0.0f; for ( int iSphere = 0; iSphere < nSpheres; iSphere++, pSphere++ ) { Vector vectFar; pSphere->GetPosition().Normalize( vectFar ); vectFar *= pSphere->GetPosition().Magnitude() + pSphere->GetRadius(); if ( absf( vectFar.Magnitude() ) > fRadius ) fRadius = absf( vectFar.Magnitude() ); } return fRadius; } Where Normalize() stores the vectors normalized direction into the specified vector and a vector * scalar operation multiplies each component of the vector by the scalar. Probably not the greatest but should work.... > -----Original Message----- > From: T.M. Evans [mailto:tmadoc@...] > Sent: 29 August 2001 09:36 > To: gdalgorithms-list@... > Subject: [Algorithms] Bounding sphere of spheres > > > Is there any stupidly fast method of finding the bounding > sphere of several > spheres? Ashamed to admit it, I first find the bounding box > and then the > sphere from the box centre. Surely there are better ways. I'm > not overly > concerned with accuracy, slightly loose spheres would do fine > if it's fast. > > Cheers, > Madoc > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDAlgorithms-list@... > http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > -Virus scanned and cleared ok ```
 RE: [Algorithms] Bounding sphere of spheres From: Wayne Coles - 2001-08-29 09:54:25 ```Oops, just re-read your mail, this seems to be what you're doing already, apologies :) > Where Normalize() stores the vectors normalized direction > into the specified > vector and a vector * scalar operation multiplies each > component of the > vector by the scalar. > Probably not the greatest but should work.... > > > > -----Original Message----- > > From: T.M. Evans [mailto:tmadoc@...] > > Sent: 29 August 2001 09:36 > > To: gdalgorithms-list@... > > Subject: [Algorithms] Bounding sphere of spheres > > > > > > Is there any stupidly fast method of finding the bounding > > sphere of several > > spheres? Ashamed to admit it, I first find the bounding box > > and then the > > sphere from the box centre. Surely there are better ways. I'm > > not overly > > concerned with accuracy, slightly loose spheres would do fine > > if it's fast. > > > > Cheers, > > Madoc > > > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDAlgorithms-list@... > > http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > > -Virus scanned and cleared ok > > _______________________________________________ > GDAlgorithms-list mailing list > GDAlgorithms-list@... > http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > -Virus scanned and cleared ok ```
 RE: [Algorithms] Bounding sphere of spheres From: John Mckenna - 2001-08-29 10:26:22 ```>From: Peter Prade [mailto:prade@...] >Well here is a simple algo to calculate the smallest bounding >sphere for 2 spheres > >Suppose you have two Spheres at P1 and P2 with radii r1 and r2... >the bounding sphere (at Position P with radius r) is then calculated as >follows: [snip] >You should be able to extend that to more than 2 spheres just by >iterating... That's the algorithm given in Graphics Gems (I believe that was for points, not spheres, but it's a simple modification). It isn't exact, but the original poster was only after an approximation. Take your first two spheres. Find the bounding sphere of those. Then take it and your next sphere, find the bounding sphere of those two. Repeat until bored. A quick Google found this: http://geometryalgorithms.com/Archive/algorithm_0107/algorithm_0107.htm which looks like a nice simple explanation of lots of methods (for many bounding volumes - not just spheres), with a few references at the end if you need more. -Virus scanned and cleared ok ```
 [Algorithms] Spin of sphere From: Konstantinos Goutzinopoulos - 2001-08-29 11:07:07 ```I am doing a table football simulator. I did the collusions with the walls and the players. I want to add more reality. Does anybody knows how to add spin in the ball? ```
 Re: [Algorithms] Spin of sphere From: Scott Le Grand - 2001-08-30 23:41:28 ```At 02:07 PM 8/29/2001 +0300, you wrote: >I am doing a table football simulator. I did the collusions with the walls >and the players. I want to add more reality. Does anybody knows how to add >spin in the ball? That's what you'd call an area of "active research." Frictional modeling has been pretty ad-hoc in everything I've seen so far. With a sphere/wall collision, it ought not to be hard to come up with something approximate based on the normals of the colliding surfaces, but it's likely something you'll be tuning until it feels right, as opposed to some model of reality. At least that's been my experience... Scott ```
 Re: [Algorithms] Spin of sphere From: Konstantinos Goutzinopoulos - 2001-08-31 20:51:48 ```Do you have any idea where can I find such kind of information? Or an example? ----- Original Message ----- From: "Scott Le Grand" To: Sent: Friday, August 31, 2001 2:39 AM Subject: Re: [Algorithms] Spin of sphere > At 02:07 PM 8/29/2001 +0300, you wrote: > >I am doing a table football simulator. I did the collusions with the walls > >and the players. I want to add more reality. Does anybody knows how to add > >spin in the ball? > > That's what you'd call an area of "active research." Frictional modeling > has been pretty ad-hoc in everything I've seen so far. With a sphere/wall > collision, it ought not to be hard to come up with something approximate > based on the normals of the colliding surfaces, but it's likely something > you'll be tuning until it feels right, as opposed to some model of reality. > > At least that's been my experience... > > Scott > > > _______________________________________________ > GDAlgorithms-list mailing list > GDAlgorithms-list@... > http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > ```
 Re: [Algorithms] Spin of sphere From: Scott Le Grand - 2001-08-31 21:27:56 ```Here's a good start: http://www.gamasutra.com/features/20000516/lander_01.htm Billiards and ping pong are played on the same table anyway, right? Scott At 11:52 PM 8/31/2001 +0300, you wrote: >Do you have any idea where can I find such kind of information? >Or an example? > > > >----- Original Message ----- >From: "Scott Le Grand" >To: >Sent: Friday, August 31, 2001 2:39 AM >Subject: Re: [Algorithms] Spin of sphere > > > > At 02:07 PM 8/29/2001 +0300, you wrote: > > >I am doing a table football simulator. I did the collusions with the >walls > > >and the players. I want to add more reality. Does anybody knows how to >add > > >spin in the ball? > > > > That's what you'd call an area of "active research." Frictional modeling > > has been pretty ad-hoc in everything I've seen so far. With a sphere/wall > > collision, it ought not to be hard to come up with something approximate > > based on the normals of the colliding surfaces, but it's likely something > > you'll be tuning until it feels right, as opposed to some model of >reality. > > > > At least that's been my experience... > > > > Scott > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDAlgorithms-list@... > > http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > > > >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list ```