DrGeo

DrGeo
DrGeo
Original author(s) Hilaire Fernandes
Initial release December 31, 1996 (1996-12-31)
Stable release 10.12 / November 20, 2010; 11 months ago (2010-11-20)
Development status Active
Written in Pharo
Operating system Linux, Mac OS X, Windows
Type Interactive geometry software
License GPL
Website ofset.org/drgeo

DrGeo is a free (under GNU GPL license) software, created by Hilaire Fernandes for the Ofset. As its names suggests, it is a geometry software. It runs over GTK+ interface.

Contents

Objects

Points

DrGeo has two kinds of points: A free one, which can be moved with the mouse (but may be attached to a curve), and a point given by its coordinates.

There is also the intersection of 2 curves and the midpoint of a segment.

Lines

DrGeo is equipped with the classic line, ray, segment and vector.

There are also the circle (defined by 2 points) but also the less classic arc by three points. DrGeo can also construct polygons (given by points) and loci.

Transformations

Besides the parallel and perpendicular line through a point, DrGeo can apply to a point one of these transformations:

  1. reflexion
  2. symmetry
  3. translation
  4. rotation
  5. homothety

Macros

When some objects, called final depend from other objects, called initial it is possible to create a new transformation sending the initial objects to the final ones. This is a macro. It allows to add new objects to DrGeo like regular polygons or new transformations like circle inversion.

Scripting

DrGeo comes up with a script language, which is Scheme (a Lisp-like language).

Scheme object

It is possible also to create a Guile object, which is a number, but created with a script, written in the Scheme syntax. It can have one or several variables, which are chosen at the creation of the object, with mouse clicks. The names of the variables are a1, a2 etc. For example, if one wants the square of a number a1, the script

(define x (getValue a1))
(* x x)

creates a numeric object, whose value is the square of the first number. If now the first number is changed, the second one changes too.

If now one wants to implement the square of a complex number, one has to create 2 numeric values, one for the real part, and the other one for the imaginary part. As (x + iy)2 = x2y2 + i(2xy), the script for the real part is (once one has selected a free point)

(define x (car (getCoordinates a1)))
(define y (cadr (getCoordinates a1)))
(- (* x x) (* y y))

and the script for the imaginary part (with the same point selected):

(define x (car (getCoordinates a1)))
(define y (cadr (getCoordinates a1)))
(* 2 x y)

getCoordinates a1 yields a list because a1 is a point, which has 2 coordinates. The CAR of this list is the first coordinate, which is the abscissa, and the CADR of the list (the CAR of the CDR) is the second coordinate.

Once this is done, it remains only to create a point which coordinates are the two numbers created by scripts, and a transformation is defined; it implements the function \C \rightarrow \C, z \mapsto z^2 and can be transformed into a macro.

Scheme-generated figure

The Guile object can only create one number, then if one wants to create a complex figure by a script, one has to write the script with a text editor, save it with the scm file extension, then make DrGeo evaluate the file.

Here is how DrGeo can create a Sierpinski triangle recursively:

(new-figure "Sierpinski")
(define (sierpin p1 p2 p3 n)
 
(let* (  
 
    (p4 (Point "" milieu-2pts p2 p1))
    (p5 (Point "" milieu-2pts p2 p3))
    (p6 (Point "" milieu-2pts p3 p1))
 
    (q1 (Polygone "" npoints p1 p4 p6))
    (q2 (Polygone "" npoints p2 p4 p5))
    (q3 (Polygone "" npoints p3 p5 p6)))  
 
 
    (if (> n 1)
    (begin
    (envoi q1 masquer)
    (envoi q2 masquer)
    (envoi q3 masquer)))    
 
    (envoi p4 masquer)
    (envoi p5 masquer)
    (envoi p6 masquer)
 
    (if (> n 0)
    (begin 
     (sierpin p1 p4 p6 (- n 1))
     (sierpin p2 p4 p5 (- n 1))
     (sierpin p3 p5 p6 (- n 1))))))
 
(soit Point "A" free -3 -1)
(soit  Point "B" free 3 -1)
(soit Point "C" free 0 3)
 
(sierpin A B C 5)

See also

  • Compass and straightedge construction
  • Interactive geometry software

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • DrGeo — Développeur Hilaire Fernandes Dernière version 1.0 (31 12 2005) [ …   Wikipédia en Français

  • DrGeoII — Développeur Hilaire Fernandes Dernière version 10.12 (5 3 2011) [ …   Wikipédia en Français

  • Kig — kde interactive geometry Exemple de construction d un cercle avec Kig …   Wikipédia en Français

  • CaRScript — Un CaRScript est un script pour CaRMetal. Le terme est un néologisme obtenu par apocope et aphérèse sur l expression CaRMetal JavaScript . Le langage des CaRScripts est donc JavaScript. Mais des instructions spécifiques à la géométrie dynamique… …   Wikipédia en Français

  • List of interactive geometry software — Interactive geometry software (IGS, or dynamic geometry environments, DGEs) are computer programs which allow one to create and then manipulate geometric constructions, primarily in plane geometry. In most IGS, one starts construction by putting… …   Wikipedia

  • C.a.R. — C.a.R. Développeur R. Grothmann Dernière version 6.4 ( …   Wikipédia en Français

  • Cabri Géomètre — est un logiciel commercial de géométrie dynamique destiné principalement à l apprentissage de la géométrie en milieu scolaire. Il permet d animer des figures géométriques, au contraire de celles dessinées au tableau. Il se décline pour la… …   Wikipédia en Français

  • Cinderella (logiciel) — Cinderella est un logiciel commercial allemand de géométrie dynamique destiné principalement à l apprentissage de la géométrie en milieu scolaire. Il permet d animer des figures géométriques de dimension 2, de créer des laboratoires de physique… …   Wikipédia en Français

  • Dr. Geo — Développeur Hilaire Fernandes Dernière version 1 …   Wikipédia en Français

  • Dr. geo — Développeur Hilaire Fernandes Dernière version …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”