/3DComputer_Graphics_ALG

There are 4 projects of computer graphics drawing

Primary LanguageC++

3DComputer_Graphics_ALG

Implement 4 computer graphics drawing or rendering algorithms.

Introduction

Proj1

Proj 1 is a simple program can use mouse to click on monitor, then draw 2D shapes, such as line, dot, circle , polygon. This proj only use OpenGL method, drawDot, to complete and implement midpoint draw line alg.

Feature

mode

the program contain 4 modes, include:

  • d : the initial mode is mode d, and you can switch to this mode by keyboard input d. Under this mode user can draw dot.
  • l : User can switch to this mode by keyboard input l. Under this mode user can draw line.
  • p : User can switch to this mode by keyboard input p. Under this mode user can draw polygon.
  • o : User can switch to this mode by keyboard input o. Under this mode user can draw circle.

how to draw

dot

left click the canvas, and the dot will be draw on the position mouse click.

line

left click the canvas for two times, the dot will be draw on canvas from the position first click to the second one.

polygon

left click the canvas for many times, the edge of polygon will be drawn. right click to complete the polygon drawing.

circle

left click the canvas, and the cirlce will be drawn for the center is position mouse down, and the radius is the position mouse up to position mouse down.

Other function

clear screen

pressed keyboard c to use.

recovery

pressed keyboard r to use.

exit

pressed keyboard q to use.

Porj2

proj 2 implement 2D line and polygon drawing, pattern transformation, View Port, Clipping and execute the commands, include scale, rotate, translate, square, triangle, view, clearData, clearScreen. It will read .asc file as input.

Proj3

Proj 3 is implement 3D line and line and polygon drawing, pattern transformation, View Port, Clipping, hidden surface removal and execute the commands, include scale, rotate, translate, object, observer, viewport, nobackfaces, reset. It will read .asc file as input.

Proj4

Proj 4 is implement 3D line and line and polygon drawing, pattern transformation, View Port, Clipping, hidden surface removal, lighting & shading, polygon filling and execute the commands, include scale, rotate, translate, object, observer, viewport, nobackfaces, reset. It will read .asc file as input.

Usages

  • install Visual Studio, and create new proj, and put data to debug folder, then run the code.

Contact

210509fssh@gmail.com