Skip to content
Prev 332902 / 398503 Next

`level' definition in `computeContour3d' (misc3d package)

On Sat, 09 Nov 2013 18:18:23 +0100, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:

            
I was imprecise: what I meant is: the isosurface should not change in my  
example between both cases.
understood/agreed.
yes, it does that. and it is clear that due to your interpretation it  
selects
about point 3.5 and 6.5 (?) for

data2 <- c(0, 0, 1, 1, 2, 1, 1, 0, 0).

still, depending on application I would maintain that it can make (more)  
sense
to keep the isosurface at 3,7 in this case.

I believe the problem maybe is not so much "discrete vs. continuous" but  
whether there is
a constant "plateau" in the data: even for the underlying continuous field  
it is a matter
of convention, then, where to put the level=1 contour: at the first  
crossing, in the middle
of the plateau, or at the second crossing. I understand `computeContour3d'  
essentially puts
the contour in the middle of the plateau.

I do not want to claim present behavior is a bug. it just is not  
necessarily what
is needed. an additional argument/flag to `computeContour3d', e.g., to  
select behaviour in this
sort of "degenerate" cases (exhibiting strictly constant plateaus) would  
be great.

 from a purely practical point of view: as explained I want to get the  
"outer isosurface" of such
preprocessed discretized data and quantify the surface area. the question  
here is "when do the data
first cross the threshold" and that's where the present behaviour causes a  
problem for me.

but anyway thanks for bothering. if it is deemed undesirable to change  
present behaviour (or to add
a further flag for controling the behaviour of `level') I can fix it  
locally for my needs by
just changing the test in `faceType' (or so I presume).

joerg
--