POV-Ray : Newsgroups : povray.newusers : Highlighting the edges and joins of a CSG. Server Time
5 Nov 2024 09:25:32 EST (-0500)
  Highlighting the edges and joins of a CSG. (Message 1 to 4 of 4)  
From: Carl Hoff
Subject: Highlighting the edges and joins of a CSG.
Date: 5 Dec 2003 18:03:24
Message: <3fd10ebc@news.povray.org>
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


Post a reply to this message

From: Bernard Hatt
Subject: Re: Highlighting the edges and joins of a CSG.
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

From: Carl Hoff
Subject: Re: Highlighting the edges and joins of a CSG.
Date: 6 Dec 2003 14:29:54
Message: <3fd22e32@news.povray.org>
Thanks... atleast that gives me a way to do what I want to do.  Still looks
rather labor intensive but atleast its a solution.

Thanks again,
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>}
>         }
>     }
> }


Post a reply to this message

From: Carl Hoff
Subject: Re: Highlighting the edges and joins of a CSG.
Date: 9 Dec 2003 09:13:46
Message: <3fd5d89a@news.povray.org>
> 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

Thanks again Bernard.  Check out the image I just posted over in the images
area.
Its my last post in the "My second subject" thread.  The red you see here is
actually just another CSG on top of the black one.  It could be used as a
pigment/object pattern but I think it looks nice just as it is.  All the
not-so-simple curves are made by taking the intersection of two larger
copies of the two joined shapes.  So in the case of three objects I just
merged the intersection of each pair together to get the object I was after.

Kind regards,
Carl


Post a reply to this message

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