[comp.sys.mac.programmer] Rotating bitmaps

CXT105@psuvm.psu.edu (Christopher Tate) (09/02/90)

What is a good, fast, accepted method for rotating bitmaps?  Going bit by
bit seems like a terribly inefficient way to do it, but I'm having trouble
coming up with a more "intimate" method that isn't terribly complicated.

Mostly, I just want to be able to rotate text in an offscreen bitmap to
multiples of 90 degree orientations.  I'm working in C, so I have access
to inline assembly and all those wonderful bit operators.

Also, rotating bitmaps seems like a much easier task than rotating pixmaps.
Although I don't have to work with pixmaps for the particular project I'm
working on now, I may have to sometime....  Info on this problem would
also be appreciated.

-------
Christopher Tate           |    "In a fit of perverse brilliance, Carl the
                           |     repairman mistook a room humidifier for a
cxt105@psuvm.psu.edu       |     mid-size computer, but managed to get it
cxt105@psuvm.bitnet        |     to connect to the network anyway."

mil@mendel.acc.Virginia.EDU (Maria I. Lasaga) (09/03/90)

In article <90244.145341CXT105@psuvm.psu.edu> CXT105@psuvm.psu.edu (Christopher Tate) writes:
>What is a good, fast, accepted method for rotating bitmaps?  Going bit by
>bit seems like a terribly inefficient way to do it, but I'm having trouble
>coming up with a more "intimate" method that isn't terribly complicated.
>
>Mostly, I just want to be able to rotate text in an offscreen bitmap to
>multiples of 90 degree orientations.  I'm working in C, so I have access
>to inline assembly and all those wonderful bit operators.
>
>Also, rotating bitmaps seems like a much easier task than rotating pixmaps.
>Although I don't have to work with pixmaps for the particular project I'm
>working on now, I may have to sometime....  Info on this problem would
>also be appreciated.
>
>-------
>Christopher Tate           |    "In a fit of perverse brilliance, Carl the
>                           |     repairman mistook a room humidifier for a
>cxt105@psuvm.psu.edu       |     mid-size computer, but managed to get it
>cxt105@psuvm.bitnet        |     to connect to the network anyway."


See IEEE: CG&A, May, 1987, p.21-30, for a summary of software and
hardware solutions to orthogonal rotations of bitmap images.

--------------------------------------------------------------------------
Maria I. Lasaga
Dept. of Psychology
Gilmer Hall
University of Virginia
Charlottesville, Virginia  22903                 mil@virginia.bitnet
--------------------------------------------------------------------------

liberte@yoyodyne.ncsa.uiuc.edu (09/06/90)

Related to the question on rotating bitmaps, I need an algorithm to map
a rectangular bitmap to a parallelogram, or more generally, an arbitrary
quadralateral.  I know it is done in various drawing programs, but
how is it done?  References appreciated.

Dan LaLiberte
National Center for Supercomputing Applications
liberte@ncsa.uiuc.edu

wlj1@cunixb.cc.columbia.edu (Wayne L Jebian) (09/06/90)

I've missed most of this discussion, unfortunately, but can anyone
suggest where I can find a good discussion of mapping planes to 3-d objects (spheres, etc.)? Can anyone share an algorithm with me?

I am _not_ a graphics expert.

Thanks!

-Wayne