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

# Use of predefined constructions

publication Friday 21 August 2015.

Since version 3.3, predefined constructions are directly accessible via menu item Constructions - Implement predefined construction.

These constructions, as well as help (via F1 key) are available in the three different languages.

Let’s recall that you can create your own constructions end save the in mgc files in a directory you can specify via menu item Options - Preferences, tab Constructions directory.

To create your own constructions see this section.

### First example

We wish to create a crown delimited by two circles with the same center.

With tool create three free points you will name O, A et B then create with icon circle with center O and through point A then the circle with center O and through point B.

To visualize the crown we will use a predefined construction.

Use menu item Construction - Implement predefined construction.

A dialog box pops up. Double click on directory named Surfaces to get it opened.

Click on file Crown.mgc (see in the bottom frame explanations on this construction then click on button Open.

As asked for in the indication line, click on the two circles already created.

A crown appears.

This crown is hatched but you can change the filling style and the color by clicking on another color () and change the filling style pattern () . Click then on one of the two circles (You will be asked to choose between a circle or a surface : choose surface) to change the color and the filling style pattern.

### Second example

We wish to graph in a space frame the surface of equation $z = \sin(\sqrt{x^2+y^2})$.

A predefined construction allows the user to do this very easily.

It uses as source object a function oof two variables.

Use menu item File- <new file without unity length to create an empty figure..

Check with menu item Options - Preferences, tab Angle unity that the angle unity of the figure is radian.

Use then menu item Calculation - New real calculation - Function of two variables. In the dialog box that pops up, enter f for the function name, u and v as formal variables the in the frmula editor enter sin(sqrt(u^2+v^2)).

Use menu item Constructions - Implement predefined construction.

A dialog box pops up. Double click on the directory named Space Version2 to get it opened.

Click on file SurfaceFunction2Var.mgc then click on button Open.

A dialog box pops up.

In the left list box, click on number 1. The first source element required is a real function of two variables. Click on f.

Click on element n°2 which is mini value of x. Enter - 5.
In the same way, enter 5 for element n° 3 (maxi value of x) then -5 for element n° 4 (mini value of y) et 5 for element n°5 (maxi value of y). Validate OK.

The figure below appears :

On the top right side of the window, moveable points allow the user to turn the figure around the z-axis or to change the perspective.

Selecting tool of execution of a macro the clicking on the macro named Section by plan // (yoz) will make visible the section of the surface by a plan of equation $x = \alpha$. You will then be able to capture $\alpha$.

You can do the same for a pan parallel to (xoz) plan.

You can see here the power of MathGraph32 constructions : a few sources objects to get a very sophisticated figure.

To be noticed :

The surface is represented by two locuses of objects. A click on one of thse two locuses with tool will allow you to change the number on locuses (to get a more precise meshing).

A click on key F6 will show you that MathGraph32 as created calculations named xmin, xmax, ymin and ymax containing values -5 et 5. You can change this calculuses with tool