CS 420 Computer Graphics


Lab 4
Dr. Tong Yu, Fall 2009

Scaling and Turtle Graphics

  • Login and open two windows, one for editing and one for compiling and executing programs. Copy the files from /pool/u/class/cs420/plots/ and try to compile and run it. You should see a figure like the following. Try different functions f(x) and the scalings.

  • Make the directory ~your_login_name/cs420/turtle copy the files from /pool/u/class/cs420/turtle to it. Compile and execute hook. Study the file hook.cpp and try to understand how it works. Try to draw a circle or an arc using turtle graphics. ( Hint: you can approximate these figures using polygons. )

  • Try to redo the Windowing lab of Lab 3 as you have better understanding of Windowing now.