POV-Ray : Newsgroups : povray.general : Solid mesh problem? Server Time
5 Aug 2024 16:14:23 EDT (-0400)
  Solid mesh problem? (Message 1 to 3 of 3)  
From: Mike
Subject: Solid mesh problem?
Date: 8 Aug 2002 22:00:19
Message: <web.3d5320eb7b40f3f88b0b6f760@news.povray.org>
It seems that CSG differences and intersections involving solid meshes
always treat the mesh as the object that is 'cut', i.e. like you placed it
first in the CSG object. Whether you use mesh or mesh2 doesn't seem to make
any difference. Of course you can still use inverse on the entire CSG to
get the correct shape, but it'd be nicer to keep everything behaving
consistently. ;)
Can someone verify this?

Here's an example using a plane and an icosahedron:

light_source{<5,10,-10>color rgb<1,1,1>}
difference{
  box{
    <-2,-2,-2><2,-.1,2>
    pigment{color rgb<0,1,0>}
  }
  mesh2{
    vertex_vectors{
      12
      <-1,0,-0.618> <-1,0,0.618> <-0.618,-1,0> <-0.618,1,0>
      <0,-0.618,-1> <0,-0.618,1> <0,0.618,-1> <0,0.618,1>
      <0.618,-1,0> <0.618,1,0> <1,0,-0.618> <1,0,0.618>
    }
    face_indices{
      20
      <0,1,2> <0,1,3> <0,4,6> <1,5,7> <0,2,4>
      <0,3,6> <1,2,5> <1,3,7> <2,4,8> <2,5,8>
      <3,6,9> <3,7,9> <4,8,10> <6,9,10> <5,8,11>
      <7,9,11> <4,6,10> <5,7,11> <8,10,11> <9,10,11>
    }
    inside_vector <0,0,1>
    pigment{color rgb<1,0,0>}
  }
  rotate<-10,0,0>
  translate<0,0,5>
}


Post a reply to this message

From: Warp
Subject: Re: Solid mesh problem?
Date: 9 Aug 2002 07:30:48
Message: <3d53a7e8@news.povray.org>
Mike <nomail@nomail> wrote:
> It seems that CSG differences and intersections involving solid meshes
> always treat the mesh as the object that is 'cut', i.e. like you placed it
> first in the CSG object.

  Actually it looks like if the mesh is the second object in the CSG, then
difference works as if it was an intersection instead. All the other
combinations (object ordering and difference/intersection) seem to work
fine.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Mike
Subject: Re: Solid mesh problem?
Date: 9 Aug 2002 09:25:04
Message: <web.3d53c20e34787bb623878ff90@news.povray.org>
You're right. I noticed this last night and was going to update my findings
this morning, but I see you beat me to it. :)


Post a reply to this message

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