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

Display of a dynamic protractor using a macro-construction

publication Saturday 17 October 2020.


In this article I will explain how to display a dynamic protractor in a MathGraph32 figure using a macro construction I will give you.

Capture of point I will turn the protractor.

Capture of point A will modify the protractor’s size (I is linked to a circle of centerO and going through point A).

Below an example figure :

The macro-construction is contained in the zip file underneath. You have to dowload it and unzip the file in the directory of your choice

protractor.zip

I won’t explain how the macro construction was built (it is a bit technical with object locuses).

Create a new figure (with or without length unity) and create two free points O and A.

Create the cercle of center O et going through point A and a point I linked to this circle.

In the upper toolbar top right, , click on icon to make a few more tools available.

Click on icon (management of macro construcitons).

Choose Incorporate construction from file and go fetch the .mgf file Protractor.mgf in the directory the zip file has been unzipped in.

Again click on icon and choose Implement a construction of the figure.

Choose the contruction Rapporteur.

A dialog box pops up asking you to choose numerical sources objects.

There are here four numerical sources objects.

The firts numerical source object (n°1 in the left list) is the thickness of the protractor in pixels (distance bet ween the two half circles). Enter a value of 60 like underneath :

Then click on number 2 in the left list.

You are asked for the size (in pixels) of the little graduations : enter 8 as value.

In the same way enter 15 et 24 for sources numerical objects n°3 et 4.

Validate.

Now you are asked to click on the center of the protractor : click on point O.

Then you are asked to click on graduation 0 : click on point I

That’s all : your protractor appears.