POV-Ray : Newsgroups : povray.newusers : don't understand difference {}, help? : don't understand difference {}, help? Server Time
29 Jul 2024 22:30:43 EDT (-0400)
  don't understand difference {}, help?  
From: inhahe
Date: 10 Feb 2005 17:38:45
Message: <420be275@news.povray.org>
I thought I understood difference, by reading the docs, but I can't get it
to work right.

here's my code.
ignore the cylinder for now


cylinder
 {
 <-2, 2, -2>
 <2, -2, 2>
 .5
 pigment {color rgb 1}
 }
light_source
  {
  <0, 0, -30>
  color rgb 1
  parallel
  point_at 0
  }
camera

  {
  //location <0,0,-10>

  location <0,0,-30>


  look_at 0
  }
intersection
  {
  box
    {
    <-2, -2, -29>
    <2, 2, -29>


    pigment {color rgb <1,0,0>}

    }

  #declare Count=-2;
  #while (Count<=2)
    box
      {
      <Count, -2, -29>
      <Count+.01, 2, -29>
      pigment {color rgb <1,1,0>}
      inverse
      }
  #declare Count = Count + .1;
  #end



  }


What I want is a plane (a square actually) with stripes of *nothing* (of
width .01) going through it.  What I get is stripes of yellow (the color of
the objects i'm trying to subtract from the square).

I said difference, but i'm using intersection. that's because when
difference didn't work as i expected i switched to intersection using the
'inverse' keyword, which the docs said is equivalent -- and i get the same
result as when i used difference.


Post a reply to this message

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