POV-Ray : Newsgroups : povray.general : Problem: Colours and Effects aren't the same as Predefined Shapes in Isosur= : Problem: Colours and Effects aren't the same as Predefined Shapes in Isosur= Server Time
2 Aug 2024 04:24:36 EDT (-0400)
  Problem: Colours and Effects aren't the same as Predefined Shapes in Isosur=  
From: mephuser
Date: 23 Jan 2005 03:40:01
Message: <web.41f3617e4a90639f3d54f5180@news.povray.org>
Problem: Colours and Effects aren't the same as Predefined Shapes in
Isosurface?

I'm unable to achieve the Translucent effect in the Isosurface Code. The
Translucent effect is NICE in the Predefined Shapes Code.


[Isosurface Code]
#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <0.0, .5, -4.5>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0, 0.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>
}

union
{

// Cylinder Middle
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.215,2) }
        accuracy 0.001
        threshold 0
        max_gradient 2
        contained_by{box{<-1,-0.5,-1>, <1,0.5,1>}}
        //texture{pigment {White} finish{specular 1}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

//Sphere Top
isosurface {
  function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 2
        //contained_by{sphere{0,0.78}}
        pigment {rgb .9}
        //texture{pigment {White} finish{specular 1}}
        texture{pigment {White filter 0.7} finish{specular 1}}
        translate <0, 0.78, 0>
}

//Sphere Bottom
isosurface {
  function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 2
        //contained_by{sphere{0,-0.78}}
        pigment {rgb .9}
        //texture{pigment {White} finish{specular 1}}
        texture{pigment {White filter 0.7} finish{specular 1}}
        translate <0, -0.78, 0>
}

// Cylinder Top
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 2
        contained_by{box{<-1,0.78,-1>, <1,1,1>}}
        //texture{pigment {White} finish{specular 1}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

// Cylinder Bottom
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 2
        contained_by{box{<-1,-0.78,-1>, <1,-1,1>}}
        //texture{pigment {White} finish{specular 1}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

}

[/Isosurface Code]



[Predefined Shape Code]

#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <0.0, .5, -4.5>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0, 0.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>
}

union
{
  cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
  sphere{<0, .78, 0> 0.5}
  sphere{<0, -.78, 0> 0.5}
  cylinder{<0, .78, 0>, <0, 1, 0>, .5}
  cylinder{<0, -.78, 0>, <0, -1, 0>, .5}
  texture{pigment {White filter 0.7} finish{specular 1}}
}

[/Predefined Shape Code]


Post a reply to this message

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