|
|
Hello Everyone,
I am executing the csg_box example with no errors. I have modified the
exampleto use a mesh2 in place of the box because I want to take the
difference of the box (mesh2) and a sphere so I can see the inside triangles
of the box. I want to be able to see the inside of the boxes' triangles
(mesh2) after I cut away the sphere. I don't want to see the curved slice
that the sphere made. Currently, I see the background through the sliced
hole but I really want to see the inside of the box (mesh2).
I am using the difference function. Does this function use the stencil
buffer? Is there a way to get the vertices back after I cut a chuck out of
the box?
Here is my code:
// Persistence of Vision Ray Tracer Scene Description File
// File: mesh2.pov
// Vers: 3.5
// Desc: mesh2 demonstration scene
// Date: November/December 2001
// Auth: Christoph Hormann
// -w320 -h240
// -w512 -h384 +a0.3
//#version 3.5;
global_settings { assumed_gamma 2.2 }
light_source { <-10, 3, -20> color red 1 green 1 blue 1 }
camera {
location <0, 0, -8>
direction <0, 0, 1.2071>
look_at <0, 0, 0>
}
background {
color rgb < 0.60, 0.70, 0.5 >
}
#declare Mesh_C=
mesh2{
vertex_vectors{
8
<-1, -1, -1>, < 1, -1, -1>,
<-1, 1, -1>, < 1, 1, -1>,
<-1, -1, 1>, < 1, -1, 1>,
<-1, 1, 1>, < 1, 1, 1>,
}
face_indices{
24,
<1,0,2>, // bottom
<2,3,1>,
<1,2,0>, // bottom inside
<2,1,3>,
<4,5,6>, // top
<5,7,6>,
<4,6,5>, // top inside
<5,6,7>,
<5,1,3>, // right
<3,7,5>,
<5,3,1>, // right inside
<3,5,7>,
<0,4,2>, // left
<2,4,6>,
<0,2,4>, // left inside
<2,6,4>,
<2,6,3>,// back
<2,7,3>,
<2,3,6>,// back inside
<2,3,7>,
<0,1,4>, // front
<1,5,4>,
<0,4,1>, // front inside
<1,4,5>,
}
}
difference {
object {
Mesh_C
//texture { Mesh_TextureA }
//rotate 180*z
//rotate 90*x
finish {
ambient 0.2
diffuse 0.8
}
pigment { color red 0 green 0 blue 1 }
translate <-1.5, 0.5, 1>
}
sphere { <0.0, 0.0, 0.0>, 1
finish {
ambient 0.2
diffuse 0.8
phong 1
}
pigment { color red 1 green 0 blue 0 }
}
}
Thanks,
Tim
Post a reply to this message
|
|