Kig (software)
![]() | |
![]() | |
Developer(s) | KDE |
---|---|
Initial release | 2 August 2006 |
Stable release | 23.08.3[1] ![]() |
Repository | |
Written in | Interactive geometry software |
License | GPL |
Website | https://apps.kde.org/kig/ |
KIG is
Import and export
Kig can import files made by
Objects
Kig can handle any classical object of the dynamic geometry, but also:
- The center of curvature and osculating circle of a curve;
- The ;
- The hyperbola with given asymptotes;
- The Bézier curves (2nd and 3rd degree);
- The ;
- The asymptotes of a hyperbola;
- The cubic curvethrough 9 points;
- The cubic curve with a double pointthrough 6 points;
- The cubic curve with a cusp through 4 points.
Scripting language
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 no one wants to implement the square of a complex number (represented by a point in the
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
Coordinate(x,y)
creates a Python list made of the two coordinates of the new point. And Point
creates the point which 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 pykig.py
which can
- load a Python script, e.g.
MyScript.py
- build a Kig figure, described by this script
- open Kig and display the figure.
For example, here is how a
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
- Official website
- The Kig Handbook
- Thomas G. Pfeiffer: Erstellen geometrischer Skizzen mit kig. Freies Magazin, December 2009 (German)
- Mike Diehl: Teaching Math with the KDE Interactive Geometry Program. Linux Journal, 2009-09-19
- Abdul Halim Abdullah, Mohini Mohamed: The Use Of Interactive Geometry Software (IGS) To Develop Geometric Thinking. Jurnal Teknologi 49(1), December 2008, DOI: 10.11113/jt.v49.212
- ^ . 9 November 2023 https://apps.kde.org/de/kig/. Retrieved 21 November 2023.
{{cite web}}
: Missing or empty|title=
(help)