# DrGeo: A Math Teaching Toy that Physics Teachers Will Also Love

My other writings about Dr. Geo:

- A newer, more detailed tutorial in the Traditional Chinese language.
- application: Visualizing Hermitian Matrix as An Ellipse with Dr. Geo
- application: Visualizing Lorentz Transform with Geomview and Dr. Geo
- 2016 version of "Trajectory of an Object under Gravity": blog post / pdf

drgeo is a wonderful
geometry teaching toy. Do you remember being told that one can draw
figures and do many interesting things using
a ruler and a pair of compasses alone? Well, drgeo does not say
that in words -- it simply lets you *experience* it directly
through interaction! Not only can you create geometric objects
using ruler and compasses, but also you can drag the independent
objects around and see the rest of the picture *dance according
to your construction rules*.

This thing is the most fun software I've ever played since around 10 years ago when I quit games. And it has the same effect of keeping me from doing serious work I am supposed to do :-) If only I had this to play with in my youth, my physics -- not only mathematics -- would be better.

And that's one important side point I want to make using this
tutorial: drgeo is extremely useful not only for mathematics
teachers, *but also for physics teachers*. Two of the
examples are specifically made for physics teachers, while
hopefully mathematics teachers may find them just as useful for
learning drgeo.

We assume that the readers of this tutorial are knowledgeable in high school mathematics, feel comfortable playing with unfamiliar software, and are willing to look up short passages in the official manual pages when necessary. The readers are not expected to be familiar with GNU/Linux, nor are they expected to read the official manual pages in its entirety, either before or after reading this tutorial. (I never did.) The pace will gradually grow faster as we go along. In order not to interrupt the flow of thoughts, some general construction tips are summarized in the last section.

So please grab a copy of the freeduc cd, boot your computer from the cdrom drive, and start enjoying drgeo by following (or not following :-) the steps as you read this tutorial! Don't be afraid to experiment wild things with drgeo. It does not eat your computer. (Well at least it did not eat mine.) Please be ready to check the official manuals as we shall use short terms like "Point Tools menu, then the Free Point menubutton" and expect you to follow the "HTML format" link in the manual page, then the "Basic Functions" link, then the "Construction Tools" link, then the "Point Tools" link, then the "Free Point" link, and read the more detailed explanation. The contents page is especially handy for quick browsing and can save you a few intermediate clicks. You might want to download the newest "drgeo-doc-*.tgz" file from the sourceforge page for easier off-line reference.

## Duality

As a warm-up exercise we will demonstrate the "point-line duality w.r.t. the unit circle". The duality:

(a, b) < == > a x + b y = 1

transforms a point to a line (actually to a hyperplane in higher dimensions), and vice versa. A few results in the textbook are clearly visualized in the .fgeo example circ_dual.fgeo:

- The dual line A' of a point A can be constructed by joining the two tangent points of the supporting lines from A to the circle.
- As the point approaches the center of the circle, the dual line approaches the infinity, and vice versa.
- The dual of the line C' joining two points A and B, is the intersection of the two dual lines A' of A and B' of B.

Drag A and/or B around to see these effects.

Now let's take a look at the hidden intermediate steps. From the Other functions menu choose the Edit Object Styles menubutton and suddenly all intermediate construction steps are shown. Dashed lines as well as some points (difficult to tell visually) are hidden objects not shown in the usual working mode. Say we want to be able to change the size of the unit circle. We need to bring the point R back to normal state from the hidden state. So click on R to bring up the dialog, check "Not masked" under visibility, and close the dialog. Then click the Move Object menubutton and all objects in the intermediate steps except R are hidden again.

Next you will construct this figure from scratch. Select "File" "New" "Figure" to start a new figure. Just in case you feel it necessary, the small tabs at the bottom can be used to switch between the original figure and your figure.

- Create a free point as the center of the unit circle. (Point Tools then Free Point)
- You may give the point a name now, say "O". (Other functions then Edit Object Styles) Or you may do all the editing/naming in one batch after the entire construction is completed.
- Create a free point "R" to serve as the other end point of a radius.
- Create the unit circle UC. (Line Tools then Circle, then follow the hint at the very bottom, or follow your instinct :-)
- Create a free point "A" outside the circle, and make it large and blue. The color and size options can be changed in the Edit Object Styles dialog, the same place where its name is input.

At this point we would like to draw the two supporting
lines from A to the circle but of course "finding supporting lines"
need be broken into steps -- remember that we are pretty much doing
a ruler-and-compass construction, and conceivably finding support
lines from a point to a curve is too complex to be a primitive
operation directly provided by drgeo. We may first find Q instead,
the point of intersection by dropping a perpendicular line from P
to OA. (See figure to the right, upper part.) How do we find Q? We
know that it lies on OA, so the problem reduces to finding *the
length* of OQ, a slightly simpler task than finding the
*position* of Q. Observe that AO:OP = PO:OQ . This unknown
length OQ can be found as OS, using the Ratio
Construction where R is *any* point on the circle. (See
figure, lower part.) Once S is created, the two points of support
can be easily found:

- Draw a circle centered at O with radius OS. As the figure gets more and more complex, objects may happen to overlap or even mathematically coincide with each other. If you click on one of the overlapping or coincident objects, a "???" mark is displayed, meaning that there are more than one object for you to choose from. If that is the case, be sure to hold down the mouse button until you choose the correct object. The yellow undo button (above the tool icons) is especially useful when you make wrong moves and get confused.
- Find the intersection Q of the new circle with OA.
- Create the blue line A' orthogonal to OA through Q. In fact this is the just dual of A we want -- we arrive at it before finding the points of support.
- Still, it would be nice to find the points of support anyway. They help to show the "supporting property" clearly to the audience. Just intersect line A' with the unit circle UC.

Point B and its dual line B' can be created similarly. To demonstrate the third dual property mentioned earlier, point C is chosen to be the intersection of lines A' and B'. Its dual line C' need not be created using the duality rule. It is simply the line connecting A and B. Nontheless encouraging inquisitive students to create C' the laborious way would help convince them of this property without resorting to algebra.

## Forming Images through Convex and Concave Lenses

The formation of images through convex and/or concave lenses is dictated by two simple rules:

- An inbound ray parallel to the axis of the lens goes, upon exiting the lens, along the straight line passing the focus.
- An inbound ray passing through the center of the lens does not change direction.

The image of a point through a lens is thus the intersection of the above two rays. Repeat this procedure for every point of an object under observation, and one gets the image of the entire object through a lens.

This drgeo example lens.fgeo demonstrates the results of applying these principles to a little man. Hold arbitrary parts of the little man on the left and drag him around. See how his image on the right correspondingly moves along. Then move the focus and see how the effects of the lens switch between being convex and being concave.

It's your turn now to re-create this figure. First create a circle to be the head. Let's call the center A and the other end of the radius B. We also need the origin O, another point X to point in the direction of positive X, their connecting line the X-axis, and a line perpendicular to it to serve as the Y-asis. (Transformation Tools then Parallel Line) We also need the focus F and require that it stay on the X-axis. It is created using the same Point Tools then Free Point menubutton, but make sure to click right on the X-axis (a uni-dimensional object by the way) while creating it. Then you can verify that your F is constrained to move only along the horizontal line.

Later we will want to tell drgeo to "map every point C on the circle AB by some rule to point C' ". So in a manner similar to creating F, we now create a free point C on the circle AB, another uni-dimensional object. This is not unlike the dummy variable in a mathematical statement such as "For all integers x, ..." Again, make sure to verify that your C is constrained to move only on the circle.

Finding C', the image of C, takes a few steps but is rather straightforward by following the two optics principles.

The fun begins when we ask drgeo to generate the locus of C' for all possible positions of C. In the Line Tools menu choose Locus, select the free point C first, then click on the dependent point C', and start admiring the resulting ellipse. Hmmm, the image of a circle under these two optical principles is an ellipse... That's something they never said in the high school textbooks.

The rest of the figure can be completed following similar steps. The figure would look nicer if the intermediate objects are masked away. My version also paints the corresponding parts in the little man and its image in the same color for easier identification.

## Studying the Trajectory of an Object under Gravity

Given the initial velocity vector V0, one can compute the trajectory of an object under the effect of the gravity g. Many mathematical properties of the trajectory and velocity vector can be observed by interacting with accel.fgeo (or the big5 version accel.big5.fgeo). Drag the point t along the horizon, and you will see the instantaneous velocity at each point. Notice that the x component remains constant, while the y component decreases by an amount proportional to the change in the position of t. Drag V0 around the circle, and you can see how the direction of the velociy affects the trajectory while the speed remains constant. One also sees why field athletes throw roughly at the 45 degree angle. Now try to increase/decrease the strength of g (actually please drag g_handle because g is too close to the origin) and see why Armstrong jumped higher on the moon than he did on earth.

You could unmask the intermediate steps to see how this figure is constructed. Alternatively, you could read a step-by-step textual description hidden in the figure. Look closely for a vertical row of 7 dots on the left border of the figure. Drag it towards the right and you'll find the textual description. Highlight any step and you'll see the corresponding object flash in the figure. You can also click on the little triangle to examine the details of any interesting step. Here is a brief account of the steps in constructing the acceleration example.

- Create the horizon and a circle whose center lies on the horizon.
- Create a point V0 on the circle and create its horizontal and vertical projections.
- Create the point g on the vertical direction representing the gravity. (For ease of manipulation, I actually created g_handle first, and then used 0.3 g_handle as the true gravity.)
- Next we find the topmost point of the trajectory (x_h, y_h). Let t_h be the time to reach there. Substitute t_h by V0_y/g into x_h = V0_x * t_h and y_h = V0_y * t_h - g * t_h^2 / 2 to find x_h = V0_x V0_y / g and y_h = V0_y^2 / (2g). These lengths can be found using the ratio construction.
- To simplify computation, we mentally switch to the topmost point as the origin. The equation of the trajectory becomes: y = - g * x^2 / (2 * V0_x ^2)
- Find the point (x_f, y_f) on the trajectory with x_f = 2 y_f. On any parabola, this point has the same height (y-coordinate) as the focus. Computation shows that y_f = - V0_x^2 / (2 * g)
- Once you get that length in the picture, the focus and the directrix can be drawn. Invoking the "equal-distance" definition of a parabola, the trajectory can be found using the Locus tool. Let's call the free point on the horizon P, and the dependent point tracing the locus, R.
- In the Line Tools choose the Vector tool, create the V0_x vector. Then in the Transformation Tools choose the Translation tool to translate R by the V0_x vector. This vector stays constant along the trajectory.
- We already have the tangent line during the locus construction. So the V0_y vector can be easily found.

*To be fixed below this line*

## Other Interesting Features

Macro construction saves time and reduces clutterness of your figures. Commonly used constructions such as the ratio construction, and loci such as ellpises/parabola, are good candidates for macro construction.

## Tips for Commonly Used Constructions

Ratio Construction: Given lengths a, b, and c, find length d such that a:b = c:d . One possible solution: Create two line segments sharing one end point, say O, with lengths a and b, respectively. Let's say the other end points are A and R, respectively, as named in the duality figure. Measure length c from O along OA and create the point T. This can be done, for example, using Point Tools then Intersection to find the intersection of OA with a circle of radius c. (In general T and R are on two different circles although in the duality example they happen to be on the same circle.) Now draw a line L parallel to AR through T (Transformation Tools then Parallel Line) (Of course you need to create line segment AR prior to that.) Finally insersect L with OR to find S, and OS then has the desired length, d.

## Exercises

- Use the locus tool to create an ellipse.

- Most updated version of this page: http://frdm.cyut.edu.tw/~ckhung/b/ma/drgeo.en.php; the version you're reading: June 12 2022 08:23:10.
- Author: Chao-Kuei Hung at Chaoyang University Information Management Department
- Save our Earth; please reduce printing, make use of the unprinted side, and recycle.
- You are welcome to distribute this document in accordance with the Creative Commons Attribution-ShareAlike License or the Free Document License.