POV-Ray : Newsgroups : povray.general : isosurface -> mesh? Server Time
20 Nov 2024 00:41:04 EST (-0500)
  isosurface -> mesh? (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Tom Melly
Subject: isosurface -> mesh?
Date: 24 Dec 2001 09:42:04
Message: <3c273ebc@news.povray.org>
It occured to me that getting an iso-surface function to output a mesh-file
rather than generating a scene could be a fairly trivial patch. Is this correct?
What am I missing?

--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: Warp
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 10:20:17
Message: <3c2747b1@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
: It occured to me that getting an iso-surface function to output a mesh-file
: rather than generating a scene could be a fairly trivial patch. Is this correct?

  Nope, it's not trivial. You need a tesselation algorithm, and those are not
trivial.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Ken
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 10:32:20
Message: <3C274A5B.A67FF16B@pacbell.net>
Warp wrote:
> 
> Tom Melly <tom### [at] tomandlucouk> wrote:
> : It occured to me that getting an iso-surface function to output a mesh-file
> : rather than generating a scene could be a fairly trivial patch. Is this correct?
> 
>   Nope, it's not trivial. You need a tesselation algorithm, and those are not
> trivial.

Especially for iso-surfaces!

-- 
Ken Tyler


Post a reply to this message

From: Warp
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 10:45:09
Message: <3c274d85@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:>   Nope, it's not trivial. You need a tesselation algorithm, and those are not
:> trivial.

: Especially for iso-surfaces!

  Well, it's easier for isosurfaces than for generic objects because you
can directly evaluate the isosurface, while with other objects you have to
recur to tracing (which can be slow and error-prone).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 10:47:04
Message: <3c274df8@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3c2747b1@news.povray.org...
>
>   Nope, it's not trivial. You need a tesselation algorithm, and those are not
> trivial.
>

Hmm, well I'm sure you're right, but I'm confused...

An iso-surface evaluates whether a point is on the threshold - if the answer is
"yes", could not that point be output as a mesh co-ord?


Post a reply to this message

From: Rune
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 11:19:46
Message: <3c2755a2@news.povray.org>
"Tom Melly" wrote:
> Hmm, well I'm sure you're right, but I'm confused...
>
> An iso-surface evaluates whether a point is on the
> threshold - if the answer is "yes", could not that
> point be output as a mesh co-ord?

There are infinitely many points in space.
There are also infinitely many points on the surface.

Finding the right points for the mesh vertices is not a trivial task...

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Tom Melly
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 13:26:15
Message: <3c277347@news.povray.org>
"Rune" <run### [at] mobilixnetdk> wrote in message
news:3c2755a2@news.povray.org...
>
> There are infinitely many points in space.
> There are also infinitely many points on the surface.
>

The thought had occurred - along with the thought that POV can't evaluate an
infinate number of points for an iso....

> Finding the right points for the mesh vertices is not a trivial task...
>

Can't it just use the points it checks for the iso? What would be the
defect? (I'm not argueing - I'm curious)...


Post a reply to this message

From: Christopher James Huff
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 15:34:53
Message: <chrishuff-6133BE.15350324122001@netplex.aussie.org>
In article <3c277347@news.povray.org>, "Tom Melly" <tom### [at] tomandlucouk> 
wrote:

> > Finding the right points for the mesh vertices is not a trivial task...
> 
> Can't it just use the points it checks for the iso? What would be the
> defect? (I'm not argueing - I'm curious)...

The points wouldn't be evenly distributed, and there is still the 
problem of figuring out which points to connect with triangles. The 
points from the intersections with the camera rays could be connected 
together to make a height_field-like structure, but it would have all 
the limitations of the height_field.
A collection of random points won't be so easy to connect together into 
a surface...I don't think there is any foolproof algorithm to do that, 
and all of the algorithms are pretty complex. It would probably be 
better to stick with something more like marching tetrahedrons, or some 
method that scans the surface.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

From: Warp
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 15:56:46
Message: <3c27968e@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
: A collection of random points won't be so easy to connect together into 
: a surface...I don't think there is any foolproof algorithm to do that, 
: and all of the algorithms are pretty complex. It would probably be 
: better to stick with something more like marching tetrahedrons, or some 
: method that scans the surface.

  AFAIK the marching triangles algorithm is one of the best algorithms
for this purpose. I think that it generates nicely distributed triangles
(ie. you don't get extremely thin triangles, for exampe) and it can also
nicely calculate more triangles in highly curved parts. Besides, it's
completely free (not patented anywhere). Of course that doesn't mean it is
trivial.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: isosurface -> mesh?
Date: 24 Dec 2001 19:02:32
Message: <3c27c218@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c27968e@news.povray.org...
> Christopher James Huff <chr### [at] maccom> wrote:

Yeh - thanks C and W. Thinking about it more I began to realise some of the
problems with working out which points to connect (i.e. it's no good just
connecting the three closest points).

I know nothing about the marching triangles algorithm except that it always
is mentioned in tesselation threads, but the name fits the nature of the
problem and the intuitive solutions. Ah, what the hell I'm online, I'll do a
search and read up.
Happy Christmas to one and all.


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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