This chapter describes the tools used to construct a geometric sketch.
These tools are ordered on six tabs. Clicking any of these tabs brings up an appropriate toolbar.
Dr.Geo defaults to a functional mode of operation. The user must click on a function tab and then a function button, or select a function from a menu, before selecting the object or objects to apply it to, and executing the function once. At this point, the application returns to its default state, in which the user can select and move objects. The user can abort any function before making the final selection with the Select and move button on the toolbar, or the Edit→Select and Move command.
This is in contrast to a modal application, in which clicking a function button puts the application into a mode that allows the command to be used multiple times in succession. To activate the modal mode the user selects Edit→Create multiple or the corresponding button in the toolbar. The commands for editing object styles and properties are always modal, allowing any number of objects to be modified without having to select the function repeatedly to apply it to each one. The user has to explicitly exit them, for example by returning to the select and move mode or starting some other command.
There is a mode toggle button for single/multiple creation, which switches from this functional mode to this modal mode, in which function selection is persistent. That is, selecting the line function allows the user to create multiple lines without having to select that function over again for each one.
When the user clicks one of these tabs, an additional toolbar displays immediately. It groups functions of the same family.
From left to right, we have access to tools to build points and lines, use transformations, calculate values, animate sketches, and manage macro construction and execution.
These functions also appear in the menus at the top of every Dr.Geo window.
Create a free point in the plane or on a line object (segment, ray, straight line, arc, circle, locus):
From this command, you can also create one intersection point between two lines (i.e. straight line, ray, segment, arc, circle). It is enough to click in the intersection of these. Moreover, Dr.Geo indicates it by the help bubble: Intersection.
Create the middle point between two points, or the midpoint of a segment:
Create one or several intersection(s) of two lines (i.e. straight line, ray, segment, arc, circle). The user has to select two lines. When one or both of the chosen lines is an arc or a circle then two intersection points may be created.
A possibility is to place two free values in the sketch – See numeric_tool – then build the point with these two values as coordinates – See coordinate_point. This possibility has an advantage over the previous one for some purposes. The point so constructed cannot be directly moved with the mouse. The point is constrained in its position.
Create a point defined by its coordinates. The user selects a script
returning a pair of x-y coordinates – See scriptCoordinates – or two values:
the first one is the abscissa (the x coordinate) and second one the ordinate (the y coordinate).
This function is mainly used to construct a locus of point.
This construction supposes beforehand the existence of two values – See numeric_tool – the point is then constructed by selecting these two values.
Create a straight line defined by two points. The user clicks on two points, or clicks on one point and drags to another.
Create a line parallel to a given direction and going through a point. The user clicks a point and a direction (i.e. straight line, ray, segment or vector).
Create a line perpendicular to a given direction and going through a point. The user clicks a point and a direction (i.e. straight line, ray, segment or vector).
Create a perpendicular bisector given a segment or two points. The user clicks on a segment or two points, or clicks and drags.
Create the angle bisector of an angle formed by three points. The users clicks on a geometric angle (defined by three points)
or clicks on three points. The line will bisect the angle at the second point.
Create a ray defined by two points. The user clicks on two points. The first one is the origin, the second one a point on the ray.
Create a segment given two points.
Create a vector given two points. The user select two points, the origin, the second one the terminal point.
Once the vector is created, it can be moved independently of the two points. This remains true when the vector is built from a transformation – See transformations.
Create a circle. The user can create it from different selections:
To create a circle from its centre and radius, you need a point and a value. The value must exist prior to the circle. It can be any sort of value: a computed value like a distance or a free value you edit. You create a free value from the "Numerics" tool – See numeric_tool.
Create an arc going through three points. The first one is the starting point, the third one is the end point, and the second one is a point on the arc.
Create an arc defined by its center and by starting and ending points. The first one is the centre, the second one is the starting point, and the third one is the end point.
Create a polygon defined by n points. The user selects n+1 points defining the polygon submits. The first and last ones are the same point, it indicates to Dr.Geo the selection is over. Mobile point can be added on polygon, but it is not possible to compute an intersection with another line. However geometric transformation of polygon are allowed.
Create a regular polygon defined by two points and a numeric value. The user selects its center, one vertex, and a value indicating the number of vertices. If the value selected is not an integer, it is truncated to the next lower integer.
Locus defined by two points. The user selects two points, one free on a line, the other one depending on it, so that moving the first point makes the location of the second point change. This dependent point is called a relative point.
For example, we can construct an ellipse based on its property that the sum of the distances from each point on the ellipse to two given points is constant.
Since CD is the perpendicular bisector of AB, the triangles ACD and BCD are congruent (side-angle-side). Therefore AD = BD. Then AD + DO = BD + DO, which is the radius BO, which is constant. D lies on the ellipse. Moving B all around the circle moves D all around the ellipse.
Transform an object by a reflection. The user clicks on the object to transform and the axis – straight line – of the reflection. When the object to transform is a straight line, the first clicked is the axe of the reflection.
Transform an object by a central symmetry. The user clicks on the object to transform and the centre of symmetry (a point). When the object to transform is a point, the first clicked is the centre of the symmetry.
Transform an object by a translation. The user clicks on the object to transform and a vector. When the object to transform is a vector, the first clicked is the vector of translation.
Transform an object by a rotation. The user clicks on the object to rotate, a centre (point) and an angle. When the object to transform is a point, the first clicked is the centre.
The rotation angle can be defined by three different means:
Transform an object by scaling it. The user clicks on the object to transform, the centre and the factor (i.e. a number). When the object to transform is a point, the first clicked is the centre.
Create a numeric value. The value, depending on the user selection, may be computed or user edited:
A newly created free value can be edited by clicking it. Later on, it can be edited by clicking the property button on the toolbar, described below, and then selecting the value.
This last possibility is very interesting for some situations. It lets the user set an arbitrary value to use for a given length, the radius of a circle, an angle measure (in radians) or the coordinates of a point. The value is then used by other specific tools to construct a circle, a rotation or a point defined by its coordinates.
Compute the angle defined by three points or two vectors. In the first case, the angle is considered as non oriented (i.e. angle whose measure belongs to the interval [0 ; 180]). In the second case, the angle is oriented and its measure belongs to the interval ]-180 ; 180].
Create the coordinates (abscissa and ordinate) of a point or vector.
Add a block of text in the sketch. The user clicks at the desired position, then edits the text. To edit the text again, the user clicks the property button described below, then the text.
Insert a Dr.Geo Smalltalk script in the sketch. The script expects a number of objects as arguments, and requires a target to attach the output to. It returns an object whose text representation is printed in the sketch, at the position clicked by the user. A script can be used for its side effects or for the value it returns, ready to be used for subsequent constructions. See the Smalltalk Script chapter for more details.
Edit or create a Smalltalk script. A script editor is opened for the user to edit any existing script or to create a new script.
The Dr.Geo Smalltalk scripting system is reviewed in detail in the chapter on advanced functionalities (See script).
Extract a construction sequence from the sketch and compile it as a macro construction.
macro constructions are covered in detail in its section (See macroConstruction).
Execute a macro construction. The macro construction can be newly created or loaded from a file.
An object can be deleted using the eraser tool or the Edit→Eraser command. Objects that depend on the deleted object will also disappear. When deleting a curve, the points used to define it remain behind. The action is undoable with the undo button in the toolbar or the undo menu item in the Edit menu.
Each geometric object has its own style attributes, which can include colour, line style, thickness, label, size and shape, and properties such as Fill, Translucent, and Hidden. An object that is hidden remains in the sketch, but is not seen except when editing properties, so that it can be found. Hiding intermediate construction is often useful to avoid clutter in the sketch. All these attributes are edited from a side panel displayed when the user enters style mode. To do so, click the button from the toolbar, and then select a particular item in the sketch.
The lateral panel for style of point is for points within every kind of object. Name, Colour, shape (x, dot, or block), size, visibility, and locking are adjusted from there. Only the position of free points on the plane or on a curve is lockable.
The side panel for style of line is for straight lines, rays, segments, vectors, circles, arcs, loci, and polygons. Name, colour, thickness, solid or dashed styles, and visibility are adjusted from there. Some properties only apply to particular kinds of line, as in the case of marks and arrowheads on segments.
The lateral panel for style of value is for all kinds of numeric value: free value edited by the user, measure, computed results from a Dr.Geo Smalltalk script. Colour, label and visibility are adjusted from here. The value can also be locked.
Some objects’ numeric or text values are editable. This includes the coordinates of free points on the plane or on a curve, free values and scripts. To edit the property, select this tool, then choose one of these objects in the sketch. A dialog box will appear:
Selecting a free point, a dialog box let you edit its abscissa and ordinate.
Selecting a free point on curve, a dialog box let you edit its curvilinear abscissa. It is normalised in the interval [0 ; 1]. This allows a curve to be treated as a parametric curve.
Selecting a free value, a dialog box let you edit its value.
Selecting the value displayed from a script, an editor is opened to let you study and edit it. To save any modification to a script, use the key shortcut Ctrl-s or the entry Do-it in the contextual menu over the script (right mouse click to display it).
Selecting a script, a dialog box let you edit it. The text can be formatted in several lines with carriage return – keyboard key Return.
The sketch can be moved with the wheels in the right bottom corner or directly with the right mouse button.
The sketch scale can be adjusted with the wheel on the top right of the window. The mouse wheel offers this same service; press simultaneously the keyboard key Shift to speed up the scaling.
An object is moved by clicking and dragging with the mouse. The whole sketch is then recomputed and redrawn to respect the constraints specified. Almost all geometric objects can be moved. If necessary, Dr.Geo moves the associated free points. For example, when the user drags a line defined by two points, the points are moved simultaneously.
In this mode, it is possible to change the nature of a point from:
to a point as:
For example, transforming a free point on the plane into an intersection point. However, there is one constraint: it is not possible to mutate a point toward a “younger” line (as free on the line or intersection with the line). Younger line means created chronologically after the point.
Pressing the keyboard key Shift while grabbing a point will display a balloon help text about the point you can mutate and the possible destinations.
Two free points can be merged: to do so drag one point over the second destination point and hold for a few seconds.
Various type of curve can be cloned to quickly duplicate identical objects. To do so press and hold the mouse button over the curve to clone. The curve will blink, and then a cloned curve is displayed, slightly offset from the original, ready to be positioned as the user chooses.
It is possible to show or hide a grid in every sketch with the button in the toolbar. The scale of the grid adjusts itself when the sketch is enlarged or shrunk. When saving a sketch, the grid state is saved as well.
When creating or moving points, it is possible to constrain them to snap to the grid, so that the point will appear at the grid position closest to the mouse pointer. To do so, activate the magnet tool from the button in the toolbar.