Results 1 to 3 of 3

Thread: 3D triangle interpolation

  1. #1
    Junior Member Newbie
    Join Date
    May 2001
    Posts
    2

    3D triangle interpolation

    Hello

    I have the ollowing problem:
    Given the three 3d vertices of a triangle and a point x, y, z inside the triangle: What is the fastest way to interpolate (eg edge-point intenities) for the point x,y,z?

    Thanks a lot

    Pipo

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    29

    Re: 3D triangle interpolation

    >Given the three 3d vertices of a triangle and a point x, y, z inside the triangle: What is the >fastest way to interpolate (eg edge-point intenities) for the point x,y,z?

    hmm, maybe you express more exact what you are going to do ?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: 3D triangle interpolation

    Dunno if it's the fastest way, but here's the standard linear algebra way that I'd do it:
    Code :
       B 
       | \
       |  \
       |   \
       |    \
       |     \
       |      \
       |   .P  \
       |  /|    \
       | / |     \
       A---------C
           X
    If you have a triangle with vertices A, B, C and a point in the middle P and you want to find the point X on a side then you need to do this:
    (i) Use a local coordinate system for each point e.g. set the origin at A so you have the vector C.
    (ii) You also have the vector P.
    (iii) Calculate the projection of P onto C using the formula X = {C'*P/(C'*C)}*C where ' is the transpose and * is vector multiplication (i.e. you can just swap the '* symbols for dot product).
    (iv) The part inside the curly brackets gives you the distance along CA to X from A.
    (v) Interpolate intensities.
    (v) Repeat twice so you have points X, Y and Z, one for each edge of the triangle.

    I'd be interested if anyone else has any faster methods.

    Hope that helps.

    <edit>ASCII art didn't turn out too well </edit>

    <edit2>Found a better explanation than mine with diagrams and stuff at http://astronomy.swin.edu.au/pbourke...try/pointline/</edit2>

    [This message has been edited by ffish (edited 06-09-2001).]

    [This message has been edited by ffish (edited 06-09-2001).]

Similar Threads

  1. An alternative to triangle strips and triangle fans
    By vincoof in forum OpenGL: General
    Replies: 8
    Last Post: 10-26-2012, 04:04 AM
  2. Replies: 3
    Last Post: 10-09-2012, 09:39 PM
  3. triangle strip with a LINE triangle display error
    By Samme in forum OpenGL: Windows
    Replies: 22
    Last Post: 11-20-2008, 07:50 PM
  4. OT: fastest ray-triangle line -triangle intersection algo
    By V-man in forum OpenGL: Advanced Coding
    Replies: 23
    Last Post: 08-28-2002, 02:18 AM
  5. Simple triangle interpolation
    By Fugit in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-29-2000, 02:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean