opengl, Computer Graphics

Assignment Help:
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 source code teapot_glut.c.

Initially, the camera is at 0,0,10 looking down the -z axis (looking at the origin 0,0,0).



The main objective of this homework is to manipulate the position and orientation of the camera. The position of the camera is restricted to be on the surface of a virtual sphere with the radius of 10. So you can imagine a teapot at the origin, and a camera on a surrounding sphere pointing at the teapot.

There are two camera manipulation instruction, elevation and swing. In elevation mode, the camera should be elevated on the surface of the sphere while maintaining the look-at point at the origin. The range of elevation on the surface of a sphere is between -90 and 90 degree. Use mouse motion function to implement the user interaction. Users should be able to elevate the camera by dragging mouse upward.

In swing mode, the camera should be moved sideways on the surface of the sphere while maintaining the look-at point at the origin. Use mouse motion function to implement the user interaction. Users should be able to swing the camera by dragging mouse sideways. Note that during the swing operation, the elevation level should be preserved and the camera should not tilt sideways.

Using a pull-down menu, a user should be able to toggle between grid view on and off.
Quit menu will terminate the program.

Related Discussions:- opengl

Basic ray tracing algorithm - polygon rendering, Basic Ray Tracing Algorith...

Basic Ray Tracing Algorithm - Polygon Rendering The Hidden-surface removal is the most complete and most versatile method for display of objects in a realistic fashion. The co

Character Generation, Explain Various techniques of Character Generation Al...

Explain Various techniques of Character Generation Algorithm?

Mathematical description of a perspective projection, Mathematical descript...

Mathematical description of a Perspective Projection A perspective transformation is found by prescribing a center of projection and a viewing plane. Let here assume that P(x

Polygon representation methods - modeling and rendering, Polygon Representa...

Polygon Representation Methods - Modeling and Rendering Any scene to be created by computer graphics may include a variety of objects, a few of them natural and manmade. Hence

Jas file formats, JAS: The JAS file formats were implemented to form the s...

JAS: The JAS file formats were implemented to form the smallest possible picture files for 24bits per pixel image and 8 bit per pixel gray scaled pictures. This uses a discrete co

Film - applications for computer animation, Film - Applications for Compute...

Film - Applications for Computer Animation Computer animation has turn into regular and accepted in particular effects. Movies as "Jurassic Park", "Terminator 2: Judgment Day"

What is the purpose of saving selections, Question 1: (a) Once a select...

Question 1: (a) Once a selection is made, what area of the image can be edited? (b) What is the purpose of saving selections? (c) How can you move a selection while you a

Derive the common transformation of parallel projection, Derive the common ...

Derive the common transformation of parallel projection into the xy-plane in the direction of projection d=aI+bJ+cK. Solution: The common transformation of parallel projection

Presentation graphics-introduction to computer graphics, Presentation Graph...

Presentation Graphics The instant you are going to represent yourself or your product or company or research paper and so on. Only standing and speaking is fairly ineffective.

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