Spring 1998
Ileana Streinu

Cinderella exercises and basic implementation drills

Part 1: Cinderella

The purpose of these exercises is to allow you to become familiar with Cinderella. Deadline: Tuesday Feb. 15, before class. Save the Cinderella exercises as files on your computer. Next time, I'll show you how to convert them to html pages and link them from the web page in your account.

To run Cinderella in the lab (McConnell 104):

To do:

  1. Do the construction for the false proof of "all triangles are isosceles" and see what was wrong with the picture I had on the blackboard:
  2. Explore Cinderella's features. Learn how to compute areas of polygons, lengths of segments, draw circles.
  3. Draw a triangle, compute its area, move one of its vertices and watch the area change. When does the sign change?
  4. Draw a polygon, compute its area. Then move its vertices (allowing self intersections of the egdes), and watch how the area changes. Can you tell when it becomes negative?
  5. Draw a few points in a new Cinderella window, them go to the Views menu and select Spherical view. A new window will pop up, showing you a sphere with images of these points on it. Play with the controls of the Spherical View window to view them better. Move the points in the original window, see what happens in the Spherical View window.
    On Tuesday I will use the spherical view model to explain why the formula for computing the area looks as it does. Later we will need to refer to this model when discussing duality. So play with it, to become familiar with it.

Part 2: implementation drills

In class, I explained how to use the sign of the determinant to decide whether two segments (given by their 4 endpoints) cross or not.

Using a programming language of your choice (C, C++, Java), write a function to implement this test. Write a small program to call this function on 2-3 data sets. Use Cinderella to get values for the coordinates of the points in these data sets (i.e., draw 4 points in Cinderella, then look into the Construction window to see what their coordinates are). The advantage of this way of getting the points is that you can see whether the segments cross or not - and thus you can test the correctness of your code.

However, since this is NOT a programming class, I do not expect you to fully debug this code: just do your best to get it as close to a running program as possible. Print the source code and hand in a copy of it to me, in class, on Tuesday.

Extra credit problem

Show with an example that the 3-coloring proof does not hold for polygons with holes. I.e. find a polygon with a hole, and a triangulation of it, so that when you start 3-coloring the vertices you will be forced to use a 4th color at some point (probably, when going around a cycle in the dual graph of the triangulation :-)).

No strict deadline for submitting an answer to this problem, but you should probably work on it in the following 2 weeks, as later we'll move on to new topics.
Last modified February 10, 2000.