🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #876

Re: Question: Rotating a small bitmapped image?

#876
From: Steven Marcotte
Date: Wed, 26 Aug 1992 16:08
20 lines
1490 bytes
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?  Thanx for any help you can offer :)
>					Corey

	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.
If you place the center of the bitmap at the origin I wouldn't think that
this scheme would distort the image.  Good luck
					Steven
Technical Details
Message-ID: <17ga9eINN221@chester.ksu.ksu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!sdoran
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!sdoran
From: sdoran@chester.ksu.ksu.edu (Steven Marcotte)
Newsgroups: rec.games.programmer
Subject: Re: Question: Rotating a small bitmapped image?
Date: 26 Aug 1992 11:08:14 -0500
Organization: Kansas State University
Lines: 20
Sender: sdoran@chester.ksu.ksu.edu (Steven Marcotte)
Distribution: world
Message-ID: <17ga9eINN221@chester.ksu.ksu.edu>
References: <1992Aug26.152939.4449@uxa.ecn.bgu.edu>
NNTP-Posting-Host: chester.ksu.ksu.edu