|
![](/i/fill.gif) |
See povray.binaries.images to see a demo image.
This macro lets you #declare your own pigment to be tiled along on the x
and z axes. The pigment is reflected on 4 axes for each tile, creating a
kaleidoscopic effect. The macro may be placed wherever you use pigments
and normals. It should work for media as well.
Here's how you declare your own pigments. Place this before you use the
macro:
#declare K_Tex =
function{
pigment{
pigment stuff here
}
}
Here's a generic object statement. 'Grout' is how big the lines in
between the tiles are. 0 is none, and 1 is a lot. The lines will affect
the declared pigment:
povray_object{
pigment{
Kaleido_Tiles ( Grout )
color_map{ items } //color_map is encouraged
}
}
//*******MACRO*******
#macro Kaleido_Tiles( K_Grout )
#local K_Line_X=
function{
pigment{function x phase .5 triangle_wave
color_map{[1-(K_Grout*2) rgb 0][1 rgb 1]}
}
}
#local K_Line_Z=
function{
pigment{function z phase .5 triangle_wave
color_map{[1-(K_Grout*2) rgb 0][1 rgb 1]}
}
}
#local K_Lines=
function{
pigment{
function (K_Line_X(x,0,z))&(K_Line_Z(x,0,z))
}
}
function{
pigment{
function
(
K_Tex(abs(cos(x*pi))|abs(cos(z*pi)),y,abs(cos(x*pi))&abs(cos(z*pi))) )&(
K_Lines )
}
}
#end
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
![](/i/fill.gif) |