Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   spherical collision & rebound angles (http://www.alice.org/community/showthread.php?t=1155)

John_Clark 01-25-2008 11:18 AM

spherical collision & rebound angles
 
1 Attachment(s)
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.

DickBaldwin 01-25-2008 01: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, [I](which is not necessarily a trivial task for someone with a weak math background).[/I]

[URL="http://www.jumbooks.com/books/Computers%20and%20Internet/wordware%20java%201%204%20game%20programming/source/5785final/lib0136.html"]http://www.jumbooks.com/books/Computers%20and%20Internet/wordware%20java%201%204%20game%20programming/source/5785final/lib0136.html[/URL]

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:

[URL]http://archive.ncsa.uiuc.edu/Classes/MATH198/townsend/math.html[/URL]

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

[I]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.[/I]

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

DickBaldwin 01-26-2008 09:14 PM

See [SIZE=-1]algorithmancy.8kindsoffun.com/HStrig.ppt It deals with hockey puck collisions and you may find it helpful.

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

John_Clark 01-28-2008 11:15 AM

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.

DickBaldwin 01-29-2008 10:37 PM

[quote=John_Clark;4514]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.[/quote]

Fantastic. I hope you succeed.

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

John_Clark 02-05-2008 11:16 AM

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

DickBaldwin 02-05-2008 11:54 AM

[quote=John_Clark;4558]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[/quote]

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: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

John_Clark 02-07-2008 11:16 AM

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[/QUOTE]
I just wanted to get some other opinions on what would be more practical.

DrJim 02-07-2008 11:34 AM

Pong?
 
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.

John_Clark 02-08-2008 11:33 AM

Ok, thanks Jim.


All times are GMT -5. The time now is 05:51 AM.

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