geometry[draw] - create a two-dimensional plot of objects supported in the geometry package
|
Calling Sequence
|
|
draw(obj,...)
draw([obj_1,...,obj_n],...)
|
|
Parameters
|
|
obj
|
-
|
object to be plotted
|
[obj_1, ..., obj_n]
|
-
|
list of object(s) to be plotted
|
|
|
|
|
Description
|
|
•
|
The routine draw provides the graphical visualization of all objects supported in the geometry package.
|
•
|
A typical call to the draw function is draw([ obj_1( localopts_1 ), ..., obj_n( localopts_n )], globalopts) where obj_1, ..., obj_n are geometric objects, localopts_1, ..., localopts_n are local options for a particular object, and globalopts are options which apply to all of the objects.
|
•
|
localopts_i is a sequence of type equation. The set of options allowed for localopts_i is color, legend, linestyle, numpoints, style, symbol, symbolsize, thickness, printtext, filled, transparency. Options legend, filled and numpoints can only be provided as local options.
|
•
|
The printtext option, when set to true, allows the ``text'' to be printed out; e.g., when a triangle is drawn, the names of its vertices will also be printed. The default mode is false.
|
•
|
The filled option applies to ``closed'' curves (i.e., triangles, squares, circles, and ellipses). When using this option, it is important to note that the order in which the objects are given is important, as the first object in the call to draw is drawn ``on top'' of the other objects. For example, if you wanted to plot two filled circles (e.g., a small circle contained inside of a larger circle), then you would make the small circle the first object, and the large circle as the second object. Reversing the order of the objects would ``hide'' the small circle.
|
•
|
For detailed descriptions of other options, see plot/options.
|
•
|
globalopts: the set of options allowed for globalopts is the same as that for plot except for the adaptive and sample options. See plot/options for detailed descriptions of each option.
|
•
|
Note that the localopts_i that are defined for an object have precedence over globalopts when obj_i is drawn.
|
|
|
Examples
|
|
An example for the following theorem. These are the commands to create the plot from the Plotting Guide.
Theorem: The orthocenter H, the circumcenter OO, and the centroid G of a triangle A1A2A3 are collinear and HG = 2*GOO.
>
|
|
Define triangle T
>
|
|
Find the circumcircle of A1A2A3
>
|
|
Find the altitudes of T
>
|
|
>
|
|
>
|
|
Find the orthocenter and centroid of T
>
|
|
Find the medians of T
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
Check if H, OO, G are concurrent
>
|
|
Test if the distance between H and G is twice the distance between G and OO
>
|
|
>
|
|
An example of translation, rotation, and dilatation of circles
>
|
|
>
|
|
|
|