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

Write a c-code for a user to draw a polygon object, Write a C-code for an i...

Write a C-code for an interactive program which allows a user to draw a polygon object in a window and then gives various choices of geometric transformations on the polygon.  Once

Midpoint circle algorithm for scan converting a circle, Explain Bresenham s...

Explain Bresenham s circle drawing algorithm,  OR   Explain midpoint circle algorithm for scan converting a circle. Midpoint Circle Algorithm   1. Input radius r and circle

Line generation, write digital differntial analyzers(DDA) Algorithm

write digital differntial analyzers(DDA) Algorithm

Bresenham line generation algorithm, Bresenham Line Generation Algorithm ...

Bresenham Line Generation Algorithm This algorithm is exact and efficient raster line generation algorithm. Such algorithm scan converts lines utilizing only incremental integ

Physx, what is physx.?

what is physx.?

Distinguish between convex and concave polygons, Distinguish between convex...

Distinguish between convex and concave polygons? If the line joining any two points in the polygon lies totally inside the polygon then, they are called as convex polygons. If

Define refresh rate and refresh buffer, Refresh Rate: refreshing on raster...

Refresh Rate: refreshing on raster - scan displays is carried out at the rate of 60 to 80 frames per second, although some system are designed for higher refresh rates. Sometimes,

Applications that can handle bitmap data, Applications that can handle Bitm...

Applications that can handle Bitmap Data Hundreds of applications are there in the market which can be used to modify or make bitmap data. For illustration: Adobe Photo Shop, C

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