|
![](/i/fill.gif) |
Warp wrote:
>
> For very long time I thought that this was the shortest way of getting
> a decent-looking mandelbrot landscape made of spheres with MegaPov:
>
> camera{location 2look_at 0}light_source{9,1}$R=-2;#while(R<1)$I=-2;#while
> (I<2)$A=R;$B=I;$N=0;#while($T=B*B;N<9&A*A+T<4)$B=2*A*B+I;$A=A*A-T+R;$N=
> N+1;#end sphere{<R,N/9,I>.02pigment{bozo}}$I=I+.03;#end$R=R+.03;#end
>
> However, I just realized that I have been wrong all the time. There's a
> much shorter way of doing the same:
>
> camera{location 2look_at 0}light_source{9,1}$R=-2;#while
> (R<1)$I=-2;#while(I<2)sphere{<R,eval_pattern(mandel 9,
> <R,I>),I>.02pigment{bozo}}$I=I+.03;#end$R=R+.03;#end
It can be done with 2 characters less.
(The image below is done that way.)
So Warp, can you spot how to shorten your code ?
And your "spaghetti"-code can be shorten too.
I think the same can be done with (at least)
11 characters less.
:)
Btw.:
What's wrong with your keyboard ?
--
Best regards,
Tor Olav
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
Attachments:
Download 'mandel.jpg' (25 KB)
Preview of image 'mandel.jpg'
![mandel.jpg](/povray.binaries.images/attachment/%3C3A698C6A.25CA6C7%40online.no%3E/mandel.jpg?preview=1)
|
![](/i/fill.gif) |