Jump to content
  • Advertisement
Sign in to follow this  
afraidofdark

biliinear interpolation

This topic is 2595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello,
I have a point in a unit square, and I want to map it to a new polygon defined with 4 points


map (pnt2d p, pnt2d r1, r2, r3, r4)

p is the point that I want to map, r1 is lower left corner r2 lower right, r3 higher right and r4 higher left point of the polygon which p will be maped to
can you write me the function ? I have been trying to write one for 3 hours :\

Share this post


Link to post
Share on other sites
Advertisement

Does this give you a strong enough hint?
[media]http://i.imgur.com/1UeHd.jpg[/media]



thanx, I also have another question, does r3-r4 has to be parrallel to r2-r1 ? or is it okey if I choose 4 point which makes a convex polygon ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!