Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
spherical collision & rebound angles
Old
John_Clark
Guest
 
Status:
Posts: n/a
Exclamation spherical collision & rebound angles - 01-25-2008, 12:18 PM

Hey I'm doing a pool game, as you may have seen from my other thread, but I have run into some issues. One is that I need help with spherical collision & rebound angles. Number two although is a bigger issue, I'm only a Jr in High School and I don't know alot about physics and next to nothing about Trig so I really need help with both of those although I need more help with rebound angles, so anyone have any idea/equasions that could help out?

P.S. I've added the pool game on here as well if people want to take alook although I haven't done a huge amount to it yet.
Attached Files
File Type: a2w Pool.a2w (908.7 KB, 522 views)

Last edited by John_Clark; 01-25-2008 at 12:36 PM.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 01-25-2008, 02:15 PM

Here is a link to some information on collision detection in 2D. This approach should work well for pool balls if you extend it to 3D, (which is not necessarily a trivial task for someone with a weak math background).

http://www.jumbooks.com/books/Comput...l/lib0136.html

Perhaps there is someone at your high school who can help you with the math issues.

However, this won't help you with the rebound issues. To be frank, it sounds to me like you may have taken on a project that is beyond your current educational level. A computer program that simulates a pool game is simply a model of something that happens in the real world. If you are unable to create and understand a mathematical model of what happens in the real world, it is unlikely that you will be able to write a computer program to model it. Just in case you haven't found it on the web, here is a link to an article about the math of a billiards game:

http://archive.ncsa.uiuc.edu/Classes...send/math.html

But, don't give up. You may be able to learn enough on the fly to make it all work.

PS: Under the stipulation that the pool balls must remain on the table, you can consider this to be a problem of circles moving in a 2D space instead of spheres moving in a 3D space. This will make the task much easier than would be the case if it were spheres moving in a 3D space, but still fairly difficult.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm

Last edited by DickBaldwin; 01-25-2008 at 02:36 PM. Reason: Clarification
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 01-26-2008, 10:14 PM

See algorithmancy.8kindsoffun.com/HStrig.ppt It deals with hockey puck collisions and you may find it helpful.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 01-28-2008, 12:15 PM

Ok thanks, and luckily I do know some people that can help as well as a kid whos may end up going to MIT so I should be able to do this, and it helps that I'm a fast learner.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 01-29-2008, 11:37 PM

Quote:
Originally Posted by John_Clark View Post
Ok thanks, and luckily I do know some people that can help as well as a kid whos may end up going to MIT so I should be able to do this, and it helps that I'm a fast learner.
Fantastic. I hope you succeed.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-05-2008, 12:16 PM

Ok, I think I have the general idea on how to do everything I need to but now I'm just wondering how I should set up the equasion and if I should set it up in some if else statements imbeaded in each other or to use if else statements in some kind of loop
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-05-2008, 12:54 PM

Quote:
Originally Posted by John_Clark View Post
Ok, I think I have the general idea on how to do everything I need to but now I'm just wondering how I should set up the equasion and if I should set it up in some if else statements imbeaded in each other or to use if else statements in some kind of loop
It sounds like you should probably start at the beginning and learn a little more about programming fundamentals and program design on a few somewhat simpler projects.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-07-2008, 12:16 PM

Ya, I think I'm going to just put this one on hold for a while and work on some smaller ones until I get a bit better backround in math and physics. But for my other thing I said
Quote:
Ok, I think I have the general idea on how to do everything I need to but now I'm just wondering how I should set up the equasion and if I should set it up in some if else statements imbeaded in each other or to use if else statements in some kind of loop
I just wanted to get some other opinions on what would be more practical.
   
Reply With Quote
Pong?
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Pong? - 02-07-2008, 12:34 PM

A "pong" type game might be a good start - it would give you the basics of ball movement and rebounds. You could then gradually substitute a pool cue for the "paddle" and eventually move up to more complete physics.

I believe the Scratch forum has several examples to give you some ideas for a start.
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-08-2008, 12:33 PM

Ok, thanks Jim.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.