As was mentioned elsewhere, somebody posted a challenge to create a Star Wars text fading effect. My initial thoughts was to simply take a normal screen of text and then map it to a trapezoidal shape before displaying it, which seems simple enough.
Theory and reality, however, just don't seem to agree with the concept, as illustrated below:
'my original screen
LINE (100, 100)-(300, 300), &HFFFF0000, BF
'a red square
'what I want to copy to, to create a "Star Wars" fade effect
LINE (450, 100)-(550, 100)
_MAPTRIANGLE (100, 100)-(100, 300)-(300, 100)TO(450, 100)-(400, 300)-(550, 100)
_MAPTRIANGLE (100, 300)-(300, 100)-(300, 300)TO(400, 300)-(550, 100)-(600, 300)
At first, it all appears to be working as intended with the text getting a nice slant and the screen narrowing up top to produce the "fade into distance" effect we see in the movies...
Then we do the other half of the triangle and have the text slant in
the opposite direction...
Which *does* create a wild little effect when we scroll information across the screen, but it's not what we're looking for here.
So, it seems my "simple" little solution may not be as simple as I first imagined it would be. Unless somebody sees something wrong with my process here, I think I'll have to rethink the whole concept. Maybe if I broke the screen down to a series of a dozen triangles or so, and then mapped them over, it might work as it could give a gradual transition from left slope to right slope with the center simply being shrunk as it goes along, but the math for that might end up being too big a PITA for me to sit down and sort out...
Anywho, I thought I'd share my initial results so folks can see what I'm getting so far, and if you have any idea of how to fix the process, or see an obvious glitch in the works here, I'd love if you'd share it. Seems like it'd be simple to map from a square to a trapezoid, but I'm just not having much luck with it at the moment.