首页 > > 详细

辅导 ECS 175 、OpenGL解析、调试数据库、C/C++语言辅导、解析OpenGL

Course: “Introduction Computer Graphics,” ECS 175, Fall Quarter 2018
Instructor: Bernd Hamann
Project 1: “A SIMPLE TWO-DIMENSIONAL DRAWING SYSTEM”
Date due: Monday, October 15, 2018
For the first project you will implement the DDA and Bresenham line drawing al-
gorithms, the algorithm for rasterizing polygons, the algorithm for two-dimensional
clipping, and the two-dimensional transformations for scaling a polygon with respect
to its centroid, translating a polygon by a translation vector and rotating a
polygon about its centroid by an arbitrary angle. The program must be devel-
oped using only a “MakePix” command available in the OpenGL graphics library. All
higher-level graphics calls must be procedures written by you!
Besides displaying, filling, and transforming a set of predefined 2D polygons in a
2D window, user menues must be provided to interactively specify
• the ID of the polygon to be manipulated,
• the x- and y-extension of a viewport on the screen, and
• the scaling factor, translation vector, and rotation angle.
The user should be able to change these parameters easily by providing a screen area
used for displaying and manipulating these parameters. Make yourself familiar with the
portion of that part of the OpenGL graphics calls you are allowed to use and need to use
for this project. Define the 2D polygons to be displayed in a data file you read in. Each
polygon is defined in terms of a set of 2D points (consecutive points implying an edge of
the polygon) which could be stored in a data file in this fashion:
2 number of polygons
definition of 1st polygon:
4 number of points of 1st polygon
0.0 0.0 coordinates of 1st point
1.0 0.0 coordinates of 2nd point
1.0 1.0 coordinates of 3rd point
0.0 1.0 coordinates of 4th point
definition of 2nd polygon:
3 number of points of 2nd polygon
3.0 0.0 coordinates of 1st point
3.0 1.0 coordinates of 2nd point
2.0 0.0 coordinates of 3rd point
Only those parts of a polygon lying inside a user-specified viewport should be rendered.
The scene should consist of at least three different polygons. Make sure that the user
can specify which polygon is to be manipulated.
Finally, the scene (if it has been altered by some transformations) should be written
to a data file replacing the one you read in.
Besides having to hand in a program listing, please prepare a “manual sheet” explain-
ing how to use your program.
The overall grade (on a scale from 0 to 100) will depend on i) completeness (40%),
ii) correctness (40%), iii) interface quality (15%), and iv) the manual sheet (5%).
No project will be accepted when it is more than seven (7) days late; for each day, one (1)
point will be deduced.
DO NOT REMOVE YOUR PROGRAM! YOU WILL BE ABLE TO USE
IT IN THE NEXT ASSIGNMENT(S).
H A V E F U N ! ! !

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!