POV-Ray : Newsgroups : povray.newusers : CSG Problem... please help : CSG Problem... please help Server Time
31 Jul 2024 00:28:44 EDT (-0400)
  CSG Problem... please help  
From: Bob
Date: 22 Apr 2003 15:40:28
Message: <3ea59aac$1@news.povray.org>
Hi all!

I'm trying to create a medal that might appear on a uniform.  The medal has
a thickness to it and needs to have beveled edges.  To medal I used a box.
Then I created a prism out of a right isoceles triangle, and used the prism
with a difference function to create the beveled edges on three sides of the
box.

The problem is that where the difference is, there are lots of black spots;
not only on the surface of the medal, but also in the space of the
difference itself.

If anyone has any recommendations on how to lose the black spots, or perhaps
a different method of creating beveled edges, I would appreciate it.

Here's the source code...

#include "colors.inc"
#include "textures.inc"


  camera {        // top-down view
    location <7, 11, -25>
    look_at  <7,11,  0>
  }

/*            // profile view from bottom of logo, looking up
  camera {
    location <7, -10, 0>
    look_at  <7,11,  0>
  }
*/


  background { color White }

#declare BeveledEdge =
 prism {
    linear_sweep
    linear_spline
    0, // sweep the following shape from here ...
    22, // ... up through here
    4, // points making up the shape
    <-1,-1>, <-1,.75>, <.75,-1>, <-1,-1> // triangle  }
  #declare BeveledBox =
   difference {
   box {
     <0,7,.75>,
    <14, 21, 0>
   }
   object {
    BeveledEdge
    translate <1,0,0>
   }
   object {
    BeveledEdge
    rotate y * -90
    translate <13,0,0>
   }
   object {
    BeveledEdge
    rotate <0, 270, 90>
    translate <17, 20, 0>
   }
  }
 #declare BeveledCircle = intersection {
  cylinder {
   <7, 7, .75>,
   <7, 7, 0>
   7
  }
  cone {
   <7,7,-6.25>, 0
   <7,7,.75>, 7
  }
 }

 #declare Medal = merge {
  object {BeveledBox}
  object {BeveledCircle}
  texture {Silver_Texture}
 }

 object {Medal}

  light_source { <14, 21, -17> color White}
  light_source { <7,11,15> color White}
  light_source { <-5, -5, 5> color White }


Post a reply to this message

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