POV-Ray : Newsgroups : povray.newusers : shapes and colors : Re: shapes and colors Server Time
28 Jul 2024 18:15:15 EDT (-0400)
  Re: shapes and colors  
From: Tim Attwood
Date: 30 Nov 2007 03:42:46
Message: <474fcd06$1@news.povray.org>
> Is there a way to fill a shape with one color and give the shape's outer 
> line a
> different color?
>
> ex: I need to have a blue color box with its lines(which show the edges of 
> the
> shape surfaces) in red color.

You can get by with using the object pattern to color the
edges differently.
Or you can do this with find-edges as a post-process with
a paint program for more complicated scenes.

#include "shapes.inc"

#macro outlined_box(a b os c1 c2)
   box{a,b pigment{object{Wire_Box_Union(a-os,b+os,os) c1 c2}}}
#end

union {
   outlined_box(<-0.5,-0.5,-0.5>,<0.5,0.5,0.5>,0.1,Red,Green)
   rotate 45*y
   rotate 45*x
}


Post a reply to this message

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