Overview of Descartes-Geometry

by

Denis Monasse

Mathsoft Overseas

Availability

Descartes is a registered trade mark of Mathsoft Overseas, Inc. Copyright © 1992, by Mathsoft Overseas, Inc.

The program Descartes®-Geometry is available on any platform at 30 % of the Mathematica price. 

For information and orders, please contact:
Mathsoft Overseas, cp 641, 1211 Geneva 3 (Switzerland). 
Tel: 41 22 / 346 52 60. Fax: 41 22 / 346 59 39

Introduction

In the seventeenth century, two french mathematicians, Pierre de Fermat and RenÎ Descartes, realized that algebra and geometry could be unified in a single science that was called analytic geometry. In fact, the recognition for the foundation of the new science went to Descartes although Fermat's work was a little earlier. The reason is due to the formalism used by Descartes who adopted the notation of modern algebra whereas Fermat had kept the cumbersome greek notations. Today, we can resume the treatment of analytic geometry in the context of the modern computers and information languages among which Mathematica is especially well adapted with its outstanding graphics facilities and its functional programming.
				Let us start

Geometric transformations

The three geometric transformations: translation, rotation and homothety are coded in Descartes-Geometry as operators depending on some arguments.

Translation

The translation is defined by a vector OM which must have the head POINT in the argument of the operator Shift. In the following example, bt is the point deduced from b by translation defined by AC which is represented by the Descartes primitive VECTOR.

bt=Shift[c][b]
Draw[PointSize[.02],Blue,{a,"A"},{b,"B"},{c,"C"},
     VECTOR[a,c],
     Red,{bt,"B'"}]

It must be noted that the geometric transformations may be applied to any type of Graphics object by using a POINT function

sin=POINT[t,Sin[t]];
sint=Shift[c][sin]
ParametricPlot[Evaluate[{{t,Sin[t]},List@@sint}],
               {t,-Pi,Pi},Axes->False]

Rotation

A rotation of center C and angle t is obtained with the command Rotate[C,t]. In the following example, the circle c2 is rotated about the point A by the angle 2„/3 and becomes c2'.

c2r=Rotate[a,2Pi/3][c2]
Draw[Blue,c2,PointSize[.02],
     {POINT[c2[[1]],c2[[2]]],"c2"},{a,"A"},
     Red,c2r,{POINT[c2r[[1]],c2r[[2]]],"c2'"}];

Homothety

The homothety given by the operator Zoom needs also two arguments: the center of homothety and the ratio. The triangle tr is transformed by a homothety of center a and ratio 2.

trh=Zoom[a,2][tr]
Draw[Blue,tr,PointSize[.02],{a,"A"},{b,"B"},{c,"C"},
     Red,trh,{trh[[2]],"B'"},{trh[[3]],"C'"}];

The Chinese Star

Geometry is not limited to abstract constructions, it appears in many human activities such as mechanics, optics, architecture, graphic art, etc. We shall show an animation which describes the generation of a game: the Chinese Star where marbles are gathered on a colored base and must reach the opposite base by jumping over other marbles according to the rule of the symmetry with respect to a point. The game has the shape of a stellated hexagon paved of equilateral triangles. By a set of translations, symmetries and rotations, the full figure can be generated from the central equilateral triangle.

(* marbles positions and paths *)

a1=POINT[0,0];
a2=POINT[1/2,Sqrt[3]/2];
a3=POINT[-1/2,Sqrt[3]/2];
l[0]={POLYGON[a1,a2,a3],{a1,a2,a3}};
l[1]=NestList[Shift[a2],l[0],3];
l[2]=NestList[Drop[#,{Length[#]}]&@
               Apply[Shift[a3],#]&,
              l[1],3];
l3=l[2]/STRAIGHT[0,1,-2Sqrt[3]];
l[3]=Join[l[2],l3]//Flatten//Union;
Table[l[i]=Rotate[a1,Pi/3][t[i-1]],{i,4,8}];
Draw[PointSize[.03],#,
     PlotRange->{{-8,8},{-8,8}}]&/@
 FoldList[Union@Flatten@Join[#1,#2]&,
          l[0],
          Array[l,8]];

(* bases *)

a4=POINT[0,13Sqrt[3]/3];a5=Rotate[a1,Pi/3][a4];
h=RegularPolygon[a4,a5,6,2];
te0=POLYGON[Vertex[h[[1]],1],
            SideLine[h[[2]],3]*SideLine[h[[1]],1],
            SideLine[h[[2]],3]*SideLine[h[[1]],3]];
tex=NestList[Rotate[a1,Pi/3],te0,5];
color=Apply[CMYKColor,#]&/@{{1,0,0,0},{0,1,1,0},
                            {0,1,0,0},{1,0,1,0},
                            {0,0,1,0},{1,1,0,0}};
Do[tex=Insert[tex,color[[i]],2i-1],{i,6}];
s1=Draw[tex,
        Fill->True,
        PlotRange->{{-8,8},{-8,8}},
        DisplayFunction->Identity];
s2=Draw[PointSize[.03],
        NestList[Rotate[a1,Pi/3],t[3],5],
        PlotRange->{{-8,8},{-8,8}},
        DisplayFunction->Identity];
Show[s1,s2,DisplayFunction->$DisplayFunction]