Re: Polygon coordinates transformation

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jiri wrote:
> Tommy,
>
> back in 1998 I proposed *fast* texture mapping routines that transform a
> given polygon to another polygon. The target polygon has only two
> restrictions: (1) it has to have the same number of vertices as the 
> source
> polygon, and (2) it has to be 'horizontally' convex (but, of course, both
> these conditions can be circumvented with a tiny bit of effort...).
>
> I realize my transform (essentially mapping every point on a horizontal 
> line
> in the target to a point in the source) is not exactly what you were 
> asking
> for, but it can be perhaps adapted for your purposes.
>
> jiri

Jiri, thanks a lot. That is exactly what I was trying to achieve. I had 
already made it work for triangles, and I was now looking for a way to 
transform quadrangles. Your method can take ANY convex polygon, which is 
even better. I'll implement it in Win32Dib as soon as possible. I'll just 
have to add clipping, because I'm copying memory and your method doesn't 
check if the pixels are within their boundaries.

-- 

Tommy Carlier
tommy online: http://users.pandora.be/tommycarlier

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu