POV-Ray : Newsgroups : povray.newusers : Intersection of Mesh and Box : Intersection of Mesh and Box Server Time
2 Jun 2024 10:20:46 EDT (-0400)
  Intersection of Mesh and Box  
From: Johannes
Date: 8 Sep 2012 10:00:00
Message: <web.504b4e1d416e823cffb9b00a0@news.povray.org>
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

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