POV-Ray : Newsgroups : povray.advanced-users : help with my code : help with my code Server Time
28 Jul 2024 10:23:04 EDT (-0400)
  help with my code  
From: Dennis Miller
Date: 13 Feb 2006 08:36:05
Message: <43f08b45$1@news.povray.org>
Hello. I have been having great luck with using image maps to create 
isosurfaces, but I must admit, I don;t quite understand what is happening. 
What specific parameters of the preexisting bitmaps are being extracted for 
use as isosurface parameters? Luminance, for example? In the code below, I 
use frames from a video of myself for both the pigment and the function. The 
result is awesome. But can someone explain, in any level of detail, what 
processes are at work? When I union ("morph" may be a better term here) the 
function onto a sphere, the image looks like Mt. Rushmore - the face is 
carved out of the surface of the sphere (excellent!).
In any event, thanks very much for the help.
Best,
Dennis

#declare IM = pigment {
  image_map {
  tga concat("e:\\me\\me", str(clock*356,-3,0), ".tga")
    map_type 1
    interpolate 2
  }   }

#declare Pic = function {
 pigment {
  image_map {
  tga concat("e:\\me\\me", str(clock*356,-3,0), ".tga")
    map_type 1
    interpolate 2
  } } }

#declare Sphere = function { x^2+y^2+z^2 }

#declare FINAL = union {
  isosurface {
    function {
      (1 - Pic(x, y, z).grey) * 0.4 +  Sphere(x, y, z)   }
    max_gradient 8
    threshold 0.9
    contained_by { sphere { 0, 0.999 } }
    no_shadow

    pigment {IM}
    finish { ambient 0.8 specular .2 diffuse 0.7 }
      }

-- 

dhm### [at] comcastnet
http://www.dennismiller.neu.edu


Post a reply to this message

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