POV-Ray : Newsgroups : povray.general : Checker or me? Server Time
9 Aug 2024 01:20:46 EDT (-0400)
  Checker or me? (Message 1 to 3 of 3)  
From: Dejan Milosavljevic
Subject: Checker or me?
Date: 20 Aug 2000 04:20:47
Message: <399f94df@news.povray.org>
//What's wrong and why?

#include "colors.inc"

//camera { }

#declare TEST_SPHERE   = 0;
#declare TEST_CYLINDER = 1;

//I expect to see only two black and two white square.
//But...

#switch( clock )
 #case ( TEST_SPHERE )
   sphere
  #break
 #case ( TEST_CYLINDER )
   cone
  #break
#end
 {
   #switch( clock )
     #case ( TEST_SPHERE )
      < 0, 0, 0 >, 1
      #break
     #case ( TEST_CYLINDER )
       -x, 1,  x, 1
      #break
    #end

   pigment {  checker color White color Black }
 }

light_source {  <-0.5 0.5, -0.5> color White }


//***************************
//      dmi### [at] xoommailcom
//http://members.xoom.com/dmilos/
//***************************


Post a reply to this message

From: Chris Colefax
Subject: Re: Checker or me?
Date: 20 Aug 2000 06:47:53
Message: <399fb759@news.povray.org>
Dejan Milosavljevic <dmi### [at] xoommailcom> wrote:
> What's wrong and why?
[snipped code]

I would say it's a precision problem - the sphere's surface around <0, 0, 1>
is just on the break between the alternating colours of the checker pattern,
and rounding errors lead to a somewhat unexpected change in texture.
Setting the sphere's radius to just under 1 (eg. 0.9999) solves the problem.


Post a reply to this message

From: Warp
Subject: Re: Checker or me?
Date: 20 Aug 2000 10:53:48
Message: <399ff0fc@news.povray.org>
Dejan Milosavljevic <dmi### [at] xoommailcom> wrote:
:    pigment {  checker color White color Black }

  You have to specify a comma between the colors. I think that the
documentation is quite clear here.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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