/Computer_Graphics

Code for challenges done at the Computer Graphics class at Universidad EAFIT, 2014-1

Primary LanguageJavaMIT LicenseMIT

Santiago Zubieta

Universidad EAFIT, 2014-1

Computer Graphics

Each challenge has a very comprenhensive PDF explaining the algorithms used and screenshots of the application (click on each image to open it). The first two challenges were done using Java's AWT and Swing, whereas from the third challenge on, these were made with AWT/Swing and Processing (for the course purposes, no pre-made transformations where used, all were hand coded!).

Adding Processing into the mix was nice because of its simplified application for interactive sketches and the use of a main non-blocking event-handling loop.

This was made for educational purposes, and is licensed under the MIT License.

Click on each image to open the PDF document regarding explanations. These are just some few screenshots showing what each one of the challenges achieve:

Challenge 1 - Bresenham Algorithm: Lines & Circles

To further show that the lines and circles are being drawn pixel by pixel, each pixel has been assigned continuous colors to show the iterative drawing, not all in a single stroke.

Challenge 2 - Line Clipping: Cohen-Sutherland & Liang-Barsky

The lines turn green if they are inside the clipping area. Also the area can be dragged manually!

Challenge 3 - Playing Around with Transformations in 2D / 3D

(Click image, leads to a Youtube Video)

Challenge 4 - Transformations in 2D: Rotate, Scale, Translate

Challenge 5 - Transformations in 3D: Rotate, Scale, Translate

Challenge 6 - Projection and Camera Transformations