POV-Ray : Newsgroups : povray.advanced-users : Isosurface CSG : Re: Isosurface CSG Server Time
28 Jul 2024 18:17:33 EDT (-0400)
  Re: Isosurface CSG  
From: Tor Olav Kristensen
Date: 3 Sep 2004 17:08:40
Message: <4138dd58$1@news.povray.org>
pkowal wrote:

> //I don't know why adding noise to isosurface csg object tears it apart.
...

Because you added too much noise.
Try the code below.

Tor Olav

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.6;

#include "functions.inc"
#include "colors.inc"

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

isosurface {
   function {
     min(
       max(x*x + y*y + z*z - 1, -y),
       max(x*x + y*y + z*z - 1,  y)
     ) +
     0.2*f_noise3d(10*x, 40*y, 10*z)
   }
   contained_by { sphere { <0, 0, 0>, 2 } }
   max_gradient 3
   pigment { color Yellow }
   translate 0.9*x
}

isosurface {
   function {
     x*x + y*y + z*z - 1 +
     f_noise3d(
       30*x*f_noise3d(10 + 2*x, 6*y, 2*z),
       y,
       20*z*f_noise3d(4*x, 3*y, 10 + 4*z)
     )*0.3
   }
   contained_by { sphere { <0, 0, 0>, 2 } }
   max_gradient 10
   pigment { color Red }
   translate -0.9*x
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

camera {
   location -4*z
   look_at 0*y
}

light_source { <-1,  1, -1>*100 color White*1.5 }

light_source { < 1, -1, -1>*100 color White*0.4 }

background { color rgb <0.5, 0.5, 0.6> }

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


Post a reply to this message

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