Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gnubik(6) [debian man page]

gnubik(6)						     GNU Utility Documentation							 gnubik(6)

NAME
gnubik - an interactive, graphic Magic cube program. SYNOPSIS
gnubik [window_system_options] [-hvs] [-z n[,m[,p]]] [-a m] DESCRIPTION
This is a program which displays a 3 dimensional image of a magic cube, as introduced to the world by its Hungarian inventor, Erno Rubik. The user rotates the blocks of the cube, and attempts to solve the puzzle, by moving all the blocks to their correct positions and orienta- tions, resulting in a cube with a single colour on each face. OPERATION
The user interacts with the program in the following ways: Viewing the Cube The viewing position may be altered using the arrow keys or by using the mouse. The left and right arrow keys rotate the cube about the vertical axis. The up and down keys rotate the cube about the horizontal axis. Holding down the shift key whilst pressing the left and right arrow keys rotates the cube about the z axis. To rotate the cube using the mouse, hold down button 1 and move the mouse anywhere on the window. If your mouse has a scroll wheel, you can use this to rotate the cube about the z axis. Performing Rotations Rotations are performed using the mouse. To manipulate the cube, place the mouse cursor on a square in the cube, against the edge facing the direction you want to move, and click button 1. The mouse cursor will indicate the direction of rotation. OPTIONS
The following options may be specified on the command line at invocation. -z n,m,p Draws a cube of size n x m x p, where n,m and p are positive. The default size is 3 x 3 x 3. -a m When rotating parts of the cube, show m intermediate positions. The default for this value is 2. Setting to a higher value, will give smoother animations, but will result in a slower program. -s Starts with the cube already solved. By default, it starts in a random position. -h Display a help message and exit. -v Display version number and then exit. IMPLEMENTATION
The code for gnubik is written in C and Scheme. It uses the Mesa/OpenGL graphics library, and the Gtk+ library and Guile. As such, it should be easy to generate a version for any system complying with these standards. BUGS
The rendering process is slower than it could be, since display lists aren't currently used. The entire image is re-rendered, during each refresh, regardless of which components have changed their appearance. COPYRIGHT
Copyright (C) 1998, 2011 John Darrington. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. JMD
01 January 2011 gnubik(6)

Check Out this Related Man Page

exquat(3alleg4) 						  Allegro manual						   exquat(3alleg4)

NAME
exquat - A comparison between Euler angles and quaternions. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exquat DESCRIPTION
Euler angles are convenient for storing and creating 3D orientations. However, this program demonstrates that they are not good when interpolating between two different orientations. The problem is solved by using Allegro's quaternion operations. In this program, two cubes are rotated between random orientations. Notice that although they have the same beginning and ending orienta- tions, they do not follow the same path between orientations. One cube is being rotated by directly incrementing or decrementing the Euler angles from the starting point to the ending point. This is an intuitive notion, but it is incorrect because it does not cause the object to turn around a single unchanging axis of rotation. The axis of rotation wobbles resulting in the object spinning in strange ways. The object will eventually end up in the orientation that the user intended, but it gets there in a way that is unattractive. Imagine if this method was used to update the position of a camera in a game! Sometimes it would swing wildly and disorient the player. The other cube is animated using quaternions. This results in a much more pleasing animation because the cube turns around a single axis of rotation. SEE ALSO
BITMAP(3alleg4), END_OF_MAIN(3alleg4), MATRIX_f(3alleg4), QUAT(3alleg4), acquire_bitmap(3alleg4), allegro_error(3alleg4), alle- gro_init(3alleg4), allegro_message(3alleg4), apply_matrix_f(3alleg4), blit(3alleg4), circle(3alleg4), clear_keybuf(3alleg4), clear_to_color(3alleg4), create_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), font(3alleg4), get_cam- era_matrix_f(3alleg4), get_rotation_matrix(3alleg4), get_rotation_matrix_f(3alleg4), get_rotation_quat(3alleg4), install_keyboard(3alleg4), keypressed(3alleg4), line(3alleg4), matrix_mul_f(3alleg4), palette_color(3alleg4), persp_project_f(3alleg4), quat_interpolate(3alleg4), quat_to_matrix(3alleg4), readkey(3alleg4), release_bitmap(3alleg4), rest(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_pal- ette(3alleg4), set_projection_viewport(3alleg4), textout_ex(3alleg4) Allegro version 4.4.2 exquat(3alleg4)
Man Page