POV-Ray : Newsgroups : povray.unofficial.patches : Density_file extention patch: a patch for 3D data : Re: Density_file extention patch: a patch for 3D data Server Time
8 Jul 2024 15:02:20 EDT (-0400)
  Re: Density_file extention patch: a patch for 3D data  
From: R  Suzuki
Date: 30 Aug 2002 02:18:59
Message: <3d6f0e53$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote
> #declare DATA3D2= function {
>   pattern{
>     density_file function 100,100,100{...}
>     interpolate 2
>   }
> }

I have added this feature in the new patch uploaded today.
It also has a 'save file' option.
The below is an example code.

R. Suzuki

-----------------------------------------------
#version unofficial dfe 3.5;
#include "functions.inc"

camera { location  <25, 20, -40.0> look_at <0,0,0> direction 45.*z}
light_source { <1,1.4,-1>*5 color rgb <1.4,1.2,1.0>*1.7 }


#declare DATA3D2= function { pattern{
    density_file
      function 40,40,40 {f_noise3d(x*8,y*8,z*8)/4
                +f_sphere(x-0.5,y-0.5,z-0.5,0)}
//        df3 "povdata.df"
      interpolate 102
  }
}

 isosurface{
   function{
     DATA3D2(x,y,z)
   }
   contained_by{box{0.05,0.95}}
   max_gradient 3
   threshold 0.4

   texture{ pigment{color <0.8,0.7,0.7>}  finish{phong 0.30 phong_size 90}  }
   translate <-0.5,-0.5,-0.5>
 }


Post a reply to this message

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