|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
//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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|