User:Le Forgeron/vault/RefImgTiling

From POV-Wiki
< User:Le Forgeron‎ | vault
Revision as of 19:42, 8 December 2011 by Le Forgeron (talk | contribs) (Created page with "File:RefImgTiling.gif <source lang="pov"> #include "colors.inc" #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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

RefImgTiling.gif

#include "colors.inc"
#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> ; 
camera { 
	orthographic
	location <0,-8,0>
direction y
up 3*z
right 8*x
//orthographic
}
global_settings { max_trace_level 30 ambient_light 1 }
#macro kk(ii)
#declare demo=texture { pigment { 
	tiling int(ii)+1
#switch (int(ii))
#case(0)
#declare num=1;
#declare sc=1;
#break
#case(1)
#declare num=1;
#declare sc=1/2;
#break
#case(2)
#declare num=2;
#declare sc=1.5;
#break
#case(3)
#declare num=1;
#declare sc=1;
#break
#case(4)
#declare num=3;
#declare sc=1;
#break
#case(5)
#declare num=2;
#declare sc=1/2;
#break
#case(6)
#declare num=2;
#declare sc=1/2;
#break
#case(7)
#declare num=3;
#declare sc=2/3;
#break
#case(8)
#declare num=3;
#declare sc=2/3;
#break
#case(9)
#declare num=1;
#declare sc=1;
#break
#case(10)
#declare num=3;
#declare sc=1/2;
#break
#case(11)
#declare num=3;
#declare sc=1/2;
#break
#case(12)
#declare num=3;
#declare sc=1/2;
#break
#case(13)
#declare num=5;
#declare sc=2/3;
#break
#case(14)
#declare num=2;
#declare sc=2/3;
#break
#case(15)
#declare num=3;
#declare sc=1;
#break
#case(16)
#declare num=6;
#declare sc=1;
#break
#case(17)
#declare num=2;
#declare sc=1;
#break
#case(18)
#declare num=3;
#declare sc=1;
#break
#case(19)
#declare num=3;
#declare sc=1;
#break
#case(20)
#declare num=6;
#declare sc=1;
#break
#case(21)
#declare num=3;
#declare sc=1;
#break;
#case(22)
#declare num=3;
#declare sc=1;
#break;
#case(23)
#declare num=5;
#declare sc=1;
#break;
#end

#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
}
// scale sc 
}
finish { ambient 1.0 }
}
#end

#local i =0;
#while(i<8)
#local j=0;
#while(j<3)
kk(i*3+j)
	union {
box { <-0.485,0,-0.485>,<0.485,0,0.485>
 texture { demo scale 1/(max(5,min(7,num*2))) }
}
union{
 text { ttf "arialbd.ttf",concat(str((i*3+j+1),2,0),":",str(num,0,0)," til.") 0.1,0
	 texture { pigment { Black } }
	 rotate 90*x
}
 box { <-0.1,0,-0.2>,<3.5,0,1.0>
	 texture { pigment { White } finish { ambient 1.0} }
 }
	 scale 1/8
	 no_shadow 
	 translate -0.5*y-0.4*x-0.45*z
 }

 translate ((2-j)-1)*z+(i-3.5)*x
}
#local j=j+1;
#end
#local i=i+1;
#end