POV-Ray : Newsgroups : povray.newusers : Isosurface problem : Re: Isosurface problem Server Time
13 May 2024 23:18:26 EDT (-0400)
  Re: Isosurface problem  
From: Alain
Date: 29 Jan 2014 13:46:01
Message: <52e94c69@news.povray.org>

> I have created an isosurface with _exactly_ the shape I want, but there is one
> region where generation breaks down, I think because of surfaces coinciding.
>
> Any suggestions?
>
> #version 3.7;
> global_settings { assumed_gamma 1.0 }
> #default{ finish{ ambient 0.1 diffuse 0.9 }}
>
> #include "colors.inc"
> #include "functions.inc"
>
> //-------------------------------------------
>
> #declare CamLoc = < 0, 0,-20>;
>
> camera {
>   location CamLoc
>          right     x*image_width/image_height
>   look_at < 0, 0, 0>
>   angle 30
> }
>
> light_source {CamLoc color White*0.35}
> light_source {<-50, 150,-75> color White}
>
> background { color rgb<1,1,1>*0.35 }
>
>
> /*
> box {<-4,-3, 1>, < 4, 3, 2>
>   texture {
>    pigment {checker color rgb < 0.05, 0, 0.35>, color White}
>    finish {ambient 0 diffuse 1}
>   }
> }
> */
> //-------------------------------------------
> #local Yo = 0.08;
> #local Zo = .635;
> #local Xa = 0.75;
> #local Yb = 1.6;
> #local Rr = 2.560;
> #local Ko = 0.23;
>
>
> #declare IsoFinish =
> finish {
>   ambient 0 diffuse 1
>   specular 1 roughness 0.02
>   brilliance 2
> }
>
> #declare  Shape =
> intersection   {
> isosurface {
>
> // I think the isosurface function does not like sqrt with negative roots.
> // This gives a very strange result
> //    function {-sqrt((1-pow(z/Zo,2))*pow((y-Rr+sqrt(pow(Rr,2)-pow(z,2))),2))
> +pow(x,2)}
>

This negate the function. It effectively make the outside part the 
"inside" of your shape. If the function don't require been negated, 
you'll only see the contained_by object.
You may also need to negate the thresshold value.


Alain


Post a reply to this message

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