DeSIGN AND CODING of Graphics Algorithm
Class Design : any graphics program is to have good classes. Some basic classes to be written include these :
- Vector 2: A 2D vector classes that stores on x and y components.
- Vector 3: A 3D vector classes are similar or like as 2D vector classes.
- hVector : A homogeneous vector or hVector includes four components.
- RGB: A RGB color store three components, also include operations for RGB addition, RGB Subtraction, RGB Multiplication, Scalar Multiplication, Scalar divisions.
- Transform: a 4*4 matrix for transformation.
- Image: a 2D array RGB pixels with an output operation.