Results 1 to 5 of 5
Thread: Ball Bounce project
- 09-06-2012, 05:17 AM #1
Member
- Join Date
- Jul 2012
- Posts
- 93
- Rep Power
- 0
Ball Bounce project
I have a project at school to do and I'm not sure how to do it.
I have to make a 8X4 table with the starting points for a ball at 2,4,6 from the top right corner at an angle of arctan(1/2). y/x=1/2
Then I have to make the ball bounce off each of the walls and return to the starting point and repeat the process once.
Apparently I need to know some physics for this. I need help and would like to know and understand how this would done. Please don't give me your code. I need to be able to reproduce this kind of stuff in the future.
What I'm asking is for are things that are similar to small segments of this project such as
how to get the 4X8 table
Starting point and ball
ect.
ect.
I need some guidance
- 09-06-2012, 08:12 AM #2
Member
- Join Date
- Jul 2012
- Posts
- 9
- Rep Power
- 0
Re: Ball Bounce project
How do you want your output to look like?. Do you want to simulate it with an UI? or do you just want to program it and display the output in the console?... And also please describe the problem in more detail, pen down each requirements then we can see how we can implement it.
What does wall here refers to ? Is it each cell in the table?
- 09-06-2012, 04:04 PM #3
Member
- Join Date
- Jul 2012
- Posts
- 93
- Rep Power
- 0
Re: Ball Bounce project
[QUOTE=java.java;300048]How do you want your output to look like?. Do you want to simulate it with an UI? or do you just want to program it and display the output in the console?... And also please describe the problem in more detail, pen down each requirements then we can see how we can implement it.
What does wall here refers to ? Is it each cell in the table?[/QUOTEI
If someone implements it I don't want to use their code. A link to a tutorial site related to what each segment of the project would be good.
I used a pong tutorial to display the ball onscreen in a 4by8 window starting at x = 400 and y = 0 using the g.fillOval(x, y, size, size).
I want the ball to start at (400, 0) hit the left wall at (800, 200) hit the hit the bottom (400, 400) hit the right wall at (0, 200) and return to starting postilion and stop.
- 09-06-2012, 04:41 PM #4
Re: Ball Bounce project
It looks like Your coordinates are different from what java uses. The top left corner is 0,0. Increasing x goes to the right and increasing y goes down.
What code do you currently have and what are you having problems with?If you don't understand my response, don't ignore it, ask a question.
- 09-06-2012, 04:55 PM #5
Member
- Join Date
- Jul 2012
- Posts
- 93
- Rep Power
- 0
Similar Threads
-
Not able to stored the bounce email
By kumar11 in forum Apache CommonsReplies: 0Last Post: 06-27-2012, 11:14 AM -
Let's Bounce! (game I made for LD warmup weekend)
By KevinWorkman in forum Reviews / AdvertisingReplies: 0Last Post: 04-16-2012, 02:35 PM -
Problem deleting ball from bouncing ball app
By adlb1300 in forum New To JavaReplies: 2Last Post: 12-03-2007, 09:08 PM -
Bouncing Ball Just Suddenly Stops Mid Bounce
By adlb1300 in forum Java 2DReplies: 1Last Post: 12-03-2007, 02:58 PM -
Need help making ball move and bounce off of sides of JPanel
By adlb1300 in forum New To JavaReplies: 2Last Post: 12-01-2007, 07:48 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks