🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #880

Re: Question: Rotating a small bitmapped image?

#880
From: Neil Bowers
Date: Wed, 26 Aug 1992 16:56
24 lines
1681 bytes
In article <17ga9eINN221@chester.ksu.ksu.edu> sdoran@chester.ksu.ksu.edu (Steven Marcotte) writes:
>
>mucds@uxa.ecn.bgu.edu (Corey D. Stinson) writes:
>
>
>>	Could someone help me with a problem.  I have a small sprite
>>(bitmapped) and when animating, instead of re-drawing the picture over
>>and over to repesent the rotation stages I would like to develop some
>>algorithm to rotate the image.  And suggestions on one that would not
>>degrade the image?
>
>	Wouldn't the idea be the same as rotating a point on a screen
>except instead of moving a point on the screen you are moving a point 
>in an array?  Say you wanted an image rotated in 6 different directions.
>You would start out with your source bitmap, then apply the rotation
>function (which I don't remember right off hand, but it should be in
>any trig book) to all points in the array at intervals of 60 degrees.

This solution can result in `holes' in the destination image.  To prevent
this, take every point in the destination image, and perform the reverse
transformation back to the original image to determine the value for
the dest. image.

-neilb
Technical Details
Message-ID: <1992Aug26.165601.8756@sbcs.sunysb.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!udel!sbcs.sunysb.edu!neilb
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu> <17ga9eINN221@chester.ksu.ksu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!udel!sbcs.sunysb.edu!neilb
From: neilb@scs.leeds.ac.uk (Neil Bowers)
Subject: Re: Question: Rotating a small bitmapped image?
Message-ID: <1992Aug26.165601.8756@sbcs.sunysb.edu>
Sender: usenet@sbcs.sunysb.edu (Usenet poster)
Nntp-Posting-Host: csparc2.leeds.ac.uk
Organization: The University of Leeds, School of Computer Studies
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu> <17ga9eINN221@chester.ksu.ksu.edu>
Date: Wed, 26 Aug 1992 16:56:01 GMT
Lines: 24