|
![](/i/fill.gif) |
Marc wrote:
> 46876f2e@news.povray.org...
>> kurtz le pirate <kur### [at] yahoo fr> wrote:
>>> adding some things like translate rand(alea) in the pigment function
>>> work as i want.
>> Another possibility, which I think few actually know, is to do something
>> like this:
>>
>> #declare IsoFunc =
>> function(x, y, z, a, b, c)
>> { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x+a,y+b,z+c).gray*0.75 };
>>
>> isosurface { function { IsoFunc(x, y, z, 1, 2, 3) } }
>>
>> --
>> - Warp
>
> Yes and you can as well scale the function output by multiplying x,y,and z
> (the bigger the multiplier, the smaller the scale)
>
> Marc
>
>
Now for multiple random copies of the object
#declare nSeed = seed(400);
#macro IsoRand(Range,Scale)
// Range and Scale are 3D vectors
#local rgX = (random(nSeed)-random(nSeed))*Range.x;
#local rgY = (random(nSeed)-random(nSeed))*Range.y;
#local rgZ = (random(nSeed)-random(nSeed))*Range.z;
isosurface {
function {
IsoFunc(x/Scale.x, y/Scale.y, z/Scale.z, rgX, rgY, rgZ)
}
}
#end
I've been doing something like this for a project of my own.
--
--------------
David Wallace
TenArbor Consulting
"Just In Time Cash"
www.tenarbor.com
1-866-572-CASH
Post a reply to this message
|
![](/i/fill.gif) |