POV-Ray : Newsgroups : povray.bugreports : sphere slicing problem : Re: sphere slicing problem Server Time
19 Apr 2024 04:32:31 EDT (-0400)
  Re: sphere slicing problem  
From: Bald Eagle
Date: 15 Oct 2019 07:10:00
Message: <web.5da5a820401c58094eec112d0@news.povray.org>
I did this real quick - I'm off to work - but try putting the object LAST in the
hierarchy so that the CSG inherits ITS texture properties, not the other way
around.

 #version 3.8;
 global_settings {assumed_gamma 1.0 }
 #include "colors.inc"

#declare Aspect = image_width/image_height;

 camera {
  location <0, 5, -10>
  right x*Aspect
  look_at <0, 0, 0>
 }

light_source {<0, 5, -10> color White}

plane {z, 1 pigment {White*0.2}}

#declare Line = 0.015;
#declare LinePigment = pigment {Yellow+White/2}

#declare Slice = 0.1;
#declare Sphere = difference {sphere {0, 0.5 } sphere {0, 0.3 }}
#declare Box = box {<-1, 0, -1> <1, -Slice, 1>}

#declare E = 0.000001;

#for (M, -0.5, 0.5, Slice)
 intersection {
  object {Box translate y*M}
  object {Sphere}

  translate x*M*10
  pigment {Red}
 }
#end


Post a reply to this message

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