POV-Ray : Newsgroups : povray.text.scene-files : isosurface troubles Server Time
8 Jul 2024 10:39:31 EDT (-0400)
  isosurface troubles (Message 1 to 1 of 1)  
From: Paul Daniel Jones
Subject: isosurface troubles
Date: 12 Oct 2000 21:16:46
Message: <39E660F4.ED622DCB@psu.edu>
#version Unofficial Megapov 0.5;

#include "colors.inc"
#include "textures.inc"

global_settings
{
  assumed_gamma 1.0
}

// ----------------------------------------
camera
{
  location  <6, 6, 2>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0,  0.0>
}

sky_sphere { pigment{color Black}}

light_source
{
  0*x // light's position (translated below)
  color red 1.0  green 1.0  blue 1.0  // light's color
  translate <0, 30, 0> 

} 

light_source
{
  0*x // light's position (translated below)
  color red 1.0  green 1.0  blue 1.0  // light's color
  translate <30, 30, 30> 

}  

#declare lightobj = sphere {0,.4 pigment {rgbt <1,1,1,1>}
finish {ambient 1 diffuse 0.1 specular 1}
normal {wrinkles .11 }
}
    #declare T1 = pigment { 
      bozo
      pigment_map {

        [0.20 colour rgb .3]
        [0.80 colour rgb .6]
        [1.00 colour rgb  .8]
      }
    scale 100}

  #declare T2 = pigment {
      T1
      warp { repeat x*.15 offset <0,60,0> }
      turbulence 1
    }
    
    #declare T3 = pigment {
      T2  
 
      warp { repeat y*.15 offset <45,0,0> }
         turbulence 1
         }

#declare hfs = function {
        pigment {
                image_map{
                        tga "bumpmap1.tga" 
                        map_type 1
                        interpolate 2
                        }}} 
#declare R = 0.2 
;                                                                    

#declare tex1 = texture {pigment{T3}  

        finish {ambient 0.1
                diffuse 0.5
                reflection .5
                phong 1
                phong_size 200
                metallic}}
                
#declare techsphere =

isosurface {
        function {x*x+y*y+z*z-R*hfs(x,y,z)}
        threshold  1
        method 2  
        max_gradient  120 
        contained_by {sphere {0,1.1        }}
        texture {tex1}
        finish {ambient 0.1
                diffuse 0.4
                reflection 0.1
                phong 1
                phong_size 200}}  
     
      
      
       
                           
#declare partial_sphere1 = 
intersection  {
object {techsphere }
plane {z,0 texture {tex1}}

}


//ok, the point here is to be able to call a half sphere
//which is closed at one end and then translate it to any position, like
a primative.


object {partial_sphere1 texture {tex1} translate <0,0,0> }
//object {plug_pos_y texture {tex1} translate <0,0.5,0> }


Post a reply to this message

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