|
![](/i/fill.gif) |
Hey guys!
I'm trying to create a sort-of curved slab, if you will. You can see what I
mean by compiling this code:
#version 3.6;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
ambient_light White
max_trace_level 256
}
camera {
location <0,0,-2>
look_at <0,0,0>
}
light_source {
<100,100,0>
color White
}
#declare a =
difference {
cylinder { <-1,0,0>,<1,0,0>,1.00003}
cylinder { <-1.00003,0,0>,<1.00003,0,0>,1}
plane { z,0 }
pigment { color Red }
rotate <0,90,0>
rotate <90,0,0>
}
object { a }
Now, I want to build the same figure, but piece by piece - start in the middle
and work outwards, with each part being a different color. I thought I could
modify the object "a" with some more difference statements and I've made quite a
bit of progress on this. However, there is one sticking point: when I render
the following code, I get one part of the center-most piece sticking out of the
next larger one.
#version 3.6;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
ambient_light White
max_trace_level 256
}
camera {
location <0,0,-2>
look_at <0,0,0>
}
light_source {
<100,100,0>
color White
}
// plane {
// y, -10
// pigment { hexagon Green, White, Blue }
// }
// box {
// -0.5, 0.5
// pigment { checker Red, Blue }
// }
#declare curved_1 =
difference {
cylinder { <-1,0,0>,<1,0,0>,1.00003 }
cylinder { <-1.00003,0,0>,<1.00003,0,0>,1 }
plane { z,0.9 }
plane { -y,0.1 }
plane { -y,-0.1 }
plane { x,-0.1 }
plane { -x,-0.1 }
// rotate <0,90,0>
// rotate <90,0,0>
}
#declare curved_2 =
difference {
cylinder { <-1,0,0>,<1,0,0>,1.00003 }
cylinder { <-1.00003,0,0>,<1.00003,0,0>,1 }
plane { z,0.8 }
plane { -y,0.2 }
plane { -y,-0.2 }
plane { x,-0.2 }
plane { -x,-0.2 }
// rotate <0,90,0>
// rotate <90,0,0>
}
object { curved_1 pigment { color Blue } }
object { curved_2 pigment { color Red } }
See how you can see the blue? It doesn't make sense! I'm trying to figure out
why, when I cut it symmetrically with respect to the origin, this occurs.
Thanks in advance!
- Chaanakya
Post a reply to this message
|
![](/i/fill.gif) |