This repository contains a collection of tasks and implementations related to computer graphics, developed as part of a university course. Each task demonstrates a specific algorithm or concept in computer graphics, implemented using HTML5 Canvas and JavaScript.
- Hi# Computer Graphics Project
- Table of Contents
- Task 1: RGB ⇄ CMYK Converter
- Task 2: Pseudo-3D Square
- Task 3: Bresenham Line Algorithm
- Task 4: Bresenham Circle Algorithm
- Task 5: Line Translation
- Task 6: Circle Translation
- Task 7: Line Rotation
- Task 8: Line Scaling
- Task 9: Bresenham with Dash Pattern
- Task 10: Polygon Hatching
- Task 11: Cohen–Sutherland Line Clipping
- How to Run
Description: A tool to convert between RGB and CMYK color models with live preview.
File: task_1.html
Description: Draws a pseudo-3D square using line segments.
File: task_2.html
Description: Implements the Bresenham algorithm to draw a line.
File: task_3.html
Description: Implements the Bresenham algorithm to draw a circle.
File: task_4.html
Description: Demonstrates line translation by applying a translation vector.
File: task_5.html
Description: Demonstrates circle translation by applying a translation vector.
File: task_6.html
Description: Rotates a line around the origin by a specified angle.
File: task_7.html
Description: Scales a line by a specified factor.
File: task_8.html
Description: Implements the Bresenham algorithm with a customizable dash-gap pattern.
File: task_9.html
Description: Fills a polygon with horizontal hatching using scanline algorithms.
File: task_10.html
Description: Implements the Cohen–Sutherland algorithm for line clipping within a rectangular window.
File: task_11.html
- Clone the repository:
git clone <repository-url>