POV-Ray : Newsgroups : povray.binaries.images : Re: isosurface problem Server Time
16 Nov 2024 12:25:14 EST (-0500)
  Re: isosurface problem (Message 1 to 1 of 1)  
From: Mike Williams
Subject: Re: isosurface problem
Date: 11 May 2005 13:01:29
Message: <42823a69@news.povray.org>
Wasn't it Bill Pragnell who wrote:
>Right then, all you isosurface gurus out there: perhaps you can help me
with
>this.
>
>Here's the problem. I'm trying to create a tetrahedral asteroid using an
>isosurface. I've written a function which comprises four spheres, six
>cylinders and a tetrahedron with its vertices and edges trimmed using a
>functional intersection, merged to produce a perfect rounded tetrahedron
>(first picture). I'm then boulderifying this base shape by adding crackle
>and agate pigment functions.
>
>No problem so far, I hear you say.
>
>However, there appears to be a mismatch between the planar faces and the
>curved edges which produces "fault lines" (second picture). I've tried
>upping accuracy and max_gradient to no avail, and I've tried adding /
>subtracting the pigment functions in various combinations - no good. Can
>anyone shed any light on this bizarre artefact?
>
>Source code, in case I'm being stupid:

I don't think that approach is ever going to work.

The problem is that the various components of your shape are displaced in
different directions when you add the crackle and agate pigments.

Instead of complicated pigment functions, lets just consider what happens
when you add a constant to your fn_rounded_tetra function.

#declare Boulder = isosurface {
                        function { fn_rounded_tetra(x,y,z,10,1)
                                   +0.7  // constant displacement
                                  }
                        max_gradient 4
                        contained_by { box {-15, 15 } }
                        pigment { color White } }

The spheres contract towards their centres.
The cylinders contract towards their centre lines.
The planes shift sideways.

[If necessary, imagine a small region of space where the pigment functions
add up to values close to +0.7]

The image is a closeup of what happens at a corner with a constant
displacement, with various parameters adjusted to make the effect clearer.


--
Mike Williams
Gentleman of Leisure


Post a reply to this message


Attachments:
Download 'RoundedTet.jpg' (17 KB)

Preview of image 'RoundedTet.jpg'
RoundedTet.jpg


 

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