POV-Ray : Newsgroups : povray.general : sig needs shortening Server Time
27 Dec 2024 21:58:57 EST (-0500)
  sig needs shortening (Message 1 to 8 of 8)  
From: Tom Melly
Subject: sig needs shortening
Date: 14 Feb 2003 07:03:58
Message: <3e4cdb2e$1@news.povray.org>
Variation on my usual sig.

Can anyone shorten it? (btw this is what I was mucking around with rand for the
other day).

#macro A(B,C)#while(B-256)#if(V-128/B>=0)#declare V=V-128/B;sphere{0
.5translate<C-4R,9>pigment{rgb<1-C/8R/2C/8>}}#end#local B=B*2;#local
C=C+1;#end#end#local Z=seed(20267520);#local R=2;#while(R+1)#local
V=int(rand(Z)*300);A(1,0)#local R=R-1;#end light_source{-5 1}//TMelly


--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

From: ABX
Subject: Re: sig needs shortening
Date: 14 Feb 2003 07:18:37
Message: <qinp4v4b7vq353fs9i1lp5mv53cp7haf78@4ax.com>
On Fri, 14 Feb 2003 12:03:58 -0000, "Tom Melly" <tom### [at] tomandlucouk> wrote:
> Can anyone shorten it?

#macro A(C,V,B)#if(B-256)#if(V-128/B>=0)#declare V=V-128/B;sphere{<C-4R
9>.5pigment{rgb<1-C/8R/2C/8>}}#end A(C+1,V,B*2)#end#end light_source{-5
1}#local R=2;#local Z=seed(20267520);#while(R+1)A(0int(rand(Z)*//TMelly
300)1)#local R=R-1;#end

ABX


Post a reply to this message

From: Warp
Subject: Re: sig needs shortening
Date: 14 Feb 2003 07:54:09
Message: <3e4ce6f1@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> #macro A(B,C)#while(B-256)#if(V-128/B>=0)#declare V=V-128/B;sphere{0
> .5translate<C-4R,9>pigment{rgb<1-C/8R/2C/8>}}#end#local B=B*2;#local
> C=C+1;#end#end#local Z=seed(20267520);#local R=2;#while(R+1)#local
> V=int(rand(Z)*300);A(1,0)#local R=R-1;#end light_source{-5 1}//TMelly

  This is not only shorter, but I would say that a lot more obfuscated
as well:

#macro A(B,C,V,R,Z)#if(B-256)#if(V-128/B>=0)#local V=V-128/B;sphere{0
.5translate<C-4R,9>pigment{rgb<1-C/8R/2C/8>}}#end A(B*2C+1V,R,Z)#else
#if(R)A(1,0int(rand(Z)*300)R-1Z)#end#end#end A(256,0,0,3seed(20267520
))light_source{-5 1}//TMelly


-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: sig needs shortening
Date: 14 Feb 2003 08:34:22
Message: <3e4cf05e@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3e4ce6f1@news.povray.org...
>
>   This is not only shorter, but I would say that a lot more obfuscated
> as well:
>
> #macro A(B,C,V,R,Z)#if(B-256)#if(V-128/B>=0)#local V=V-128/B;sphere{0
> .5translate<C-4R,9>pigment{rgb<1-C/8R/2C/8>}}#end A(B*2C+1V,R,Z)#else
> #if(R)A(1,0int(rand(Z)*300)R-1Z)#end#end#end A(256,0,0,3seed(20267520
> ))light_source{-5 1}//TMelly

Heh - I'd got halfway to this, but kept hitting brickwalls that you've
succesfully navigated.

Many thanks to all.


Post a reply to this message

From: Mark Weyer
Subject: Re: sig needs shortening
Date: 14 Feb 2003 09:38:24
Message: <3E4D0244.9030406@informatik.uni-freiburg.de>
This is how short I can get it.
It looks different but maybe you won't care.
Maybe you can find shorter numbers than 20267520 and 300 (here: 600)

#local R=1;light_source{-5R}#macro A(B,V)#while(B-1)#if(V>=B)#local
V=V-B;sphere{<3-ln(B)R+R 6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end#local
B=B/2;#end#end#local Z=seed(20267520);#while(R>0)A(256rand(Z)*600)#local
R=R-.4;#end//TMelly

-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{color.6}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Warp
Subject: Re: sig needs shortening
Date: 14 Feb 2003 12:07:32
Message: <3e4d2254@news.povray.org>
Mark Weyer <wey### [at] informatikuni-freiburgde> wrote:
> #local R=1;light_source{-5R}#macro A(B,V)#while(B-1)#if(V>=B)#local
> V=V-B;sphere{<3-ln(B)R+R 6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end#local
> B=B/2;#end#end#local Z=seed(20267520);#while(R>0)A(256rand(Z)*600)#local
> R=R-.4;#end//TMelly

  The same principles which I used in the previous one can be applied
to this one as well and save some characters:

light_source{-5,1}#macro A(B,V,R,Z)#if(B-1)#if(V>=B)#local V=V-B;sphere
{<3-ln(B)R+R 6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end A(B/2V,R,Z)#else
#if(R>.2)A(256rand(Z)*600R-.4Z)#end#end#end A(1,0,1.4seed(20267520))


-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Mark Weyer
Subject: Re: sig needs shortening
Date: 17 Feb 2003 06:47:10
Message: <3E50CEAB.1020507@informatik.uni-freiburg.de>
>>#local R=1;light_source{-5R}#macro A(B,V)#while(B-1)#if(V>=B)#local
>>V=V-B;sphere{<3-ln(B)R+R 6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end#local
>>B=B/2;#end#end#local Z=seed(20267520);#while(R>0)A(256rand(Z)*600)#local
>>R=R-.4;#end//TMelly
> 
>   The same principles which I used in the previous one can be applied
> to this one as well and save some characters:
> 
> light_source{-5,1}#macro A(B,V,R,Z)#if(B-1)#if(V>=B)#local V=V-B;sphere
> {<3-ln(B)R+R 6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end A(B/2V,R,Z)#else
> #if(R>.2)A(256rand(Z)*600R-.4Z)#end#end#end A(1,0,1.4seed(20267520))

And then, allowing some more lossyness in compression:

light_source{-5,1}#macro A(B,V,R,Z)#if(B-1)#if(V>=B)sphere{<3-ln(B)R#local
V=V-B;6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end A(B/2V,R,Z)#else#if(R>0)A
(256rand(Z)*600R-.8Z)#end#end#end A(1,0,2seed(20267520))//TMelly

I am unsatisfied however: The break of line 2 is at a place where no
whitespace would have been needed. Hence one wasted character. Here is
a variant with one character less and one line more:

light_source{-5,1}#macro A(B,V,R,Z)#if(B-1)#if(V>=B)sphere{<3-ln(B)R#local
V=V-B;6>.4pigment{rgb<0R 1>+(x-z)*ln(B)/5}}#end
A(B/2V,R,Z)#else#if(R>0)A(256rand(Z)*600R-.8Z)#end#end#end
A(1,0,2seed(20267520))//TMelly



-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{color.6}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Tom Melly
Subject: Re: sig needs shortening
Date: 17 Feb 2003 07:16:42
Message: <3e50d2aa$1@news.povray.org>
"Mark Weyer" <wey### [at] informatikuni-freiburgde> wrote in message
news:3E5### [at] informatikuni-freiburgde...
> I am unsatisfied however: The break of line 2 is at a place where no
> whitespace would have been needed. Hence one wasted character. Here is

heh - the aesthetics of sigs.


Post a reply to this message

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