[comp.graphics] help asked with bitmap-rotating

harry@ruuinf.UUCP (Harry van Stedum) (12/24/88)

Hi there,

I'm writing a couple of routines for manipulating bitmaps. I've now come
to the hardest part, namely, rotating the maps. I've read some postings
about it in this newsgroup (CORDIC, hardware solutions), but most solutions deal with pointmaps, i.e. maps of all coordinates of the pixels.
My def of a bitmap is an array of chars, where a char consists of 8 bits,
each bit standing for a pixel.

So rotating this bitmap-type cannot be done by just "pushing" all coordinates
through an apropriate matrix (with cos, sin etc.), 'cause you can't access a
pixel directly and you don't know the coordinates of a pixel.

I would like suggestions, algorithms, etc., to do the nasty rotating. I was     thinking of something recursive, mainly for its speed and efficiency (I may 
be wrong on this!). At this moment I have some ideas: rotating through
double shearing and transposing the map, but these operations are quite
time-consuming (...) and not the most efficient (read: fast).

References are also welcome, but most stuff I read sofar, deals with special
equipment. I've got to do it software-matic, on an Atari 1040ST (argh!).


Thanks in advance && best wishes for '89 !!!		Harry


-------------------------------------------------------------------------------
Harry van Stedum			UUCP:...!hp4nl!ruuinf!harry
Dept. of Computer Science
Univ. of Utrecht			"I can't change the world,
Padualaan 14, P.O.Box 80.089		 but I can change the world in me,
3508 TB Utrecht				 if I rejoice"-U2
Holland
-------------------------------------------------------------------------------

turk@Apple.COM (Ken "Turk" Turkowski) (12/31/88)

The best techniques are the 2- and 3-pass methods described in:

Alvy Ray Smith, "3-D Transformations of Images in Scanline Order",
SIGGRAPH '80 proceedings, pp. 279-285.

Steve Gabriel and Larry Evans, Method and System for Spacially (sic)
Transforming Images (ADO patent), #4,631,750, December 23, 1986.

Alan Paeth, "A Fast Algorithm for General Raster Rotation",
Graphics Interface '86 Proceedings, pp. 77-81.
Ken Turkowski @ Apple Computer, Inc., Cupertino, CA
Internet: turk@apple.com
Applelink: Turkowski1