POV-Ray : Newsgroups : povray.binaries.images : Shortest code ever for mandel landscape made of spheres : Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB) Server Time
19 Aug 2024 04:24:43 EDT (-0400)
  Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)  
From: Tor Olav Kristensen
Date: 20 Jan 2001 08:03:53
Message: <3A698C6A.25CA6C7@online.no>
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] hotmailcom
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


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.