POV-Ray : Newsgroups : povray.general : how to model this? Server Time
6 Nov 2024 08:19:30 EST (-0500)
  how to model this? (Message 1 to 5 of 5)  
From: Gert  Van den Eynde
Subject: how to model this?
Date: 2 Aug 2004 11:06:46
Message: <410e5886@news.povray.org>
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,

gert


Post a reply to this message

From: Christoph Hormann
Subject: Re: how to model this?
Date: 2 Aug 2004 11:30:02
Message: <celme0$7a1$1@chho.imagico.de>
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) ?

The data you describe does not represent a surface geometry - the idea 
to 'model' it in POV-Ray does not make much sense therefore.

In any case interpolating a continuous scalar field from values at 
certain arbitrary positions (i.e. not in a regular grid) is quite tricky 
- the usual approach would be to first resample it to a regular grid and 
then display it is some way (for example using media).

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Arne Kleinophorst
Subject: Re: how to model this?
Date: 2 Aug 2004 11:34:06
Message: <410e5eee$1@news.povray.org>
Gert Van den Eynde schrieb:

> 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,
> 
> gert

Hi Gert,

If there is some kind of 'normalized' length between the points,it might 
work with blob spheres?
Just an idea.


Arne


Post a reply to this message

From: John VanSickle
Subject: Re: how to model this?
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

From: scott
Subject: Re: how to model this?
Date: 2 Aug 2004 12:34:49
Message: <410e6d29$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) ?

This can be very tricky to get good results.  The best method will depend on
what sort of data you have and what you want it to look like.

In terms of final result, are you expecting a closed opaque solid that
completely covers all data points?  Are you expecting it to be nice smooth
curved surfaces or sharp angular plane facets?  Or do you want it to only
cover some of the data points (eg "data>5.0" bit like an isosurface).  Or do
you want semi-transparent "layers" to show the data, a bit like a 3D medical
image where they can make the bone show up as solid and then the skin and
muscles semi-transparent with different colours.

And as for the input, is is on a regular grid?  Are all the data points
"inside" the object you want to see?

As a first suggestion, radial basis functions tend to be quite good at
interpolating between data points, Google will turn up some info I expect.
Then once you have your interpolated function you have to decide what you
are going to do with it.  Maybe an iso-surface will do, but render times
will be ridiculous if you have more than a handful of data points.

The alternative is to triangulate the interpolated function, not a
straightforward task.  You could use something like marching cubes (although
I'm sure there's better, marching cubes/tetrahedra are the only ones I
learnt!) and then you could colour-code each vertex depending on the "data"
value too.

Or, a very simple method would be to just stick a sphere at each data point.
You could play with the size/colour/transparency until something looked
good.


Post a reply to this message

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