POV-Ray : Newsgroups : povray.newusers : Highlighting the edges and joins of a CSG. : Re: Highlighting the edges and joins of a CSG. Server Time
2 Nov 2024 15:25:42 EDT (-0400)
  Re: Highlighting the edges and joins of a CSG.  
From: Bernard Hatt
Date: 6 Dec 2003 12:03:36
Message: <3FD20DA6.5C0A0A54@arkady.demon.co.uk>
Carl Hoff wrote:
> 
> All...
> 
>    Please check out the TRON Tank I posted over in the images area.  I have
> a question maybe someone here could help me with.  I'd like to add the red
> lines to the turret as seen in the movie.  My first thought was to add red
> cylinders to all the strait edges, spheres on the corners, and add red torus
> to the edges of the cones in the CSG.  However not only is that alot of work
> it also isn't good enough to handle cases like where I have a cone that
> intersects an ellipsoid off center.  How would I draw the line over that
> join?  Is there a way I could do this with textures or something?  Here is a
> screen capture from the movie if it will help give any of you an idea:
> 
> http://homepage.mac.com/lwernham/.Pictures/Tron/Tank15.png
> 
> Thanks,
> Carl

A way to draw a line around the join of two objects would be to use a
CSG of scaled copies of the intersecting items as an pigment/object
pattern.

eg:
            
#declare object_a = box{-1,1}
#declare vec_a=<-0.5,0,0>;

#declare object_b = sphere{0,1}
#declare vec_b=<0.5,0.5,-0.5>;

union
{
    object{object_a translate vec_a}
    object{object_b translate vec_b}
    pigment
    {
        object
        {
            intersection
            {
                object{object_a scale 1.01 translate vec_a}
                object{object_b scale 1.01 translate vec_b}
            }
            pigment {rgb 0.5}
            pigment {rgb <1,0,0>}
        }
    }
}


If there were three intersecting objects then it gets more
complex. I'm not an expert, so there may be a better way ...

Regards,

Bernard


Post a reply to this message

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