CaRMetal

Last updated
CaRMetal
CaRMetal.png
CaRMetal-Conics.jpg
Two conic sections using CaRMetal
Original author(s) Eric Hakenholz
Developer(s) Eric Hakenholz, Patrice Debrabant, Pierre-Marc Mazat, Alain Busser
Initial releaseOctober 28, 2006 (2006-10-28)
Stable release
4.3 / September 11, 2020;16 months ago (2020-09-11)
Repository none OOjs UI icon edit-ltr-progressive.svg
Written in Java
Platform Java
Type Interactive geometry software
License GNU General Public License
Website https://carmetal.en.uptodown.com/windows

CaRMetal is an interactive geometry program which inherited the C.a.R. engine. The software has been created by Eric Hakenholz, in Java. 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, and implicit plots. Element thickness, color, label, and other attributes (including the so-called magnetic property) can be set using a separate panel.

Contents

CaRMetal also supports a configurable restricted construction palette and has assignment capabilities, which use an apparently unique feature called Monkey. CaRMetal has a scripting language (JavaScript) which allows the user to build rather complex figures like fractals. CaRMetal has several locales including French, English, Spanish, German, Italian, Dutch, Portuguese and Arabic.

Didactic interest

Anticipation

When one is constructing a parallel line, it follows the mouse, which makes it easy to emit conjectures even while the figure is still under construction. CIRMParallL.png
When one is constructing a parallel line, it follows the mouse, which makes it easy to emit conjectures even while the figure is still under construction.

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 user 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 and, in this view, CaRMetal is intended to be used by students.

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 windows 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 Monkey button Monkeybtn off.png
the Monkey button

The workbooks (see below) can be exported as html 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-euclidean geometries.

Special features

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. (by the way, there is much compatibility between both software) and the file structure is a meta-description of the figure in the XML language. But a workbook is saved as a zipped folder containing all the zir figures, plus the included pictures (GIF, JPEG or PNG) and a preferences file.

Numeric display

An example of a matrix which can be changed in real time with the extremities of the vectors, and displayed with LaTeX. MatriceDynamique.png
An example of a matrix which can be changed in real time with the extremities of the vectors, and displayed with LaTeX.

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 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)!

3D

a dodecahedron can be turned with the mouse CMdodec.png
a dodecahedron can be turned with the mouse

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 was the 2.5D mode of CaRMetal, emulating 3D geometry. Since the version 4.0 CaRMetal has a real 3D mode which comes up with a regular tetrahedron, a cube, a diamond and a regular dodecahedron. It is also possible to bind a point to the inside of a (3D) circle or polygon. This feature, inherited from C.a.R., is based on barycentric coordinates. Since the 4.1 version CaRMetal permits some turtle graphics (programmed in JavaScript) either in 2D or in 3D.

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 units). For example, when a point is attracted to a finite set of points, which themselves are fixed, it can explore a finite geometry.

Network

Since 2013 there is the possibility to run one CaRMetal figure as server (typically, the teacher's one) and several as clients. Therefore, it is possible

JavaScript inside CaRMetal

The script tool mixes up algorithmics and geometry. Such scripting tools exist also in DrGeo, Kig and Cinderella (software). To run a script, one clicks over the icon representing a traffic light. 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 much like with GeoLicia.

Variables

To create a geometric object in JavaScript 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 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 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 (but in this case, the language is Python (language)) and DrGeo (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) one can write

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

Loops

As an example, the Sierpinski triangle can be built up as an iterated function system 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){case1:{p=MidPoint(a,m);break;}case2:{p=MidPoint(b,m);break;}case3:{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 on geometric figures;
  2. date object, useful to measure time;
  3. String and RegExp objects, which make it easy to implement L-systems;
  4. General JavaScript objects can be used to create new geometric objects like complex numbers, matrices etc. This object-oriented programming works much like Kig's Python scripts, but as of today no one seems to have publish anything using that.

See also

Related Research Articles

Algebraic geometry Branch of mathematics

Algebraic geometry is a branch of mathematics, classically studying zeros of multivariate polynomials. Modern algebraic geometry is based on the use of abstract algebraic techniques, mainly from commutative algebra, for solving geometrical problems about these sets of zeros.

Diameter Straight line segment that passes through the center of a circle

In geometry, a diameter of a circle is any straight line segment that passes through the center of the circle and whose endpoints lie on the circle. It can also be defined as the longest chord of the circle. Both definitions are also valid for the diameter of a sphere.

JavaScript, often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. Over 97% of websites use JavaScript on the client side for web page behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

Topology Branch of mathematics that deals with continuous deformations

In mathematics, topology is concerned with the properties of a geometric object that are preserved under continuous deformations, such as stretching, twisting, crumpling, and bending; that is, without closing holes, opening holes, tearing, gluing, or passing through itself.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers with error handling, subroutines, and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

Straightedge and compass construction Way of drawing geometric objects using only an idealized compass and straightedge

Straightedge and compass construction, also known as ruler-and-compass construction or classical construction, is the construction of lengths, angles, and other geometric figures using only an idealized ruler and a pair of compasses.

HyperTalk is a discontinued high-level, procedural programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. Because the main target audience of HyperTalk was beginning programmers, HyperTalk programmers were usually called "authors" and the process of writing programs was known as "scripting". HyperTalk scripts resembled written English and used a logical structure similar to that of the Pascal programming language.

In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes change, but the object's state appears unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object.

<i>La Géométrie</i> Mathematical appendix to Descartes Discourse on Method, published in 1637

La Géométrie was published in 1637 as an appendix to Discours de la méthode, written by René Descartes. In the Discourse, he presents his method for obtaining clarity on any subject. La Géométrie and two other appendices, also by Descartes, La Dioptrique (Optics) and Les Météores (Meteorology), were published with the Discourse to give examples of the kinds of successes he had achieved following his method.

In mathematics, singularity theory studies spaces that are almost manifolds, but not quite. A string can serve as an example of a one-dimensional manifold, if one neglects its thickness. A singularity can be made by balling it up, dropping it on the floor, and flattening it. In some places the flat string will cross itself in an approximate "X" shape. The points on the floor where it does this are one kind of singularity, the double point: one bit of the floor corresponds to more than one bit of string. Perhaps the string will also touch itself without crossing, like an underlined "U". This is another kind of singularity. Unlike the double point, it is not stable, in the sense that a small push will lift the bottom of the "U" away from the "underline".

In class-based object-oriented programming, a constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.

Karl Georg Christian von Staudt German mathematician

Karl Georg Christian von Staudt was a German mathematician who used synthetic geometry to provide a foundation for arithmetic.

In mathematics, enumerative geometry is the branch of algebraic geometry concerned with counting numbers of solutions to geometric questions, mainly by means of intersection theory.

Geometry Branch of mathematics

Geometry is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space that are related with distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is called a geometer.

Google Closure Tools JavaScript developer toolkit

Google Closure Tools is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps.

OpenSCAD

OpenSCAD is a free software application for creating solid 3D CAD objects. It is a script-only based modeller that uses its own description language; parts can be previewed, but cannot be interactively selected or modified by mouse in the 3D view. An OpenSCAD script specifies geometric primitives and defines how they are modified and combined to render a 3D model. As such, the program does constructive solid geometry (CSG). OpenSCAD is available for Windows, Linux and macOS.

DrGeo

GNU Dr. Geo is interactive geometry software that allows its users to design & manipulate interactive geometric sketches. It is free software, created by Hilaire Fernandes, it is part of the GNU project. It runs over a Morphic graphic system. Current version of Dr. Geo is also called Dr. Geo II. Historically Dr. Geo was developed in C++ and Dr. Geo II is a complete rewrite using Pharo that happened in 2005. This article refers to the most recent version.

Kig (software)

KIG is free and open-source interactive geometry software, which is part of the KDE Education Project. It has some facilities for scripting in Python, as well as the creating macros from existing constructions.

Parametric design

Parametric design is a process based on algorithmic thinking that enables the expression of parameters and rules that, together, define, encode and clarify the relationship between design intent and design response.

References