Razor Code
Rambling about code since quite recently

Topics

User Functions





    Don't have an account yet? Sign up as a New User
    Lost your password?

Events

There are no upcoming events

Older Stories

Sunday 14-Sep

  • ACM ICPC 2008 (0)

  • Monday 11-Aug

  • NZ Programming Comp (0)

  • Sunday 27-Jul

  • Blast from the past (0)

  • Monday 21-Jul

  • Timetable generator again (0)

  • Tuesday 08-Jul

  • Hosting (2)

  • Saturday 05-Apr

  • Sparse Volume (0)

  • Friday 28-Mar

  • Carmack (0)

  • Tuesday 04-Mar

  • Back to Uni (0)
  • Dell Kill Switch Direct (0)

  • Monday 18-Feb

  • Lappy (0)

  •  Tetrahedral interpolation    
     Author: 
     Dated:  Sunday, December 02 2007 @ 12:02 AM NZDT
     Viewed:  801 times  
    Programming

    Phew, that took some figuring out. I've got tetrahedral interpolation working in my voxel renderer now, so it only needs to look up 4 values to find the radius at a point, not 8. It should give a fairly decent performance improvement, but I'm not sure because I'm using a different pc. The down side is that I lose the curves I liked so much, although it looks about as good (better in some cases, worse in others). Most of the information I found about tetrahedral interpolation was in legalese (it's patented), and no one on gamedev.net seemed to know much about it, so I had to figure most of it out on my own.

    I might write more about it later, but the basic idea is that you 1. Divide your cube into 6 tetrahedrons and find which one your point of interest is inside using the plane equations (this can be boiled down to a switch statement) and 2. Interpolate between the values at the 4 vertices of the tetrahedron (the equation can be greatly simplified for the relevant special cases). Took me three pages of working to figure out, but someone who knew their stuff could probably do it in one. Not to mention the stupid mistake where I got the switch statement exactly wrong...

    I suppose the next thing is converting my normal vector calculation into some kind of tetrahedral scheme. I'm almost sure it's possible, but it may yet give me a headache.




    Trackback

    Trackback URL for this entry: http://razorcode.net/trackback.php/TetrahedralInterpolation

    Here's what others have to say about 'Tetrahedral interpolation':

    Deze vorm van kredietverlening bestaat uit twee delen from belasting
    Brussel moet streep door vliegtuigbelasting zetten [read more]
    Tracked on Friday, May 15 2009 @ 12:16 PM NZST

    Tetrahedral interpolation | 0 comments | Create New Account
    The following comments are owned by whomever posted them. This site is not responsible for what they say.