|
|
"[GDS|Entropy]" <nomail@nomail> wrote:
> Here is the code which uses the single iso but gives many rocks, what I am
> trying to do is combine the Isosurface function from my bit that I adapted from
> Tek with the single iso method below so I can use a single iso and get many
> rocks but using my algorithm.
I think I understand.
Follow that code like this -
the moduli (AFAIK) produce intermittent values, for lack of a better way to
describe it - just the remainders. Bread crumbs on the number line.
> // 2D cells: returns a random value for each unit square
for every square generate a random number,
> // Noisy modulus. Makes a random centre for each stone
.... and then a random location,
> // Randomized radius for tumbled stone shape
... with a random size
> //Displaced, vertically squashed spheres
and then make spheres.
> function
> {
> f_Stone(x, y, z) - Radius * f_Rad(x, y, z)
> }
so you take that first function, and subtract a varying value of f_rad from it
to get the overall value where the isosurface function equals zero.
To give a sort of 2D analogy, imagine making a heightfield and intersecting it's
isolated peaks with a plane at y=0. You'd get irregular shaped 'disks'
scattered throughout the plane.
This just does sort of the same thing but it's in 3D, where the function of x,
y, and z equals zero, and the irregular shapes are in space, not a plane.
I will have to think a bit about how to take your pigment pattern method and
make it work as a single isosurface.
I think you will have to add or subtract something like leopard or spotted, or
just part of that original code function to get _your_ shape scattered
throughout a single isosurface like the example code.
Does that make sense?
Post a reply to this message
|
|