POV-Ray : Newsgroups : povray.general : QUESTION: union and difference not working properly? : QUESTION: union and difference not working properly? Server Time
29 Jul 2024 00:31:53 EDT (-0400)
  QUESTION: union and difference not working properly?  
From: Sven Littkowski
Date: 13 Sep 2013 04:26:13
Message: <5232cc25$1@news.povray.org>
Hi,

here's something strange: I have the following source code of a union
and a difference. But when using them, the 2nd element of each is being
ignored. What do I do wrong?

//--- UNION ----------------------------

#declare Country = plane
{
 y, 0.0
 pigment { color White }
}

#declare Plan = box
{
 < -5.0, 0.0, -1.0 > < 20.0, 0.0001, 15.0 >
 pigment
 {
  checker
  color White
  color OrangeRed+Red
 }
}

#declare Land = union
{
 object { Country }
 object { Plan }
}

------

But when using them without "union", they show up...

object { Country }
object { Plan }


//--- DIFFERENCE ----------------------------

#declare Cylinder_OverAll = cylinder
{
 < 7.5, -1.0, 0.0 > < 7.5, -1.0, 10.0 > 7.5
 scale < 1.0, 0.5, 1.0 >
 }

#declare Cylinder_DivisionInside = cylinder
{
 < 7.5, -1.0, 0.0 > < 7.5, -1.0, 10.0 > 7.25
 scale < 1.0, 0.5, 1.01 >
}

#declare Roof = difference
{
 object { Cylinder_OverAll }
 object { Cylinder_DivisionInside scale < 1.0, 1.0, 2.0 > }
 pigment { color White }
 finish { Dull }
}


Post a reply to this message

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