Finding where the ball hits a segment, Computer Graphics

Assignment Help:

You will write a two-dimensional precursor of the three-dimensional bouncing ball simulation that is one of your choices for a ?nal project. This involves adding functions to your Frame and Polyline classes, creating a new base component, Polybounce, which has the same role as your Animation class from assignment 6 and updating your main program and Display class to support the new functionality.

Note that you are extending Frame and Polyline. These should continue to work with your earlier applications.

Procedure

1. Modify your Animation class to include an instance of Ball but just a single Frame. Make sure to add the Ball to your reDisplay function. Initialize the ball with a reasonable radius (I used 0.1), your favorite color, at position h0.5, 0.5i (which should be the center of your initial world window) and a reasonably small velocity (h0.05.0.05i works well). So your initialization may look like

_b = Ball(0.1,
GLTYPES::GLred3,
GLTYPES::Coord2(0.5,0.5,1),
GLTYPES::Coord2(0.05,0.05,0))

  • main program

- Display
∗ instance of Polybounce
∗ other components
∗ callback functions
∗ animation timer
∗ plumbing between components
∗ This is not a component. It is the class that initializes the display and partitions it between the components. It knows screenheight andscreenwidth.

- Callback wrappers
- main()


Related Discussions:- Finding where the ball hits a segment

Image processing process, Image Processing Process Images are the last ...

Image Processing Process Images are the last product of most processes in computer graphics. The ISO that is International Standards Organization explains computer graphics as

Advantages of bresenham’s line drawing algorithm, What are the advantages o...

What are the advantages of Bresenham's line drawing algorithm over DDA line drawing algorithm? DDA and Bresenham algorithms both are efficient line drawing algorithm. Breaenham

Adobe photoshop - softwares for computer animation, Adobe Photoshop - Softw...

Adobe Photoshop - Softwares for computer animation Whereas Adobe Photoshop is not a computer animation application, this is one of the top of the line graphics programs. This

Program to implement procedures or functions, The goal of this assignment i...

The goal of this assignment is to implement procedures/functions using x86 assembly. In addition to implementing procedures/functions, this assignment requires to pass arguments us

Graphics applications, The subsequent are also considered graphics applicat...

The subsequent are also considered graphics applications as: • Paint Programs: Permit you to create rough freehand drawings. The images are saved as bit maps and can simply be

What is persistence and resolution, What is persistence and resolution?  ...

What is persistence and resolution?  The time it takes the emitted light from the screen to decay one tenth of its original intensity is known as a persistence.  The maximum

Matlab, need help in coding

need help in coding

Mathematics-applications for computer animation, Mathematics: There are so...

Mathematics: There are some area like Probability, combination, permutation, etc.,that can be well explained along with the help of animation, that helps in enhancing the learning

Radiosity - polygon rendering & ray tracing methods, Radiosity - Polygon Re...

Radiosity - Polygon Rendering & Ray Tracing Methods Radiosity simulates the diffuse propagation of light begin at the light sources. Because global illumination is an extremel

Plane equation - spatial orientation of the surface element, Plane equation...

Plane equation - spatial orientation of the Surface Element For some of Plane equation procedures, we have information regarding the spatial orientation of the individual surf

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd