CaRMetal
Encyclopedia
CaRMetal is an interactive geometry program which inherited the C.a.R.
C.a.R.
C.a.R.– Compass and Ruler – is a free and open source interactive geometry software that can do geometrical constructions in Euclidean and non-Euclidean geometry. The software is Java based. The author is R...

 engine. The software has been created by Eric Hakenholz, in the Java (language). CaRMetal is free, under GNU GPL license. It keeps an amount of functionality of C.a.R. but uses a different graphical interface which purportedly eliminates some intermediate dialogs and provides direct access to numerous effects. Constructions are done using a main palette, which contains some useful construction shortcuts in addition to the standard compass and ruler tools. These include perpendicular bisector, circle through three points, circumcircular arc through three points, and conic section through five points. Also interesting are the loci, functions, parametric curves, implicit plots. Element thickness, color, label, and other attributes (including the so-called magnetic property) can be set using a separate panel.

CaRMetal also supports a configurable restricted construction palette and has assignment capabilities, which use an apparently unique feature called Monkey. CaRMetal has a script language (actually, JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 with the rhino (JavaScript engine)
Rhino (JavaScript engine)
Rhino is an open source JavaScript engine. It is developed entirely in Java and managed by the Mozilla Foundation. The Foundation also provides another implementation of JavaScript engine written in C known as SpiderMonkey....

 from Mozilla
Mozilla
Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

 foundation) which allows the user to build rather complex figures like fractal
Fractal
A fractal has been defined as "a rough or fragmented geometric shape that can be split into parts, each of which is a reduced-size copy of the whole," a property called self-similarity...

s. CaRMetal has several locales including French, English, Spanish, German, Italian, Dutch, Portuguese and Arabic.

Anticipation

When one chooses a tool like the parallel to a line through a point, or a circle, the intended object appears in yellow color and follows the mouse movements. This allows the child to make conjectures even before the construction is finished. This constant interaction between the pupil and the object of experimentation is in phase with modern theories about didactics
Didactics
A didactic method is a teaching method that follows a consistent scientific approach or educational style to engage the student’s mind.The didactic method of instruction is often contrasted with dialectics and the Socratic method; the term can also be used to refer to a specific didactic method,...

 and, in this view, CaRMetal is intended to be used by learning
Learning
Learning is acquiring new or modifying existing knowledge, behaviors, skills, values, or preferences and may involve synthesizing different types of information. The ability to learn is possessed by humans, animals and some machines. Progress over time tends to follow learning curves.Human learning...

 subject
Subject
-Philosophy:*Hypokeimenon or subiectum, in metaphysics, the essential being of a thing**Subject , a being that has subjective experiences, subjective consciousness, or a relationship with another entity...

s.

Amodality

The windows which show the history, the tools palette, the properties of the selected object are around the figure and never above it. These windows are not modal window
Modal window
In user interface design, a modal window is a child window that requires users to interact with it before they can return to operating the parent application, thus preventing the workflow on the application main window...

s in the sense that they never hide the construction. For example, whenever the user wants to change the color of a polygon, he sees the new color immediately.

Transformations

When a transformation (for example a macro) has been defined, such that it transforms points into points, this transformation can also be applied to curves. Once again, this allows the learning subject to see the properties of the transformation at a glance, even before the transformation has actually been applied.

Assignments

The workbooks (see below) can be exported as html
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 files, with a restricted tools palette (for example, leaving only the intersection and circle tools lets the pupil make compass-only construction). To create an assignment, the teacher chooses the initial objects, the objects to be created by the pupil, and writes a text explaining what is to be done. Since 2010, when the pupil has finished the construction and wants to test it, random variations are tested (with a tool called Monkey) and a quality note is attributed to the pupil (actually, a percentage of the good constructions amongst the variations).

Macros

The macros can be organized in a hierarchy of folders, which make it easy to transform CaRMetal into a tool allowing to explore non-euclidian geometries.

workbooks

Since 2010, CaRMetal uses a folder system allowing one to put several figures in one folder, called "workbook". It is easy to navigate between the sheets of a workbook, to duplicate a sheet (or figure), to merge several workbooks into one. CaRMetal allows one to include picture files and JavaScript files into a figure. The file extension of a figure is zir like in C.a.R.
C.a.R.
C.a.R.– Compass and Ruler – is a free and open source interactive geometry software that can do geometrical constructions in Euclidean and non-Euclidean geometry. The software is Java based. The author is R...

 (by the way, there is much compatibility between both software) and the file structure is a meta-description of the figure in the XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 language. But a workbook is saved as a zipped folder containing all the zir figures, plus the included pictures (GIF
GIF
The Graphics Interchange Format is a bitmap image format that was introduced by CompuServe in 1987 and has since come into widespread usage on the World Wide Web due to its wide support and portability....

, JPEG
JPEG
In computing, JPEG . The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality....

 or PNG) and a preferences file.

numeric display

It is possible to convert any numerical measure of the figure into text, for display purposes. For example, if a segment called 's1' is 4.5 unit long, writing

"The length of the segment is %s1%"

creates a character string which displays as The length of the segment is 4.5. This character string can be included into the figure but also set as the alias of an object (for example s1) or the name of an expression. Of course when one of the extremities of the segment is moved with the mouse, the text is edited in real time. This is called a dynamic text.

CaRMetal uses HotEqn and JLatexMath which are LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

 parsers, and it is possible to write LaTeX formulae inside text objects. For example, if poly1 is a square, and one wishes to find a circle which area is the same as the square's one, one can build a text expression like this:

"The radius of the circle would be $\sqrt{\frac{%poly1%}{\pi}}\simeq %sqrt(poly1/pi)%$"

This can give a text such as this:

The strength of this feature comes from the fact that it is possible to mix up dynamic texts with LaTeX formulae, getting dynamic LaTeX(when the size of the square changes, the display changes too)!

2.5D

CaRMetal allows the user to set some properties of the objects, like their color or the fact that they are visible or not, as conditional. Also each object can have a layer number. An important application of these features is the 3D mode of CaRMetal, which comes up with a regular tetrahedron, a cube
Cube
In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex. The cube can also be called a regular hexahedron and is one of the five Platonic solids. It is a special kind of square prism, of rectangular parallelepiped and...

, a diamond
Diamond
In mineralogy, diamond is an allotrope of carbon, where the carbon atoms are arranged in a variation of the face-centered cubic crystal structure called a diamond lattice. Diamond is less stable than graphite, but the conversion rate from diamond to graphite is negligible at ambient conditions...

 and a regular dodecahedron. It is also possible to bind a point to the inside of a circle or polygon. This feature, inherited from C.a.R.
C.a.R.
C.a.R.– Compass and Ruler – is a free and open source interactive geometry software that can do geometrical constructions in Euclidean and non-Euclidean geometry. The software is Java based. The author is R...

, is based on barycentric coordinates
Barycentric coordinates (mathematics)
In geometry, the barycentric coordinate system is a coordinate system in which the location of a point is specified as the center of mass, or barycenter, of masses placed at the vertices of a simplex . Barycentric coordinates are a form of homogeneous coordinates...

. One can speak about 2.5D because CaRMetal is not quite a 3D software, but more than just a 2D software either.

Magnetism

A point can be made magnetic with a distance and a list of objects it is attracted to whenever the point is sufficiently near one or several of these objects (sufficiently near means that the distance between them is less than the minimal distance which is a property of the point, and is measured in pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

 units). For example, when a point is attracted to a finite set of points, which themselves are fixed, it can explore a finite geometry
Finite geometry
A finite geometry is any geometric system that has only a finite number of points.Euclidean geometry, for example, is not finite, because a Euclidean line contains infinitely many points, in fact as many points as there are real numbers...

.

JavaScript inside CaRMetal

The script tool mixes up algorithmics and geometry
Geometry
Geometry arose as the field of knowledge dealing with spatial relationships. Geometry was one of the two fields of pre-modern mathematics, the other being the study of numbers ....

. Such scripting tools exist also in DrGeo
DrGeo
DrGeo is a free software, created by Hilaire Fernandes for the Ofset. As its names suggests, it is a geometry software...

, Kig
Kig (software)
Kig is free and open source interactive geometry software, which is part of theKDE edutainment project. It has some facilities for scripting in Python, as well as the creating macros from existing constructions.- Import and export :...

 and Cinderella (software)
Cinderella (software)
Cinderella is a proprietary interactive geometry software, written in Java programming language.- History :Cinderella was initially developed by Jürgen Richter-Gebert and Henry Crapo and was used to input incidence theorems and conjectures for automatic theorem proving using the binomial proving...

. To run a script, one clicks over the icon representing a traffic light
Traffic light
Traffic lights, which may also be known as stoplights, traffic lamps, traffic signals, signal lights, robots or semaphore, are signalling devices positioned at road intersections, pedestrian crossings and other locations to control competing flows of traffic...

. A script can be attached to one or several points, so that any movement of one of these points runs the script. This allows some kind of inverse kinematics
Inverse kinematics
Inverse kinematics is a subdomain of kinematics, which is of particular interest in robotics and computer animation. In contrast to forward kinematics, which calculates the position of a body after a series of motions, inverse kinematics calculates the motions necessary to achieve a desired...

 much like with GeoLicia.

Variables

To create a geometric object in JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 it suffices to click on an icon representing the object. The JavaScript instruction appears in the editor, with predefined parameters. The user has then only to edit these, and does not have to use mnemotechnics. But when a geometric object is created, the variable which called the routine is really a character string, containing the name of the object.

For example,


a=Point(2,3);


creates a point, usually called P1 and the variable a contains the string "P1". This allows to refer to the point by its name. The coordinates of the point are initialized but the point can still move with the use of the mouse. It is also possible to create a point in procedural programming
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...

 with


Point("A",2,3);


In this case, the name of the point is "A" (unless there be already an object called "A"), and no variable is set to the name "A".

Input-Output

To output a variable, there are four ways:
  1. Create an expression inside the figure (or display with a graphic mean such as an histogram);
  2. Print which opens a new window and prints the content of the variable in it;
  3. Println which also goes to the line;
  4. Alert which opens an alert window, which closes as soon as the user clicked on OK.


To input a variable, there is
  1. Input (you bet!) which opens an input window (with a text) and waits for the click on OK
  2. InteractiveInput which lets the user choose an object in the figure


This paradigm
Paradigm
The word paradigm has been used in science to describe distinct concepts. It comes from Greek "παράδειγμα" , "pattern, example, sample" from the verb "παραδείκνυμι" , "exhibit, represent, expose" and that from "παρά" , "beside, beyond" + "δείκνυμι" , "to show, to point out".The original Greek...

 considers the variables of the program not necessarily as numeric or string variables but can act on graphic objects too. This is a common feature with Kig
Kig (software)
Kig is free and open source interactive geometry software, which is part of theKDE edutainment project. It has some facilities for scripting in Python, as well as the creating macros from existing constructions.- Import and export :...

 (but in this case, the language is Python (language) and DrGeo
DrGeo
DrGeo is a free software, created by Hilaire Fernandes for the Ofset. As its names suggests, it is a geometry software...

 (in this case, with Scheme (language)).

Strings

It is also possible to set the coordinates of a point as character strings written in the language of CaRMetal. For example, to have a point B which follows A except that B's coordinates are integer (to model a gaussian integer
Gaussian integer
In number theory, a Gaussian integer is a complex number whose real and imaginary part are both integers. The Gaussian integers, with ordinary addition and multiplication of complex numbers, form an integral domain, usually written as Z[i]. The Gaussian integers are a special case of the quadratic...

) one can write


a=Point("2.72","3.14");
b=Point("round(x_a)","round(y_a)");

Loops

As an example, the Sierpinski triangle
Sierpinski triangle
The Sierpinski triangle , also called the Sierpinski gasket or the Sierpinski Sieve, is a fractal and attractive fixed set named after the Polish mathematician Wacław Sierpiński who described it in 1915. However, similar patterns appear already in the 13th-century Cosmati mosaics in the cathedral...

 can be built up as an iterated function system
Iterated function system
In mathematics, iterated function systems or IFSs are a method of constructing fractals; the resulting constructions are always self-similar....

 with this recursive script, which is rather short because of the already available graphic instructions such as MidPoint:


a=Point(-4,-2);
b=Point(4,-2);
c=Point(0,4);
m=Point(Math.random,Math.random);
SetHide(m,true);
for(n=0;n<2000;n++){
dice=Math.ceil(Math.random*3); //A 3-faces dice!
switch(dice){
case 1: {p=MidPoint(a,m); break;
}
case 2: {p=MidPoint(b,m); break;
}
case 3: {p=MidPoint(c,m); break;
}
}
SetPointType(p,"point");
m=p;
}


After the cloud of points has been built up (and even while the script is still running!) one can make A, B and C move with the mouse (or automatically with the Monkey): The triangle is dynamic!

JavaScript objects

CaRMetal can also use the JavaScript objects like
  1. arrays, useful to make statistics
    Statistics
    Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

     on geometric figures;
  2. date object, useful to measure time;
  3. String and RegExp objects, which make it easy to implement L-system
    L-system
    An L-system or Lindenmayer system is a parallel rewriting system, namely a variant of a formal grammar, most famously used to model the growth processes of plant development, but also able to model the morphology of a variety of organisms...

    s;
  4. General JavaScript objects can be used to create new geometric objects like complex numbers, matrices
    Matrix (mathematics)
    In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

     etc. This object-oriented programming
    Object-oriented programming
    Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

     works much like Kig
    Kig (software)
    Kig is free and open source interactive geometry software, which is part of theKDE edutainment project. It has some facilities for scripting in Python, as well as the creating macros from existing constructions.- Import and export :...

    's Python
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

     scripts, but as of today no one seems to have publish anything using that.

See also

  • C.a.R.
    C.a.R.
    C.a.R.– Compass and Ruler – is a free and open source interactive geometry software that can do geometrical constructions in Euclidean and non-Euclidean geometry. The software is Java based. The author is R...

  • Compass and straightedge construction
  • Interactive geometry software
    Interactive geometry software
    Interactive geometry software 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 a few points and using them to define new objects such as lines, circles or other points...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK