# The &kig; Handbook

Dominique
Devriese

    devriese@kde.org

2002
Dominique Devriese
&FDLNotice;
2002-10-14
0.9.00

&kig; is a &kde; application for Interactive Geometry. It is meant as a replacement for the free programs &kgeo; and &kseg;, and for commercial applications like &cabri;

KDE
KDE-Edu
Kig
Interactive Geometry
KGeo
Cabri

## Introduction

&kig; is an application for Interactive Geometry. It's intended to serve two purposes:

- Allowing students to explore mathematical figures and concepts using the computer.

- Serve as a WYSIWYG tool for drawing mathematical figures and including them in other documents.

You can report problems in &kig; using the internal bug reporting tool (Help Report Bug), or just contact me at devriese@kde.org.

Since &kig; supports macro's and locuses, it allows for some rather advanced macro's to be defined. If you have created an interesting macro, which you think might be useful for other people, you can mail it to me, so I can include it in the distribution (if you do this, it will be licensed under the terms of &kig;'s license, the GPL, so that other people can freely use and adapt it.

## Basic usage

### Constructing Objects

#### Constructing points

You can construct points in several ways:

- Select Objects Points Normal Point from the menu bar or press the appropriate button in the toolbar. You can then construct a point by clicking on the desired position in the window.

  Actually, this works the same way for constructing other objects as well: click on the desired menu bar entry or toolbar button and select the necessary objects to construct the object.

- Since you often need to construct points, there is also a shortcut for doing it faster. Simply click somewhere in the screen with the middle mouse button.

- If you have already selected the objects that you need for constructing another object, you can use them for it by right-clicking one of them, selecting Use these objects to construct a... in the context menu that appears and then select the object type you want to construct. This also works when you have only selected a part of the objects you want to use...

- Finally, you can also construct points while you are constructing other objects, optionnally selecting them for the object you are constructing... This is explained further here.

A point has been constructed
A point has been constructed

#### Constructing Other Objects

Constructing objects other than points is done by selecting the appropriate entry in the Objects menu, or clicking on one of the the toolbar buttons...

Constructing a circle
Constructing a circle

This will start the construction of a new object of the chosen type. All of these types require arguments. For example, if you selected a circle by center and point, you will need to give it two points: one for the center, and one for the point on the circle.

Selecting these arguments is very easy. You simply click on the object you want to use. If you move over an object that can be used to construct the object, a preliminary image will be shown of what the object will look like. For objects that require points as arguments, you can construct a new point at the current cursor position and select it by clicking the left mousebutton...

You can always cancel the construction of the new object by pressing the Escape button.

Constructing a circle.
Constructing a circle

### Selecting Objects

Selecting objects is rather straightforward: There are two ways to select objects:

- Simply clicking an object causes the object you clicked on to be selected, clearing the current selection. If you don't want that, hold the &Ctrl; key while clicking on an object.

- By clicking in an empty spot on the screen, and dragging the rectangle which appears over the screen, you can select all objects within the rectangle, again clearing the current selection. As in the previous case, holding the &Ctrl; key prevents that.

Selecting objects
Selecting objects

### Moving Objects

To move objects, you must first select them. You can select any number of objects, but you should be careful to not select a lot of objects that depend on each other, as this will lead to weird results.

When the objects you want to move are selected, you can start moving them by left clicking on one of them, and drag them around while holding down the mouse button. When you're done, simply release the button again.

For some types of objects ( mostly complicated Locuses ), moving objects can be slow on older hardware. This is unfortunate, but inevitable, given the calculations involved...

If you right-click one of the selected objects, and choose move..., you also start to move the objects...

### Deleting objects

Deleting objects is done by first selecting them, and next doing either of these:

- Pressing the Delete key...

- Pressing the delete button in the toolbar..

- Right-clicking on one of the objects, and selecting Delete... in the context menu that appears...

### Showing and hiding objects

In &kig;, objects can be hidden. This is done by selecting the objects, right-clicking one of them, and selecting Hide... in the context menu that appears..

For unhiding the objects, use the Edit Unhide all.... This will unhide all currently hidden objects.

## Advanced Usage

### Context Menu's

&kig; has context menus for its objects. Try right-clicking on an object to see it appear... The menu has many options, for constructing objects, for setting colors, hiding, moving, deleting objects, and some objects have some options of their own ( e.g. you can redefine certain points to be constrained to a line where they previously weren't etc. The user is encouraged to try the options out for him- or herself...

### Defining Macro's

One of the more advanced features is its support for macro's. This allows you to define a new type based on other types. For this, you first construct the figure like you would normally construct a figure, without worrying about macro's yet.

I will try to explain it with an example. Suppose you want to make a macro for constructing a circle from three points on it ( suppose you missed the fact that &kig; provides a native type for this purpose ;), then you would just construct three points, some perpendiculars and midpoints until you find the center, and construct the circle by the center you constructed and one of the previous points. The following image should make this a bit more clear...

Test running macro's
Test running macro's

Next, you want to define the macro. Select New macro from the Type menu, or click on the button in the toolbar. A wizard will appear, telling you to select the given objects. In our example, these are the three points. So you select the three points (click on them for selecting, click again for unselecting). Click the next button to continue. Then select the final object (the circle in our example).

&kig; does not yet support multiple final types so don't select more than one.

The macro wizard
The macro wizard

After you have done this, click the next button again. Enter a name and optionally a description for your new type, and click the Finish button. Your macro type is now finished...

To use the new macro type, click its button in the toolbar or the Objects menu... It will have the same icon as its final object.. You can construct a macro object just like any other object.

Using your new type
Using your new type

### Working with types

As you saw in the previous chapter, &kig; allows you to create your own objects. &kig; also makes sure that once you have created an object, it is saved on exit and loaded on startup of the program. You do not have to specifically save or load macro definitions. However, &kig; does allow you to do more with the macro's. If you select Types Manager from the Types-menu, you will see a dialog where you can edit your types. It allows you to delete types you no longer have use for, export them to a file, and load them from a file.

Edit Types Dialog
The Edit Types Dialog

### Text labels

&kig; allows you to add text labels to a construction. This is very useful for showing names, explanations etc. in constructions.. Recently, &kig; also gained support for displaying variable information about objects ( a.k.a. properties ).

Working with text labels should be very easy in &kig;. Simply press the Text Label button in the Kig toolbar or select Objects Other A text label in the menu bar. Then click the screen on the place where you want to place the label.

At this point, all that is left to do, is to select the text to be shown in the new label. There is a special dialog for this, and it will appear on your screen after you select the new label's location.

The Text Label Dialog
The Text Label Dialog

If all you want to show is a simple text, then all you have to do is enter it, and click the Finish button. However, there is also support for showing variable information about objects in a label. E.g. you can construct a label showing the text "This segment is %1 units long.." where "%1" would be replaced with the length of a specific segment.

To do this, enter a text with a number of placeholders ( "%1", "%2", "%3" etc. ) in it. Make sure the placeholders appear in the correct order, and that you don't skip any numbers. This would probably produce undesired effects. When you are finished, press the Next button to continue.. If you change your mind later on about the text you want to show, you can always go back using the Back button.

The wizard now shows the text you entered with all placeholders replaced by something like "argument 1". Selecting what to show as a certain argument is done by first clicking the argument in question. Then click on the object about which you want to show information, and then select an interesting piece of information in the popup menu that appears. E.g. in the example above, you would click "argument 1", click on the correct segment in the main &kig; window, and select the property "Length". Afterwards, you can fill in the rest of the variable parts, or select an other property for one of the variable parts if you have changed your mind. When you are ready, click the Finish button to complete the construction of the text label.

Selecting a property for a variable part
Selecting a property for a variable part

## &kig; Object Types

&kig; supports a rather large number of object types. You are encouraged to try out the various objects, as I think this is a better way to find out about them than reading about them in some borying manual ;). Please note that not all the available object types are shown in the toolbars, but that there are also some objects that you can only construct via the Objects menu in the menu bar. Of course, as with all &kde; applications, what appears in the toolbars is configurable. Try out the Settings Configure Toolbars... option if you want to do this.

## &kig; Features

- &kig; is a KPart application, which means that you can embed it in other &kde; software. If you open a `.kig` file in &konqueror;, it can be opened directly in the &konqueror; screen without the need to start an external application.

- Most objects allow you to see the object you're constructing before it is entirely finished.

- &kig; supports macro's to be defined in a straightforward manner. These objects are presented to the user like normal objects. They are saved on exit and loaded on startup, so that they aren't lost on exit. In the Types Manager you can manage these types. You can export them to files, import them from files, and delete them.

- &kig; saves its data in a clear &XML; format.

- &kig; supports the construction of locuses..

- &kig; has an option "Export to image".. This is rather useful, since not all programs support the &kig; file format yet.. ;)

- &kig; aims to be compatible with its competitors.. This is why it supports the &kgeo; file format, and i'm working on other formats as well...

## Contributing to &kig;

### Free Software

&kig; is Free Software. This means that its source code is freely available on the internet, and everyone can use it, read it, modify it, and distribute it for his own use. I write it as a hobby project, and i already learned a lot about programming, C++, KDE/Qt, software colaboration and open source projects in the process.

### Contribute

The point of this chapter is to point you ( the user ) to the rights that &kig;'s license gives you. As with all free software, you are allowed ( and encouraged :) to fix problems you encounter while using it, to add features you miss, or whatever, to distribute your modified program, and to send these modifications to me so i can include them in the next version for others to enjoy. I personally have no financial interest in this project whatsoever, so this isn't just marketing speak here ;).

If you are uncertain of your rights to use this software, or other people's right to use any modifications you make to this program etc., please read the license. You can find it in the COPYING file in the &kig; source tree...

### How to contribute ?

Any contributions are welcome. If you think the icons suck, or that the manual needs updating, or you have this really cool macro that you want to share with the world, do not hesitate to send it to me. Please note that your contributions will be distributed under the terms of the GNU GPL; you can find the terms of this license in the COPYING file in the &kig; source tree, and further along in this manual...

## Questions and Answers

&reporting.bugs; &updating.documentation;

## Credits and License

&kig;

&kig; copyright 2002 Dominique Devriese devriese@kde.org

Documentation copyright 2002 Dominique Devriese. devriese@kde.org

&underFDL; &underGPL;

## Installation

### How to obtain &kig;

&install.intro.documentation;

### Compilation and Installation

&install.compile.documentation;

&documentation.index;