Logiciel libre de géométrie, d'analyse et de simulation multiplateforme par Yves Biton

Accueil Tutoriels l’API de MathGraph32

Programming a figure in Python : Exemple 1 (basic)

modification vendredi 22 avril 2024.

Toutes les versions de cet article : [English] [français]



Version 7.9.1 of MathGraph32 allows you to create objects in a figure using Python language.

First basic example : The following code creates three free points A, B and C with a starting position relative to the frame of the figure (set of coordinates) then creates the polygon joining the three vertices, the point G1 center of the circumscribed triangle of this triangle, segments [GA], [GB] and [GC], the the circumscribed cricles of triangles ABG1, BCG1 and CAG1.

Please notice that this code needs a figure with a frame to be runned (You can change the starting figure using the choice list under the figure).