POV-Ray : Newsgroups : povray.newusers : Pigments in CGS Difference Server Time
5 Sep 2024 14:19:53 EDT (-0400)
  Pigments in CGS Difference (Message 1 to 4 of 4)  
From: Graham
Subject: Pigments in CGS Difference
Date: 2 Nov 2000 11:16:44
Message: <3A01936B.7C312134@mrc-lmb.cam.ac.uk>
Hi,

Taking the simple example from the pov-ray docs :


difference {
intersection{
sphere { <0, 0,0>, 1
translate -0.5*x
}
sphere { <0, 0,0>, 1
translate 0.5*x
}
pigment { Red }
rotate 90*y
}
cylinder { <0, 0, -1> <0, 0, 1>, 0.35
pigment { Blue }
}
}

The docs say "if we eliminate this pigment (the blue) the surface of the
hole will be red".

Any way I do it the hole surface becomes black.

Anybody like to tell me what I'm doing wrong?

I know I could make the cylinder red but I am trying to apply this to a
more complex shape.

TIA,
Graham.


Post a reply to this message

From: Ron Parker
Subject: Re: Pigments in CGS Difference
Date: 2 Nov 2000 11:28:42
Message: <slrn9035hs.gh.ron.parker@fwi.com>
On Thu, 02 Nov 2000 16:15:49 +0000, Graham wrote:
>The docs say "if we eliminate this pigment (the blue) the surface of the
>hole will be red".

If the docs say that, they are wrong.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Steve
Subject: Re: Pigments in CGS Difference
Date: 2 Nov 2000 14:16:39
Message: <slrn903fb1.li4.steve@zero-pps.localdomain>
On Thu, 02 Nov 2000 16:15:49 +0000, Graham wrote:
>Hi,
>
>Taking the simple example from the pov-ray docs :

It'd be nice if all the examples in the docuenation were numbered
then we'd know exactly what you were refering to.  

Let's make it a bit more readable:

difference{
           intersection{
                        sphere{<0, 0,0>, 1
                               translate -0.5*x
                              }

                        sphere{<0, 0,0>, 1
                               translate 0.5*x
                              }

                      //  pigment { Red }  comented out. 
                        rotate 90*y

                       } // End of intersection.
 
           cylinder {<0, 0, -1> <0, 0, 1>, 0.35
                    // pigment { Blue } Here only colours the cylinder.
                    }

           pigment {Blue} // colours the difference. 

          } // End of difference 

This does work, I've just tried it, read the comments I've put in the
code.  

Best viewed with fixed width font.  


-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  6:53pm  up 22 days, 21:14,  3 users,  load average: 1.08, 1.06, 1.02


Post a reply to this message

From: David Fontaine
Subject: Re: Pigments in CGS Difference
Date: 2 Nov 2000 18:35:52
Message: <3A01FA15.316171F5@faricy.net>
Graham wrote:

> The docs say "if we eliminate this pigment (the blue) the surface of the
> hole will be red".

Umm... then they are wrong. Perhaps you have some statements in the wrong
place?

Objects in POV are only the surface. So say for example a blue sphere, with
a part cut out, has no blue underneath. If the object you cut it with is
red, the cut-out part will be red because it is on the surface of the
cutting object. If you want the whole thing to be blue you would give a blue
pigment to the difference itself.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

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