CG Lab Chapter 2
CG Lab Chapter 2
1. Draw rectangles whose dimensions are entered with the mouse left click. The user clicks the mouse at two points which specify opposite corners of rectangle, and the rectangle is drawn. The user can clear the screen by pressing the right mouse button. 2. Control the sierpinski gasket by mouse, so that user can specify 3 vertices of the initial parent triangle with the mouse. 3. Each time the user presses down the left mouse button a fixed size triangle is drawn in the screen window at the mouse position and whenever user presses the right mouse button a fixed size square is drawn of different color than the color of triangle.