Geometry Applet: Parallelogram

If you have Java working on your Web browser, you should see a parallelogram drawn on a base CD with the vertex A draggable along a line – vertex B will ‘follow’ A. Whatever position you drag the point A to along the line, the area of the parallelogram ABCD will always be the same. The perpendicular line in green shows the height of the parallelogram. I’ll be seeing how these look on the interactive whiteboard when I’m back in College next week – the lines may be a bit thin for XVGA projector use, especially with keystone correction in place.

I’m using David Joyce’s Geometry Applet to produce the draggable diagram from a set of definitions of the objects to draw on the canvas. The Applet code embedded in the Web page to produce the diagram above is…

<applet code=Geometry width=400 height=300>
<param name=background value="white">
</param><param name=title value="Parallelograms with same area...">
</param><param name=e[1] value="X;point;fixed;0,50;white;white">
</param><param name=e[2] value="Y;point;fixed;400,50;white;white">
</param><param name=e[3] value="A;point;lineSlider;X,Y,200,50;blue;red">
</param><param name=e[4] value="C;point;fixed;175,250;black;black">
</param><param name=e[5] value="D;point;fixed;250,250;black;black">
</param><param name=e[6] value="Z;point;fixed;0,250;none;none">
</param><param name=e[7] value="W;point;fixed;400,250;none;none">
</param><param name=e[8] value="ZW;line;connect;Z,W;none;none;yellow">
</param><param name=e[9] value="CD;line;connect;C,D;none;black;black">
</param><param name=e[10] value="same;polygon;parallelogram;A,C,D;none">
</param><param name=e[11] value="XY;line;connect;X,Y;none;none;yellow">
</param><param name=e[12] value="B;point;parallelogram;A,C,D;black;black">
</param><param name=e[13] value="AB;line;connect;A,B;none;black;black">
</param><param name=e[14] value="h;line;foot;A,C,D;red;red;green">

The hard work is all done by Joyce’s Java archive: this must be on the path specified by the archive attribute in the Applet tag. Joyce has made the archive (and source code) available so you can copy the file to your intranet or to a location in Moodle. Don’t unpack the file! It is meant to be a zip archive.

Comments are closed.