Open source cross-platform software of geometry, analysis and simulation - Yves Biton

# Presentation of constructions

publication Sunday 12 December 2021.

This article has been adapted to the JavScript version of MathGraph32, the Java version is not supported any more.

MathGraph32 constructions offer the user the ability to incorporate in a figure very sophisticated elements in an easy way.

To use a construction, you simple have to choose the sources elements and the construction will complete the figure, incorporating elements (intermediary or final). Some of these elements will be invisible (intermediary objects) end the others (final objects) wile be available to create other objects.

In the JavaScript version, predefined constructions are no longer part of the software but you may download them on this or underneath.

Constructions for JavaScript version of MathGraph32

These predefined constructions are sorted by directories.

You may also create your ownconstructions and group them in directories.

To create a construction, you must first create a figure , activate complementary tools with icon then use icon to choose numerical and graphical objects.

Then you can choose the numerical and final objects with icon . Choosing your final objects, you can only choose objects exclusively constructed from the sources objects.

Once the sources and final objects choses, you can use icon and choose item Finish current construction. Then you are asked to choose a name for the construction. Choose a name as evactive as possible. It is also better to give informations about the way to use your construction in the commentary.

At the end of this commentary you can enter informations which will be displayed when the user will have to choose a source object.

For instance, if your construction is wiating for two sources objects, a numerical value which is supposed to be the radius of a circleand and a point which will be the center of this circle, add these lines at the end of the commentary :

#1:the circle radius #2:the circle center

Once your construction created, it is part of your figure but it is better to also save the construction in a mgc file with icon by choosing item Save a construction of the figure. It is better to keep the same name for the figure and the mgc file.

To be noticed:

When a construction is used, numerical objects are always chosen first.

Frames are considered as numerical objects.

When a construction is implemented in a figure, intermediary objects used to create the final objects from the sources objectsare not usable (but are visible in the protocol dialog box via icon of the upper toolbar by selecting the checkbox Intermediary objects).

Intermedary objects of construction can be merged in the figure. Then they will become usuel objects. For this use icon and choose item Merge constructions of the figure.

This may be useful to improve a construction already created.

### How to use a construction of the figure

Use icon and choose item Implement a construction of the figure.

You are first asked to choose the construction to be implemented then to choose the sources objects.

Numerical sources objects are first chosen via a dialog box allowing to assign to a numerical source object :

• either a numerical object already created (and compatible)
• either, if it is a calculation, a calculation defined by a formula.

Once the numerical sources objects dialog box filled in, you have to click on the graphical sources objects (temporary messages appear on the top right corner of the figure).

### How to use a construction contained in a mgc file :

Constructions are stored in mgc files.

Click on icon and choose item Incorporate construction from file.

Browse to the directory containing the construction and click on button Open. The construction is now part of your figure.

To be noticed:

When a construction is used, numerical objects are always chosen first.

Frames are considered as numerical obejcts.

When a construction is implemented in a figure, intermediary objects created by the construction are not available for creating other objects, but are visible in the protocol display (F5 key) if the checkbox Trace through constructions is selected.

Intermediary objects may be merged in the figure. They will then become usual objects. For this, use menu item Constructions - Merge constructions implemented in figure. This will be useful if you want to modify an already defined construction.

Graphical sources objects

Graphical sources objects of a construction can be objects of the following types : free point, linked point, line, half-line, segment, circle, arc of circle, polygone, broken line.

You must be careful for the choice of sources objects when you create a construction.

If a free point is chosen as source object when creating a construction, when this construction will be implemented, a some point can be chosen (including a free point).

On the contrary, if a linked point has been chosen for source object in a creation of construction, when this construction will be implemented, you will have to choose a linked point.

Numerical sources objects

Numerical sources objects may belong to the following types : real or complex calculus, function of one, two or three variables (real or complex), recurrent sequence (real or complex) and variable.

You must be careful for the choice of numerical sources objects when you create a construction.

If a real calculus has been chosen for source object when creating a construction, when this construction will be implemented, a some real value can be chosen, for example an angle measure or a variable.

On the contrary, if a variable has been chosen for a source object when creating a construction, when this contruction will be implemented, you will have to specify a variable.