🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #881

Re: Question: Rotating a small bitmapped image?

#881
From: Bryan Miller
Date: Wed, 26 Aug 1992 20:01
31 lines
2057 bytes
In article <1992Aug26.165601.8756@sbcs.sunysb.edu>, neilb@scs.leeds.ac.uk (Neil Bowers) writes:
|> 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

And now you have doubled pixels in place of holes. If this is
satisfactory, fine. If you want something a little more gradual,
use the smoother I suggested.

Grey
Technical Details
Message-ID: <1992Aug26.200112.14572@bnr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bcars267!bnr.ca!grey
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu> <17ga9eINN221@chester.ksu.ksu.edu> <1992Aug26.165601.8756@sbcs.sunysb.edu>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bcars267!bnr.ca!grey
From: grey@bnr.ca (Bryan Miller)
Subject: Re: Question: Rotating a small bitmapped image?
Message-ID: <1992Aug26.200112.14572@bnr.ca>
Sender: news@bnr.ca (usenet)
Nntp-Posting-Host: bmerh9ad
Reply-To: grey@bnr.ca (Bryan Miller)
Organization: Bell-Northern Research Ltd.
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu> <17ga9eINN221@chester.ksu.ksu.edu> <1992Aug26.165601.8756@sbcs.sunysb.edu>
Date: Wed, 26 Aug 1992 20:01:12 GMT
Lines: 31