CubeTest

Jos van den Oever

new version: version 0.9.4 (2005-12-05) (750 kb)

windows version (0.9.3) (2.6 Mb)

New in 0.9.4

The new features are mainly technical:

Introduction

This program was written for a competition from Linux Magazine. The competition was held because of a lack of good educational software for primary schools. The program CubeTest is aimed at primary school students. With it, you can train your spatial insight.

vraagMost people know the type of question: a cube is shown together with four alternatives. The objective is to point out the cube that is identical to the one shown. The cubes from which you can choose are oriented differently from the first cube and one has to turn the cubes mentally in order to decide which ones are the same.

These question are a great way of improving your spatial insight. This is a valuable asset in many technical areas. In adition it's just plain fun to answer these questions and no matter how often you practice, they never become really easy.

Why a computer program?

That's a fair question! If you can learn something without a computer, it's certainly better to do without. Computers add an amount of complexity and distraction that's not to be dismissed. So the best thing is to only use a computer if it has significant advantages.

So why use a computer for these type of questions? The reason is that with this program you can rotate the cubes on the computer screen if you have trouble rotating them mentally, until you become good enough to do without. Rotating the cubes mentally is pretty hard at first.

The program CubeTest poses students these types of questions. But contrary to cubes printed on paper, the cubes on the computer screen can be rotated with a mouse instead of your brain. After a student answers the question, the cubes will rotate to the same orientations as the original cube, so that she can easily confirm that the answer given to be correct really is correct.

antwoord Which of these cubes is equal to the cube above?

How does it work?

Start CubeTest is implemented with two different libraries, Trolltech's Qt library and the Java Swing library. The huge free software project KDE also uses the Qt library which means that this library is available on the majority of GNU/Linux systems. The library is also freely available for Mac OS X. There are no other dependencies than either Qt or Java. There is no need for an OpenGL library despite the use of 3D objects.

Goedzo!For displaying the 3D objects I've written a number of classes. A square in 3D is, when displayed without perspective, always visible as a trapezoid. Both the Qt and Java libraries allow a square to be sheared to a trapezoid. So with the right amount of shearing, a collection of squares looks like a 3D object. The classes I wrote use this principle. It's fairly easy to make other 3D objects with these classes and use them as widgets. You can draw on the surface of the cubes as you would on a normal widget. In contrast with OpenGL, the scaling is done smoothly in the Qt classes. It's for example not hard to make a cube with sides that act as buttons as a replacement for boring 2D buttons.

Boe! The classes needed for makeing 3D objects are Object and Side. An object consists of an arbitrary number of Sides. It's also a Qt widget that can be manipulated with the mouse. In the downloadable package, there's a small demonstration program called fun which demonstrates the flexibility of the classes Object and Side.

New features

CubeTest now has some very important new feature. As of release 0.9.0 all essential features are present. Now more testing and translating is required for a 1.0 release.

Automatic questions

The big improvement in this version is the automatic generation of questions. This is quite tricky, but never mind: enjoy.

Difficulty levels

There are now four difficulty levels. The definition of difficulty is rather fuzzy. With increasing difficulty, the number of blanks sides decreases. The lowest two levels never have more than one copy of a particular side decoration.

Skinability

Version 0.9.1 has five different sets of tiles. The different themes use raster images and vector images. Vector images are most beautiful, since they scale with the size of the application window.

You can also add your own! Make a directory .cubetest/styles/mystyle in your home directory and put images in there. The images may be raster images (.png, .jpg, .gif) or vector images (.svg). The naming of the files is important. An image can have four orientations: straight, up-side-down, left and right. If an image looks identical in all four of these orientations, its name must start with "c4_". If it only looks the same upright and up-side-down, then its name must start with "c2_". Otherwise the name must start with "c1_".

Your custom skin must contain an image called "c4_blank.*". This image is your equivalent of a blank side. In addition you must provide at least 2 "c2_*" files or two "c1_*" files.

If your skin is really beautiful, please send it to me.

The future

The rest of the world

This program should really be translated into more different languages, so other global citizens can profit too. I've you are familiar with Qt's Linguist program and speak a language not yet in the package, please help out. Once the program is mature enough it might be added to KDE's educational software package.