|
|
bugman <nomail@nomail> wrote:
> I would really like to see this. As far as I know, it is not possible.
Your example code has no recursion. Obviously it cannot produce the
Mandelbrot set without one. Try this:
//-------------------------------------------------------------------
#declare MaxIter = 32;
#declare MandelIteration = function(Re, Im, Zr, Zi, n)
{ select(n < MaxIter & Zr*Zr + Zi*Zi < 4, 0, n / MaxIter,
MandelIteration(Re, Im,
Zr*Zr - Zi*Zi + Re,
2*Zr*Zi + Im,
n+1)) };
#declare Mandel = function { MandelIteration(x, y, 0, 0, 0) };
camera { location -z*3 look_at 0 }
box
{ <-3, -3, 0>, <3, 3, .1>
pigment
{ function { Mandel(x, y, z) }
color_map
{ [0 rgb 0]
[1 rgb 1]
}
}
finish { ambient 1 }
}
//-------------------------------------------------------------------
--
- Warp
Post a reply to this message
|
|