home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20303 comp.lang.fortran:5221 sci.engr.mech:851
- Newsgroups: comp.lang.c,comp.lang.fortran,sci.engr.mech
- Path: sparky!uunet!ukma!gatech!asuvax!ncar!noao!stsci!stallcup
- From: stallcup@stsci.edu (Scott Stallcup)
- Subject: Re: Bilinear Interpolation ...
- Message-ID: <1993Jan28.145120.8494@stsci.edu>
- Sender: news@stsci.edu
- Organization: Space Telescope Science Institute
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1993Jan27.173236.16488@cc.ic.ac.uk>
- Date: Thu, 28 Jan 1993 14:51:20 GMT
- Lines: 42
-
- Mr G. Liran (gliran@.ic.ac.uk) wrote:
- : Hi,
- : I am a student of Aeronautical Engineering and I need to write
- : a quick subroutine to do Bilinear Interpolation. I have no idea how to
- : do this and would greatly appreciate some help via e-mail or by post ...
- :
- Well, this is not a subroutine, but here is one approach to your
- problem:
-
-
- General equation for this function (in parametric matrix notation) :
-
- p(s,t) = [1-s s] [a d] [1-t]
- [b c] [t ]
-
- Where p is a 3D point as a function of s and t.
- a, b, c, and d are the 3D vectors defining the "corner" points of the
- four sided patch to be interpolated on.
-
- "s" should be in the domain: 0.0 to 1.0 in the direction of side "ab"
- and "dc"
-
- "t" should be in the domain: 0.0 to 1.0 in the direction of side "ad"
- and "bc"
-
- NOTE: p(0,0) = a
- p(0,1) = d
- p(1,0) = b
- p(1,1) = c
-
- HINT: Draw youself a picture of four arbitrary points which form a
- convex polygon in the plane. Then label the points in clockwise
- order from a to d. The function does not require the points
- to form a convex polygon (it's just easier to visualize).
-
- Hope this helps,
-
- -----------------------------------------------
- Scott Stallcup stallcup@stsci.edu
- Space Telescope Science Institute
-
-
-