POV-Ray : Newsgroups : povray.general : how to model this? : Re: how to model this? Server Time
2 Aug 2024 20:17:41 EDT (-0400)
  Re: how to model this?  
From: John VanSickle
Date: 2 Aug 2004 12:32:39
Message: <410e6ca7$1@news.povray.org>
Gert Van den Eynde wrote:
> Hi all,
> 
> I would like to use povray to model some scientific data: I have a (large)
> set <x,y,z,data> vectors in which the data scalar can be represented using
> a color. Between the given data, an interpolation mechanism should provide
> continuity. How could I model this in Povray (speed of trace is not that
> important) ?
> 
> Any tips are most welcome,

You could 'tetrahedronate' the data, namely, by selecting sets of four
vectors out of the total data set, such that each set of four forms a
tetrahedron, with none of the tetrahedra overlapping.  I don't know
off-hand if there's a good algorithm for that.

Each of these tetrahedra could then be modeled with an actual
tetrahedron, and textured so that the chosen color for all four points
is interpolated within the tetrahedron.

Place all of the tetrahedra in a union { } statement, and intersect that
union with a plane object (to get an interior view), using the
cutaway_textures keyword to preserve the texturing of the tetrahedra.

an example of this:

intersection {
   union {
     object { Tetrahedron
       texture { TextureTetrahedron(scalar1,scalar2,scalar3,scalar4) }
       TransformTetrahedron(point1,point2,point3,point4)
     }
     // repeat for each tetrahedron
   }
   plane { SomeVector,0 } // cutting plane passes through origin
   cutaway_textures
}

Hope this helps,
John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.