POV-Ray : Newsgroups : povray.binaries.images : Shortest code ever for mandel landscape made of spheres Server Time
19 Aug 2024 08:25:13 EDT (-0400)
  Shortest code ever for mandel landscape made of spheres (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: Shortest code ever for mandel landscape made of spheres
Date: 23 Jan 2001 09:07:00
Message: <3a6d9001@news.povray.org>
If we consider "decent-looking" a landscape viewed right from above, then
the code can be shortened even more:

light_source{y,1}$R=-2;#while(R<2)$I=-2;#while
(I<2)sphere{<R,I,4-eval_pattern(mandel 9,<R,I>
)>.01pigment{rgb y}}$I=I+.02;#end$R=R+.02;#end


Post a reply to this message


Attachments:
Download 'Mand_big.jpg' (87 KB) Download 'Mand.png' (30 KB) Download 'Mand_aa1.png' (40 KB) Download 'Mand_aa2.png' (33 KB)

Preview of image 'Mand_big.jpg'
Mand_big.jpg

Preview of image 'Mand.png'
Mand.png

Preview of image 'Mand_aa1.png'
Mand_aa1.png

Preview of image 'Mand_aa2.png'
Mand_aa2.png


 

From: Warp
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 23 Jan 2001 09:19:24
Message: <3a6d92ec@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
: camera{location 2look_at 0}light_source{9,1}height_field 

  The idea is to make the landscape with objects. Using a height_field is
too trivial.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 23 Jan 2001 09:20:01
Message: <3A6D930E.ECD6A348@gmx.de>
ingo wrote:
> 
> If it's reduction in character count what you're looking for:
> 
> camera{location 2look_at 0}light_source{9,1}$R=0;#while
> (R<99)%S=int(R);sphere{<S/99,eval_pattern(mandel 9
> <(R-S-.5)*3,S/40-1>)R-S>.01pigment{bozo}}$R=R+.02;#end
> 

Oops, it seems i have totally missed that...

BTW, now it seems exactly the same length as Tor's version.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: ingo
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 23 Jan 2001 10:01:01
Message: <Xns9032A309EB081seed7@povray.org>
in <3A6D930E.ECD6A348@gmx.de> Christoph Hormann wrote:

>BTW, now it seems exactly the same length as Tor's version.
>

In Tor's version two more commas can be deleted,
sphere{<R,eval_pattern(mandel 9<R,S>)S>.01pigment{bozo}}

in yours one.
sphere{<S/99,eval_pattern(mandel 9<3*(R-S-.5)S/40-1>)R-S>.01pigment{bozo}}


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 23 Jan 2001 20:09:09
Message: <3A6E2AF6.DA5AD7@online.no>
Christoph Hormann wrote:
> 
> Tor Olav Kristensen wrote:
> >
> > Well, here's my solution:
> >
> > camera{location 2look_at 0}light_source{9,1}$R=1;#while
> > (R+2)$S=2;#while(S+2)sphere{<R,eval_pattern(mandel 9,
> > <R,S>),S>.01pigment{bozo}}$S=S-.02;#end$R=R-.02;#end
> >
> 
> Well, that's not the obvious solution for a pascal programmer :-)

Who's that Pascal programmer ?   Is it me or you ?

=)


> > If you're not doing it with spheres, then what are you using ?
> > Code please !
> 
> camera{location 2look_at 0}light_source{9,1}height_field
> {pattern 99,99{mandel 9 color_map{[0 rgb 0][1 rgb 1]}
> scale.3rotate-x*90translate.5}pigment{bozo}}

Using patterns for heightfields is new to me.

MegaPOV feature ?


> > [...]
> >
> > Interesting solution !
> >
> > This reminds me of something Dan Johnson did in
> > his Arrange_3d macro. See his "Polyhedra include file"
> > thread in povray.binaries.scene-files, 11. Jan -01:
> >
> 
> I first tried it with mod(), but it turned out beeing ways longer.  What's
> in fact missing is a frac() function returning the fractional part of a
> variable (although R-int(R) does perfectly suffice apart from length :-).

I wonder why there are such basic functions 
missing from the POV-language.

Even my stone-age-Casio had the frac() function.


-- 
Best regards,

Tor Olav

mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Chris Huff
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 23 Jan 2001 22:45:43
Message: <chrishuff-0ED374.22463923012001@news.povray.org>
In article <3A6### [at] onlineno>, Tor Olav Kristensen 
<tor### [at] onlineno> wrote:

> > camera{location 2look_at 0}light_source{9,1}height_field
> > {pattern 99,99{mandel 9 color_map{[0 rgb 0][1 rgb 1]}
> > scale.3rotate-x*90translate.5}pigment{bozo}}
> 
> Using patterns for heightfields is new to me.
> MegaPOV feature ?

Yes. And I think the keyword really should be "pigment_image", not 
"pattern", since it takes a pigment (well, pattern and color_map) and 
produces an image from it. The two numbers before (?!?) the { bracket 
specify the resolution of the image, pigment stuff goes inside the 
brackets, and I think you can use it pretty much any place that uses an 
image file.


> I wonder why there are such basic functions 
> missing from the POV-language.

They were just overlooked or didn't seem necessary...another missing 
function is "sgn()", which would return -1 or 1 depending on the sign of 
the parameter. (I've patched that one into my own version.) But people 
have gotten along for a long time without them, and now that they can be 
done easily with macros, there isn't a lot of demand for them to be 
added to the program itself.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Christoph Hormann
Subject: Re: Shortest code ever for mandel landscape made of spheres => Not any more (25KB)
Date: 24 Jan 2001 16:54:52
Message: <3A6F4F20.B114F2E3@gmx.de>
Tor Olav Kristensen wrote:
> 
> Who's that Pascal programmer ?   Is it me or you ?
> 
> =)
> 

;-)

> [...]
> 
> Using patterns for heightfields is new to me.
> 
> MegaPOV feature ?
> 

Yes, i'm not using it much, but it can be useful if you don't want to
carry around a large image file for example.  

> 
> I wonder why there are such basic functions
> missing from the POV-language.
> 
> Even my stone-age-Casio had the frac() function.
> 

It's not much problem IMO, because it can quickly be typed with 'R-int(R)'
or done with a macro.  I think it would probably not be much used with
povray anyway, at least less often than the 'sgn()' function Chris
mentioned.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Richard Morton
Subject: Re: Shortest code ever for mandel landscape made of spheres
Date: 14 Feb 2001 07:58:37
Message: <3a8a80fd$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a6d9001@news.povray.org...
>
>   There's a funny thing about this particular scene. When rendered
> at 256x192 without antialiasing it looks like this:
>
>
I really like this version of the image - I think that it would make a good
logo for something (perhaps Morton Peas - yes there is such a product,
although nothing to do with me).


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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