Results 1 to 5 of 5
  1. #1
    jwl
    jwl is offline Member
    Join Date
    Jul 2012
    Posts
    93
    Rep Power
    0

    Default 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. #2
    java.java is offline Member
    Join Date
    Jul 2012
    Posts
    9
    Rep Power
    0

    Default 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. #3
    jwl
    jwl is offline Member
    Join Date
    Jul 2012
    Posts
    93
    Rep Power
    0

    Default 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.

    Ball Bounce project-help.png

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default 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.

  5. #5
    jwl
    jwl is offline Member
    Join Date
    Jul 2012
    Posts
    93
    Rep Power
    0

    Default Re: Ball Bounce project

    Quote Originally Posted by Norm View Post
    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.

Similar Threads

  1. Not able to stored the bounce email
    By kumar11 in forum Apache Commons
    Replies: 0
    Last Post: 06-27-2012, 11:14 AM
  2. Let's Bounce! (game I made for LD warmup weekend)
    By KevinWorkman in forum Reviews / Advertising
    Replies: 0
    Last Post: 04-16-2012, 02:35 PM
  3. Problem deleting ball from bouncing ball app
    By adlb1300 in forum New To Java
    Replies: 2
    Last Post: 12-03-2007, 09:08 PM
  4. Bouncing Ball Just Suddenly Stops Mid Bounce
    By adlb1300 in forum Java 2D
    Replies: 1
    Last Post: 12-03-2007, 02:58 PM
  5. Replies: 2
    Last Post: 12-01-2007, 07:48 AM

Posting Permissions

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