2D Graphics and Interaction: Assigments


Basic

1 - Using the gp library, write a program to draw a square.

2 - Using the gp library, write an interactive program to input a 2D polygonal curve. The program should write the data to the standard output.

3 - Using the gp library, write a program that reads a 2D polygonal curve from the standard input, and draws it.

4 - Using the tk library, design and implement a choice menu. When a choice is selected the program should print the corresponding text.

5 - Using the tk library, design a valuator widget. When the valuator is moved the program should print the value.


Challenge

6 - Combine the previous programs to create a complete polygonal line editor, with button menus for the different functions (i.e. load, save, clear, etc.), a valuator for global scaling, and different functions assigned to the mouse buttons (i.e. insert point, move point, delete point).

7 - If you feel really inspired implement a Bezier curve editor using a subdivision algorithm.