|
![](/i/fill.gif) |
Here is my simplest attempt to achive proximity pattern with 3.5. If there is
anybody interested with more functionality of proximity pattern available in
megapov then tell me. I can extend this macro.
How to use it:
Call macro where pattern should be called.
Below script contains both: macro and sample.
Description of parameters:
Object - base object
Range - vector with dimensions of smooth area
Count - number of samples
#version 3.5;
#include "functions.inc"
#macro Proximity_Pattern(Object,Range,Count)
// by ABX
#local P=function{pattern{object{Object}}};
#local Range=Range+0*x;
#local X=Range.x;
#local Y=Range.y;
#local Z=Range.z;
#local C=max(int(Count)1);
function{
(1/C)*(
#while(C)
P(
x+X*(2*f_noise_generator(x+C,y,z,2)-1),
y+Y*(2*f_noise_generator(x,y+C,z,2)-1),
z+Z*(2*f_noise_generator(x,y,z+C,2)-1)
)
#local C=C-1;
#if(C)+#end
#end
)
}
#end
plane{
-z 0
translate z*3
pigment{Proximity_Pattern(text{ttf"povlogo""P"9 0},.1,100)}
}
light_source{100*(y-z)1}
ABX
Post a reply to this message
|
![](/i/fill.gif) |