Kig (software)
Encyclopedia
Kig is free and open source
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

 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...

, which is part of the
KDE edutainment project. It has some facilities for scripting in 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...

, as well as the creating macros from existing constructions.

Import and export

Kig can import files made by DrGeo
DrGeo
DrGeo is a free software, created by Hilaire Fernandes for the Ofset. As its names suggests, it is a geometry software...

 and Cabri Geometry
Cabri Geometry
Cabri Geometry is a commercial interactive geometry software produced by the French company Cabrilog for teaching and learning geometry and trigonometry. It was designed with ease-of-use in mind. The program allows the user to animate geometric figures, proving a significant advantage over those...

 as well as its own file format, which is 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....

-encoded.

Kig can export figures in 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...

 format and as svg (vector graphics) files.

Objects

Kig can handle any classical object of the dynamic geometry, but also:
  1. The center of curvature
    Center of curvature
    In geometry, center of curvature of a curve is found at a point that is at a distance equal to the radius of curvature lying on the normal vector. It is the point at infinity if the curvature is zero. The osculating circle to the curve is centered at the center of curvature....

     and osculating circle
    Osculating circle
    In differential geometry of curves, the osculating circle of a sufficiently smooth plane curve at a given point p on the curve has been traditionally defined as the circle passing through p and a pair of additional points on the curve infinitesimally close to p...

     of a curve;
  2. The dilation
    Dilation
    Dilation refers to an enlargement or expansion in bulk or extent, the opposite of contraction. It derives from the Latin dilatare, "to spread wide".In physiology:* Pupillary dilation, dilation of the pupil of the eye...

    , generic affinity
    Affinity
    Affinity is a word used in a variety of fields, usually to indicate some kind of preference, relationship, or a potential or actual closeness between two entities.Articles dealing with various usages of the word: affinity include:-Commerce and law:...

    , inversion, projective application, homography
    Homography
    Homography is a concept in the mathematical science of geometry.A homography is an invertible transformation from a projective space to itself that maps straight lines to straight lines...

     and harmonic homology;
  3. The hyperbola
    Hyperbola
    In mathematics a hyperbola is a curve, specifically a smooth curve that lies in a plane, which can be defined either by its geometric properties or by the kinds of equations for which it is the solution set. A hyperbola has two pieces, called connected components or branches, which are mirror...

     with given asymptote
    Asymptote
    In analytic geometry, an asymptote of a curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. Some sources include the requirement that the curve may not cross the line infinitely often, but this is unusual for modern authors...

    s;
  4. The Beziers
    Béziers
    Béziers is a town in Languedoc in southern France. It is a sub-prefecture of the Hérault department. Béziers hosts the famous Feria de Béziers, centred around bullfighting, every August. A million visitors are attracted to the five-day event...

     curves (2nd and 3rd degree);
  5. The polar line of a point and pole
    Pole
    -General:*Poles, people originating from inbitating or inhabiting the country of Poland*Pole -Fictional:*Jill Pole, a fictional character from C. S...

     of a line
    Line
    - Science and technology :* Line , a circuit or loop.** A power line for electric power transmission** line power or lines power, domestic mains electricity.** telephone line** RF transmission line...

     with respect to a conic section
    Conic section
    In mathematics, a conic section is a curve obtained by intersecting a cone with a plane. In analytic geometry, a conic may be defined as a plane algebraic curve of degree 2...

    ;
  6. The asymptote
    Asymptote
    In analytic geometry, an asymptote of a curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. Some sources include the requirement that the curve may not cross the line infinitely often, but this is unusual for modern authors...

    s of a hyperbola
    Hyperbola
    In mathematics a hyperbola is a curve, specifically a smooth curve that lies in a plane, which can be defined either by its geometric properties or by the kinds of equations for which it is the solution set. A hyperbola has two pieces, called connected components or branches, which are mirror...

    ;
  7. The cubic curve through 9 points;
  8. The cubic curve with a double point through 6 points;
  9. The cubic curve with a cusp
    Cusp
    Cusp may refer to:*Beach cusps, a pointed and regular arc pattern of the shoreline at the beach*Behavioral cusp an important behavior change with far reaching consequences*Cusp catastrophe...

     through 4 points.

Inside the figure

Another object is available inside Kig, it is a Python (language) script. It can accept Kig objects as variables, and always return one object.

For example, if there is already a numeric object inside the figure, for example 3, the following Python object can yield its square (9):


def square( arg1 ):
return DoubleObject( arg1.value**2 )


The variables are always called arg1, arg2 etc. in the order they are clicked upon. Here there is only one variable arg1 and its numerical value is obtained with arg1.value.

If now one wants to implement the square of a complex number (represented by a point in the Argand diagram), the object which has to be selected at the creation of the script must necessarily be a point, and the script is


def csquare( arg1 ):
x=arg1.coordinate.x
y=arg1.coordinate.y
z=x*x-y*y
y=2*x*y
x=z
return Point( Coordinate(x,y) )


The abscissa
Abscissa
In mathematics, abscissa refers to that element of an ordered pair which is plotted on the horizontal axis of a two-dimensional Cartesian coordinate system, as opposed to the ordinate...

 of the point representing the square of the complex number
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...

 is as can be seen by expanding . Coordinate(x,y) creates a Python list made of the two coordinates of the new point. And Point creates the point which coordinates are precisely given by this list.

But a Python object inside a figure can only create one object and for more complex figures one has to build the figure with a script:

Figure created by a script

Kig comes up with a little program (written in Python) called pikyg.py which can
  1. load a Python script, say MyScript.py
  2. build a Kig figure, described by this script
  3. open Kig and display the figure.


For example, here is how a 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 made (as an IFS
Iterated function system
In mathematics, iterated function systems or IFSs are a method of constructing fractals; the resulting constructions are always self-similar....

) with pykig:


from random import *
kigdocument.hideobjects
A=Point(0,2)
A.show
B=Point(-2,-1)
B.show
C=Point(2,-1)
C.show
M=Point(.1,.1)
for i in range(1,1000):
d=randrange(3)
if d

0:
s=Segment(A,M)
M=s.midpoint
if d

1:
s=Segment(B,M)
M=s.midpoint
if d

2:
s=Segment(C,M)
M=s.midpoint
M.show

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