The Math Forum || Annie's Sketchpad Activites || Printable Version (no Java)

Creating Presentation Sketches: Dissecting "The Triangle"

(almost) Everything you ever wanted to know about action buttons

Open the file "Sketchpad:Presentation Sketches:The Triangle" (the Mac version uses a delta for the sketch name). If you haven't seen this sketch before, play around with it a bit. We're going to take a look at how it all works.

This sketch uses an animation button, three movement buttons, and a whole slew of hide/show buttons to show interesting properties of the triangle. We'll construct an example of each part of the sketch and study how it works.

Animation Button

In a new sketch, construct a segment and a circle. Make sure they are not attached. Select one endpoint and the circle. The circle will be the path along which the point moves. Under the Edit menu, go to Action Button->Animation. You'll get a dialog box explaining your choices. The defaults are fine (but feel free to actually read it), so hit Animate. Now you've got a button.

Double click on the button - the point jumps onto the path and moves along it. The point might have been constructed as being on the circle to begin with, but it doesn't really matter. Just make sure that your circle is not attached to the point. If the point is one of the points defining the circle, this won't work (and you'll get an error message explaining why!).

Sorry, this page requires a Java-compatible web browser.

The SPIN button in "The Triangle" animates the three vertices of the triangle around three different circles. In a new sketch, construct a triangle and put a circle near each vertex. Select A, then holding down the shift key, select the circle near A. Then select B and its circle and C and its circle. Under the Edit menu select Action Button->Animation. You'll get a dialog box like the one shown on the next page. Notice that one of your points is blinking - as you click on different parts of the dialog box, the corresponding object in the sketch blinks so that you can be sure you've picked the right things. Click okay, and you've got a button! Double click the button and watch. You can stop the animation any time by clicking the mouse.

Experiment by changing the sizes of the circles and their position and reanimating. Once you get a setup that you like, hide the circles and their points. Now you've got a thoroughly animated triangle!

You can change the name of your button by double clicking on it with the text tool. This would be a good time to save your sketch, as we’ll add to it more as we go along.

Movement buttons

"The Triangle" includes buttons to move the triangle so that it looks equilateral, isosceles, and right. In a new sketch, construct two segments AB and CD that aren't attached at all. Select A, then with the shift key down select C, then B and D. From the Edit menu choose Action button->Movement, choose "medium", and click Okay.

Double click on the Move button and watch. Now AB is lying on top of CD. They aren't attached in any way; they are just in the same place. (Einstein notwithstanding, two things can occupy the same place at the same time!)

Sorry, this page requires a Java-compatible web browser.

The movement buttons in "The Triangle" move the vertices of ABC onto vertices of hidden triangles of the correct persuasion. In your triangle sketch, construct an equilateral triangle DEF near ABC (you might use the equilateral triangle tool found in Sample Scripts:Polygons, and you might want to delete its polygon interior just to save space). Select A and its target vertex (here D), B and E, and C and F (in that order). Under Edit choose Action Button->Movement. Choose medium in the dialog box, and say okay. Using your text tool, double click on the Move button and change it to read equilateral triangle.

Sorry, this page requires a Java-compatible web browser.

Hide all the parts of your equilateral triangle, and then double click on your equilateral triangle button. (Isn't this fun?!) Animate your triangle, then stop and click on equilateral again. You can repeat the steps for the isosceles and right triangles also (but you don't have to right now).

Hide/Show buttons

The last kind of action button that "The Triangle" employs is the Hide/Show button. In a new sketch construct an equilateral triangle using two congruent circles. Add a comment that explains the construction. Now select the circles and the comment and from the Edit menu choose Action Button->Hide/Show. Use the text tool to rename your buttons appropriately.
Sorry, this page requires a Java-compatible web browser.

Double click on the hide button, then the show button. Pretty slick, eh? Go back to your triangle sketch and construct the medians and the centroid. Write a comment about the medians/centroid of a triangle. Color the medians all a common color. Select the medians, midpoints of the sides, centroid, and your comment and from the Edit menu choose Action Button->Hide/Show. Use your text tool to rename the buttons.

Note: No comment will appear in the sketch below when you click "Show Medians" since JavaGSP can't show comments yet.

Sorry, this page requires a Java-compatible web browser.

Test out your hide/show buttons, then play with your other buttons too! You now know enough to finish your triangle sketch with all the bells and whistles you want!