Sign in to follow this  

bilinear interpolation in a quadrilateral

This topic is 4684 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

I have a quadrilateral defined by four vertices, a, b, c and d. Each vertex has a colour value associated with it. I then have a point P which I know lies inside the quadrilateral. How do I get an interpolated colour value for P? Ideally I would like to get a weight for each vertex as I may have more than one value to interpolate. I remember deriving this at university. The method started with drawing a line, ef, that bisects ab and cd and passes through P, like so:
d -------- f ---- c
|             |        |
|             |        |
g -------- P ---- h
|             |        |
a -------- e ---- b
You then use the equality
(e-a)/(b-a) = (f-d)/(c-d)
as your starting point and you end up with an equation that you solve using the quadratic formula. So I know essentially what I have to do: I'm just getting fuzzy in the middle! Can anyone help me?

Share this post


Link to post
Share on other sites

This topic is 4684 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this