home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
w
/
wowpix
/
!Wowpix
/
!Help
< prev
next >
Wrap
Text File
|
1993-12-28
|
5KB
|
121 lines
Wowpix! documentation (version 0.45 28-Dec-93)
Public domain, enjoy!
No, I don't like writing documentation (who does? contact me, I could get
you lots of work), but sometimes it's got to be done so here goes!
What is a Wowpix?
=================
Wowpix is my name for autostereograms, those 'dotty' (ha, ha!) pictures
which contain a 3D image when viewed correctly. I first came across them
when a friend showed my an article about them in the October 93 issue of New
Scientist. The article included an algorithm in C for generating an example
and I couldn't resist. Apparently though, they've been around in computer
circles for quite some time now, but I've been blissfully ignorant. I call
them Wowpix because Wow! is what most of my friends seem to say when they
get the hang of looking at them.
How to see Wowpix
=================
You need to learn to 'uncross' your eyes, look 'through' the page rather
than at it, a bit like looking in a mirror. You can also 'cross' your eyes
but then you see an inverted image. It can take some time if you have never
come across one before (it took me about 20 minutes the first time) so do
persevere, it's not a joke. A small proportion of the population are unable
to see them for physical reasons, but you will almost certainly know if that
is the case. If you are stuck here is a method which works for quite a few
people (print out the picture first!):
1 Hold the picture right up against your face - literally touching your
nose!
2 Relax and defocus your eyes.
3 Slowly move the paper away from your face. The point at which the 3D image
is visible is reached before you can focus on the page itself. As long as
you keep relaxed, you should soon be saying Wow! And if at first you don't
succeed...
The Program
===========
What my program does is take a sprite file generated by a suitable package
(PAINT for instance) and treat the colour information as different depth
levels, where colour 0 is the background, colour 1 the next layer forward
and so on. This enables simple Wowpix! to be generated very quickly. The
program sets the palette of the output sprite such that colour 0 is white
and colour 1 is black. I did this originally to facilitate the creation of
two colour sprites for space saving purposes, but I have shelved this idea
for now. One side effect of this is that the program will report an error if
the input sprite does not have a palette, but it will still carry on to do
the processing, you just end up with white and very light grey dots instead
of white and black!
The program works in one of two ways, depending on whether you supply a
pattern sprite or not.
Without a pattern:
==================
The input sprite file must contain just a single sprite. Load this into the
program in any of the usual ways and a window is displayed showing your
sprite image. Call up the main menu and click on PROCESS. You will receive a
message if your sprite has no palette which you should acknowledge. The
hourglass will then appear showing the percentage of the image processed
until complete. When complete the Wowpix is displayed. You may then use the
save option on the menu to save this image as normal.
With a pattern:
===============
Your sprite file should contain two sprites, the first is the image, the
second is a pattern to incorporate into the finished Wowpix. The size of the
pattern sprite is not critical, but be aware that only the first 91 pixels
(width) counting from the right will be used in the image. If the sprite is
narrower than this it is repeated. If the height of the pattern is greater
than the image then the extra at the top is discarded. If it is smaller then
again a repeat comes into action. How the pattern effects the finished image
is actually quite simple. For any given point in the output, the colour
number of the pattern to be used at that point is added to the 0 or 1 of the
original process, thus producing different 'pairs' of colours. It is
recommended that the palette of the output image is adjusted after
processing (using PAINT or similar) to achieve the most pleasing effect.
Process and save as for the image without a pattern.
The PICTURE option on the main menu just gives you a bit of useful(?)
information about the image loaded.
Printing
========
The images created with this program can be printed out using PAINT or
similar. The 3D effect is retained, although black and white printing of
certain colours can produce odd effects if dithering is used. Also beware of
scaling the image this can destroy the 3D properties.
Other
=====
I have RISC-OS 3.1, but as far as I am aware it should work normally under
RISC-OS 2 as well. If it doesn't, let me know!
Since writing this program, I have just read an article in Archimedes World
(Jan 94 issue) which describes a similar (but hidden) feature in
Pro-Artisan. It seems that great minds think alike! At least mine is free!
I am absolutely fascinated by these things and plan to do quite a bit more
to this program in the future, watch this space! If you have a similar
interest, mail me.
Comments, suggestions, criticisms, bugs to Arcade, user #130, Taipan.