Article View: rec.games.programmer
Article #319Re: Bitmap Rotation/Scale
From: Robert Walsh
Date: Wed, 08 Apr 1992 19:46
Date: Wed, 08 Apr 1992 19:46
68 lines
2645 bytes
2645 bytes
In <7464@uqcspe.cs.uq.oz.au> warwick@cs.uq.oz.au (Warwick Allison) writes:
>rjwalsh@maths.tcd.ie (Robert Walsh) writes:
>>Does anyone know how to map a bitmap of arbitary size into an polygon
>>of arbitary size (the simplest example is mapping a bitmap into a
>>square)?
>Yes. Clip it.
>Seriously, it all depends HOW you want it mapped. I could map a large
>image to a small square by clipping it. You have to make some constraints
>before you can start devising an algorithm.
>One possibility would be to have the following restriction:
> If pixels A and B and on the same horizontal line in the original
> and they both appear in the final, then they must be on the
> same horizontal in the final.
>Now the problem is simply one of mapping a line of pixels:
> ************************************************
>to a sequence of lines of pixels:
> ************* **************************** *******
>Easy.
>Warwick
I don't think that was quite what I meant. Suppose I map a bitmap
onto this:
----
/ \
/ \
------
then I should get a bitmap appearing to hover in three space. The
bitmap should be scaled squashed at the top and fatter down towards
the bottom. If I map it onto a square, it should be an exact scale
replica of the original bitmap.
Extending the above further, I should be able to map the bitmap onto
something like this:
/\
/ |_
/ |
\______\
and have it scaled properly all across it.
Am I asking to do something that only a Cray could manage in realtime? Is
this feasible on a 33Mhz 386?
>--
> _-_|\ warwick@cs.uq.oz.au / eastings genistas /
> / * <-- Computer Science Department, / giantess seatings /
> \_.-._/ University of Queensland, / teasings tsiganes /
> v Brisbane, Australia. / -------- -------- /
--
rjwalsh@maths.tcd.ie \ The above comments are not Trinity's.
Robert Walsh \ Hell, they're not even mine!
Advanced Development Group \
Trinity College, Dublin. \
Technical Details
Message-ID:
<1992Apr8.194650.26758@maths.tcd.ie>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!rjwalshReferences:
<1992Apr06.041125.25057@rose.uucp> <1992Apr6.052644.22008@maths.tcd.ie> <7464@uqcspe.cs.uq.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!rjwalsh From: rjwalsh@maths.tcd.ie (Robert Walsh) Newsgroups: rec.games.programmer Subject: Re: Bitmap Rotation/Scale Message-ID: <1992Apr8.194650.26758@maths.tcd.ie> Date: 8 Apr 92 19:46:50 GMT References: <1992Apr06.041125.25057@rose.uucp> <1992Apr6.052644.22008@maths.tcd.ie> <7464@uqcspe.cs.uq.oz.au> Sender: news@maths.tcd.ie Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Lines: 68 Nntp-Posting-Host: salmon Organisation: Amalgamated Durables