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

Determine the perspective transformation matrix, Determine the perspective ...

Determine the perspective transformation matrix upon to z = 5 plane, when the center of projection is at origin. Solution. As z = 5 is parallel to z = 0 plane, the normal is s

Negative accelerations - computer animation, Negative Accelerations - compu...

Negative Accelerations - computer animation In order to incorporate decreasing speed in an animation the time spacing between the frames must decrease, thus there exists lesser

Education - applications for computer animation, Education - applications f...

Education - applications for computer animation Currently, studies of subjects as Art, Physics, Maths, Chemistry, Biology, Engineering, Medicine, and Technology are fairly simp

Opengl, Write a program that allows interactive manipulation of the positio...

Write a program that allows interactive manipulation of the position and orientation of a camera. Draw a teapot at the global origin 0,0,0. You can find a shaded teapot model and

Animation tools, Animation Tools: Hardware tools: PCs ,Macintosh, ...

Animation Tools: Hardware tools: PCs ,Macintosh, Amiga Software tools: -          Softimage ( Microsoft) ; -          Alias/ Wavefront ( SGI) -          3D s

Sound and audio, Sound and Audio: Sound is a mechanical energy distur...

Sound and Audio: Sound is a mechanical energy disturbance which propagates by matter as a wave. Sound is characterized through the various properties that are: frequency, per

Different types of simulating motion - computer animation, Different types ...

Different types of Simulating Motion - Computer Animation Here we discuss different ways of simulating motion as: a. Zero Acceleration or Constant Speed b. No

State the areas of use of data goggles, State the Areas of use of data gogg...

State the Areas of use of data goggles Entertainment   Used in television/films as special effects (for example "holodeck" in Star Trek: The Next Generation and Brazilian

What is monitor, Q. What is Monitor? A Monitor is a television like bo...

Q. What is Monitor? A Monitor is a television like box connected to your computer and providing you a vision into the mind of your PC. It displays what your computer is thinki

Random painter graphical application, "Random Painter" uses an array to sto...

"Random Painter" uses an array to store a collection of randomly coloured shapes, either squares or circles as filled shapes or outlines.  Using an array imposes severe limitati

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