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

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?

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.

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?

5. Member
Join Date
Jul 2012
Posts
93
Rep Power
0

## Re: Ball Bounce project

Originally Posted by Norm
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?
I believe that is the same coordinate system. I don't think I should show the code because I need to do it mostly alone. This is possibly more of a math and physics question than a java question.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•