POV-Ray : Newsgroups : povray.binaries.images : tiling pattern challenge : Re: tiling pattern challenge Server Time
30 Jul 2024 18:24:35 EDT (-0400)
  Re: tiling pattern challenge  
From: Le Forgeron
Date: 4 Mar 2011 12:46:51
Message: <4d71258b$1@news.povray.org>
Le 04/03/2011 17:54, Robert McGregor nous fit lire :
> Jim Holsenback <jho### [at] povrayorg> wrote:
>> OK ... I've finally got some sunshine so I'm going to go soak up some
>> rays, but as Stephen pointed out the tiling doc section could use some help.
>>
>> Here's the deal I'll work on the narrative but I'd like some one to come
>> up with a scene file that would make experimentation a bit more user
>> friendly.

Does it have to be short or not ?
Attached is source from the current doc illustration.
Feel free about it.

>>
>> From the current doc passage I came up with this crude example (applied
>> to a ground plane) using obvious colors to better illustrate what's
>> going on.

I'm afraid to be no better.

>>
>> #declare TilingPattern = 22;
>> #declare TileTypes = 3;

#declare Co1 = rgb <0.25,0.75,0.25> ;
#declare Co2 = rgb <0.75,0.75,0.25> ;
#declare Co3 = rgb <0.25,0.75,0.75> ;
#declare Co4 = rgb <0.25,0.25,0.75> ;
#declare Co5 = rgb <0.75,0.25,0.25> ;
#declare Co6 = rgb <0.75,0.25,0.75> ;

#declare ii=TilingPattern; // colour rotation
#declare num=TileTypes;


#declare Co=array[6]{Co1,Co2,Co3,Co4,Co5,Co6};


pigment_map {
#local i=0;
#while(i<num)
  [i/num Co[mod(i+ii,6)]]
  [(2*i+1)/(2*num)-0.1/num Co[mod(i+ii,6)]]
  [(2*i+1)/(2*num)-0.1/num rgb<1,1,1>-Co[mod(i+ii,6)]]
  [(2*i+1)/(2*num)+0.1/num rgb<1,1,1>-Co[mod(i+ii,6)]]
  [(2*i+1)/(2*num)+0.1/num Co[mod(i+ii,6)]]
	[(i+1)/num-0.1/num Co[mod(i+ii,6)]/2]
	[(i+1)/num-0.1/num Black]
	[(i+1)/num Black]
#local i=i+1;
#end
}


Post a reply to this message


Attachments:
Download 'tiling.pov.txt' (3 KB)

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