![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Sir Charles W. Shults III <aic### [at] cfl rr com> wrote:
> Very nice recursive call! Also, I see that the middle term of each call is
> 1, so that could also be pulled out, true?
Let me assure you that I tried to think every possible trick I know of
in order to get rid of that repeating 1, but I couldn't come up with anything
which would have made the code shorter.
If POV-Ray supported default values for macro parameters then it would
have been possible, but...
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Sir Charles W. Shults III <aic### [at] cfl rr com> wrote:
> Ah ah, very neat means of creating the variable- no #declare or #local- my
> hat is off to you.
It's a "classic" trick. (Not really "classic" in the true sense of the
word because this type of tricks have existed for so short time in this
context, but "classic" in the sense that it's one of the things to look at
to see if a loop could be shortened by replacing it with a recursive macro.)
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Had no idea that was legal code. Had to render it to believe it.
"Warp" <war### [at] tag povray org> wrote in message
news:3c9b5808@news.povray.org...
> Couldn't resist:
>
> sphere_sweep{b_spline 20<-2,-2>.1<-2,-1>.15<-1.5,1>.1,0,.1x*-2,.1,-y.1<
> -2.5,-1>.1<-.5,-1>.1,0,.1<1,-.5>.1,-y.1<-.5,-.5>.1,0,.1x-y.1<1.5,-.25>.1
> x*2,.1<2,-.75>.1x-y.1<1.5,1>.1<1.5,1>.1pigment{rgb 9}translate z*4}//v3.5
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 22 Mar 2002 20:33:08 -0500, Warp <war### [at] tag povray org> wrote:
> #macro B(a,b)sphere{<a,b,13>.5pigment{agate}finish{phong.3}}#end#macro N(c,k,
> a)#if(k<7)#if(mod(c,2))B(k,a)B(-k,-a)#end N(int(c/2)k+1a)#end#end light_source
> {0rgb 1}N(61,1,1)N(37,1,0)N(55,1,-1)N(4,1,-2)N(4,1,-3)N(1,1,3)
light_source{0#macro k(_)sphere{13*z+i*_.5pigment{agate}finish{phong.3}}#end
1}#macro _(s,i,g)#if(s)k(1)k(-1)_(s-1i+g,g)#end#end _(3x+3*y<2,-2>)_(2x,y)_(
2x-y,x)_(4x*3,-y)_(4<3,1>x)_(2x*6,-y)
additional note: I had to put one sphere twice becouse of floatting accuracy
problem in current (14) beta
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wow.
I see some very clever things here, and they are probably the best tutorial
I could get into some of the features and allowances that the POV language has.
The algorithm is very, very clever also. I am still unpuzzling parts of it. I
will be a while thinking of a response to this; I can only hope it is 1% more
clever!
Thank you both for this extremely complex and obfuscated work of art. I'll
keep it.
Cheers!
Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
light_source{0#macro k(_)sphere{13*z+i*_.5pigment{agate}finish{phong.3}}#end
1}#macro _(s,i,g)#if(s)k(1)k(-1)_(s-1i+g,g)#end#end _(3x+3*y<2,-2>)_(2x,y)_(
2x-y,x)_(4x*3,-y)_(4<3,1>x)_(2x*6,-y)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Mon, 25 Mar 2002 12:11:31 -0500, "Sir Charles W. Shults III"
<aic### [at] cfl rr com> wrote:
> I see some very clever things here, and they are probably the best tutorial
> I could get into some of the features and allowances that the POV language has.
> The algorithm is very, very clever also.
I used the same method I have used one thread earlier for blob. Rest of sig
are typical obfuscated pov-sig-tricks. And just a little experience.
> I am still unpuzzling parts of it.
As next excersise try to unpuzzle and understand my sig. It shows my (imo
suggested in general) rules of obfuscated sig:
1. diversity of shape
- one disc in sig, infinity planes on image
- linear spheresweep in sig, curved lines on image
2. diversity of string/data (ABX vs. "-+((1*(,1,/.-,*/(,&.323/'1" )
3. no warning
4. works with default values and dimensions (readable even in 160x120 no AA)
5. no more 4 lines
6. no more 80 (afaik 76/78 are even better) chars per line
Have I forgot something ?
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
news:2kf0au0p9ma7a5jm8l7jol6b96ctrcs2ea@4ax.com...
>
> Have I forgot something ?
>
> ABX
The sig?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Tue, 26 Mar 2002 10:02:56 -0000, "Tom Melly" <tom### [at] tomandlu co uk> wrote:
> > Have I forgot something ?
> >
> > ABX
>
> The sig?
:-)
I forgot to turn it on after beta 14 fix of bug. Fine now ?
ABX
--
disc{z,-z#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;5pigment{#local g=function(_){ceil(_)-_}function#local
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e)<O(),O()//35
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |