|
|
Hello,
I'd like to get an intersection of a cube and an octahedron (mesh).
I use this code:
intersection {
mesh2 { //Oktaeder
vertex_vectors {
6,
<0,-1,0>,
<-1,0,0>,
<0,0,-1>,
<1,0,0>,
<0,0,1>,
<0,1,0>
}
face_indices {
8,
<0,1,2>,
<0,2,3>,
<0,3,4>,
<0,4,1>,
<5,1,2>,
<5,2,3>,
<5,3,4>,
<5,4,1>,
}
}
box {
<-1,-1,-1>*0.7, <1,1,1>*0.7
}
pigment { Red }
rotate y*20 // Equivalent to "rotate <0,20,0>"
}
The problem is, that some of the faces (the faces of the cube) are transparent,
although they should have a red surface.
Any help will be appreciated. (I'm not a native speaker)
Johannes
Post a reply to this message
|
|
|
|
> Alain <kua### [at] videotronca> wrote:
>> You need to make sure that the inside_vercor is not parallel to any
>> face. If that's the case, change it's value slightly,like: <0.01,1,0>
>
> Is this documented anywhere? It is good to know. (It makes sense, now that I
> think about it.)
>
>
I think so.
Also, ther is a mention that if there are artefacts or apparent holes,
that changing the inside_vector direction by a tiny amount will normaly
resolve the isue. In some cases, it will switch to another face, but,
with some luck and findling, it will happen in some area where it don't
mather: Back side, outside the intersection/difference area, hiden by
another object,...
Alain
Post a reply to this message
|
|