POV-Ray : Newsgroups : povray.text.scene-files : isosurface in a blender Server Time
28 Jul 2024 12:27:39 EDT (-0400)
  isosurface in a blender (Message 1 to 1 of 1)  
From: hall
Subject: isosurface in a blender
Date: 14 Mar 2000 20:04:45
Message: <38cee1ad@news.povray.org>
I am posting this to explain how I made the before and after pictures in
binaries.images.....

Here's the nonblended version............

#version unofficial MegaPOV 0.4;

#include "colors.inc"

camera
 {
  location  <10,0,-10>
  look_at   <0,0,0>
 }

light_source { <0,10,-10> 1 }

#declare a=function{pigment{bozo color_map{[0 color rgb 0][1 color rgb 1]}}}

isosurface
{
 function {a(x,y,z)}
 contained_by{box{<-5,-5,-5>,<5,5,5>}}
 threshold .1
// eval
 max_gradient 14.771
 pigment
  {
   onion
   color_map
   {
    [0.00 color rgb <1,1,0>]
    [0.25 color rgb <1,0,0>]
    [0.50 color rgb <0,1,0>]
    [0.75 color rgb <0,0,1>]
    [1.00 color rgb <1,1,0>]
   }
   scale .75
  }
 finish
  {
   ambient .5
   phong 1.0
   phong_size 30
  }
}



and here's the blended version.......


#version unofficial MegaPOV 0.4;

#include "colors.inc"

camera
 {
  location  <10,0,-10>
  look_at   <0,0,0>
 }

light_source { <0,10,-10> 1 }

#declare a=function{pigment{bozo color_map{[0 color rgb 0][1 color rgb 1]}}}
// b gives the distance from the y axis
#declare b=function{sqrt((x*x)+(z*z))}
// c gives the rotation (which is greater the further you are from the y
axis)
#declare c=function{b(x,y,z)*90*pi/180}
// d and e give the new positions of the sample point after rotation
#declare d=function{x*cos(c)+z*sin(c)}
#declare e=function{-1*x*sin(c)+z*cos(c)}

isosurface
{
 function {a(d(x,y,z),y,e(x,y,z))}
 contained_by{box{<-5,-5,-5>,<5,5,5>}}
 threshold .1
// eval
 max_gradient 14.771
 pigment
  {
   onion
   color_map
   {
    [0.00 color rgb <1,1,0>]
    [0.25 color rgb <1,0,0>]
    [0.50 color rgb <0,1,0>]
    [0.75 color rgb <0,0,1>]
    [1.00 color rgb <1,1,0>]
   }
   scale .75
  }
 finish
  {
   ambient .5
   phong 1.0
   phong_size 30
  }
}


Post a reply to this message

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