POV-Ray : Newsgroups : povray.text.scene-files : Isosurface with density_map Server Time
25 Dec 2024 13:25:58 EST (-0500)
  Isosurface with density_map (Message 1 to 1 of 1)  
From: ingo
Subject: Isosurface with density_map
Date: 26 Jul 1999 14:37:21
Message: <379caae1@news.povray.org>
// ========================
// First scene: for creating the df3-file
// +w is equal to +h, use best possible aa
// make an animation +kfi0 +kfi99
#version 3.1;
global_settings {assumed_gamma 1.0}
camera {
   location  <0.0, 0.0, -3.0>
   look_at   <0.0, 0.0,  0.0>
   right x   // square aspect ratio
   angle 90
   orthographic
}

 // Input between 0 and 1.
#macro Imm(Min,Max,Input)
   (Min+((Max-Min)*Input))
#end //macro

#declare Check= pigment {
    checker
    colour rgb 1, colour rgb 0
}

plane {
   -z,0.0
   pigment {
      boxed scale 2
      pigment_map {
         [0, rgb 0]
         [0.001, Check scale Imm(0.5,1,clock)]
      }
      rotate <0,0,Imm(0,90,clock)>
   }
   finish {ambient 1}
}
// ========================

// Second scene: Making the Iso-object
// Needs the Superpatch 3.1e !!
#version 3.1;
#include "colors.inc"
#include "woods.inc"
global_settings {assumed_gamma 1.0}

light_source {
   <500, 500,-500>
   rgb 1
}
light_source {
   <-500, 500,-500>
   rgb 0.5
}

camera {
   location  <2, 1.0,-2.0>
   look_at   <0.5, 0.2, 0.0>
}

#declare Thing= isosurface{
   function {
      pigment {
         density_file df3 "isosph.df3"
         interpolate 1
         translate -0.5
      }
   }
   bounded_by {box{-0.5,0.5}}
   threshold 0.5
   sign -1
   max_gradient 1000
   method 2
   scale <1,1,2>
   texture {T_Wood10}
}

object {Thing}
object {
   Thing
   rotate <0,180,0>
   translate <0.9,0.7,1.2>
}


Post a reply to this message

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