Posted by : Anonymous Saturday, 18 May 2013


Answer the following question.

Question:
Following is a diagram of chair. You have to draw it on screen and perform the given operations using C++ language:
  • Translation
  • Scaling
  • Rotation











Instructions:
  • Center of the diagram is C (320, 240).
  • Pivot point for this diagram is P (0, 0).
  • Make a class Chair () and declare the given operations as functions.
  • Perform the above mentioned operations according to the coordinates entered by the user.
  • Let the coordinates used for these operations are all positive and within the boundaries of screen.
  • When chair is translated display it in yellow color.
  • When chair is scaled, first translate it at coordinates (50, 50) and display it in green color.
  • When chair is to be rotated at some angle, first translate it at coordinates (50, 50) and display it in cyan color.
       
Important Note:  

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © virtual university of pakistan - Skyblue - Powered by Blogger - Designed by Johanes Djogan -