MagicEye

0.05

magiceye.png

MagicEye graphic effect implemetation library.

Introduction

MagicEye is a graphical effect: it is a set of coloured rings that can be rotated in any way. I called it MagicEye becose it recalls in some way magic eye tubes used in old radio receivers.

A single MagicEye can be made by a number of rings, each ring is the projection of a linear array of pixels into a circular shape, changing one pixel color in the linear array means changing the color of a little sector of a single ring. A single MagicEye can be made by more than one ring, in this case the MagicEye is the projection of a rectangular array of pixels: all rings have the same number of sectors, all linear array have the same length, resulting in a rectangular pixel map with one line for each ring.

All the rings of one MagicEye are parts of the MagicEye itself and there is no way to separate them, the whole MagicEye is drawn in an SDL_Surface by calling the MagicEye_Update() function, this is the product of this library; in this way it can be integrated in any application that makes use of SDL library.

How to create a magic eye

First choose the size of the SDL_Surfacein which the MagicEye will be rendered, this means to choose the size of the bigger ring.

Second choose the number of rings in the MagicEye, the pixel map will have the same number of rows. Each ring has its own geometry: its own external/internal diameter.

Third choose the number of sectors; remember: each row in the pixel map have the same number of pixels, the minimumring rotation step is one sector, all rings have the same number of sectors. Usually a value near to the SDL_Surface width is a right choice.

To speed up MagicEye rendering the full projection is calculated off line, once created it is not possible to alter MagicEye geometry run time.

The MagicEye map is created by eyemake, a little utility included in the source tree (see eyemake Makefile for more information on calling eyemake).

Lisence

MagicEye is released under LGPL lisence (see COPYING and COPYING.LESSER).

Generated on Sun Dec 5 21:36:32 2021 for libmagiceye by  doxygen 1.5.6