Simple Demonstration

Started by
3 comments, last by temo 22 years, 9 months ago
I have this idea of creating a program in which a person enters in the initial velocity and angle to throw a basketball into a hoop. Does anyone have source code to a game/program of this nature? I''d really appreciate it and love to view it for intellectual purposes.
Advertisement
Why on earth would you need source code to an application such as that? There is so much documentation on creating such a representation, all on the Internet. geesh
masterghttp:/masterg.andyc.org
Try searching under ''balistics'' - here''s a url http://www.programmersheaven.com/search/Download.asp?FileID=13760

Best of luck
But what about if the ball hits the rim. wouldn''t that be kind of difficult? I don''t think they include that in the article.
"What if..."

Well, then you do what coders have been doing for decades...you simplify.

There are lots of variables that you won''t be able to take into consideration.

As for the rim, if you assume a non-elastic collision (where things don''t lose velocity from bouncing), you can just find the angle of impact and send the ball against that angle. Not too hard, but if you haven''t even taken physics and learned about projectiles, it won''t be easy.

You can do the same with the back-board, but of course that''s easier, because it''s just vertical, and you can just swap the horizontal velocity.

G''luck,
-Alamar

This topic is closed to new replies.

Advertisement