 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: I was disappointed with six lines
Date: 4 May 2001 03:59:34
Message: <3af26166@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Inspired by old images from p.b.i I discovered five lines long.
--
#macro L(D)light_source{D*5D spotlight point_at-D falloff 25}#end#local C=0;L(
x)L(y)#macro G()#declare C=C+1;val(substr(concat("00000100200301001402002102",
"3030034040122141142143222242322341342343400401402403410414420421423430434440"
),C,1))#end L(z)camera{location 8look_at 0}union{#while(1e2>C)box{#local P=<G(
),G(),G()>*.4-1;P+.4P}#end box{-9 9}texture{pigment{rgb 1}}}// call me ABX :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 4 May 2001 09:59:02 +0200, Wlodzimierz ABX Skiba wrote:
>Inspired by old images from p.b.i I discovered five lines long.
It renders quickly too.
--
Cheers
Steve email mailto:ste### [at] zeropps uklinux net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
11:27am up 92 days, 12:13, 2 users, load average: 1.07, 1.08, 1.07
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Very clever, i love it.
Nekar
--
#version unofficial MegaPov 0.7;#local Q=seed(7);#local S=<-2,2,5>;#local
E=<2
,-2,5>;#local B=S;#while(vlength(B-E)>.1)#local
B=(B+(<rand(Q),rand(Q),rand(Q)
>/20));#local B=B-(2*(B-S))*((vlength(B-E)>vlength(S-E)));#local
S=B;glow{//NX
location S size.1 radius.07}glow{location S size.1 radius.07 rotate
z*90}#end
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 7 May 2001 05:33:38
Message: <3af66bf2@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote in message <3af64708@news.povray.org>...
>
> Very clever, i love it.
Thanks
> Nekar
> --
> #version unofficial MegaPov 0.7;#local Q=seed(7);#local S=<-2,2,5>;#local E=<2
> ,-2,5>;#local B=S;#while(vlength(B-E)>.1)#local B=(B+(<rand(Q),rand(Q),rand(Q)
> >/20));#local B=B-(2*(B-S))*((vlength(B-E)>vlength(S-E)));#local S=B;glow{//NX
> location S size.1 radius.07}glow{location S size.1 radius.07 rotate z*90}#end
can I suggest some optimizations ?
#version unofficial MegaPov.7;#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-
2,5>;#while(vlength(B-E)>.1)#local S=B;#local B=B+<rand(Q),rand(Q),rand(Q)//NX
>/20;#local B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));glow{radius.07location<B.y
,-B.x,B.z>size.1}glow{radius.07size.1location B}#end
and becouse of megapov declaration you can use shortcuts for #local of course
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks!
Nekar
--
#version unofficial MegaPov.7;#local Q=seed(7);#local B=<-2,2,5>;#local
E=<2,-
2,5>;#while(vlength(B-E)>.1)#local S=B;#local
B=B+<rand(Q),rand(Q),rand(Q)//NX
>/20;#local
B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));glow{radius.07location<B.y
,-B.x,B.z>size.1}glow{radius.07size.1location B}#end
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 7 May 2001 10:43:27
Message: <3af6b48f@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote in message <3af66f2a@news.povray.org>...
> Thanks!
Do you want three lines long version ?
#version unofficial MegaPov.7;#macro G(L)glow{radius.07size.1location L}#end%Q
=seed(7);%E=<2,-2,5>;%B=<-2,2,5>;#while((E-B).x>.1)%S=B;%B=B+<rand(Q),rand(Q),
rand(Q)>/20;%B=(vlength(B-E)<vlength(S-E)?B:2*S-B);G(<B.y,-B.x,B.z>)G(B)#end
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> and becouse of megapov declaration you can use shortcuts for #local of
course
What are those?
Nekar
--
#version unofficial MegaPov.7;#local Q=seed(7);#local B=<-2,2,5>;#local
E=<2,-
2,5>;#while(vlength(B-E)>.1)#local S=B;#local B=B+<rand(Q),rand(Q),rand(Q)
>/20;#local
B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));glow{radius.07location<B.y
,-B.x,B.z>size.1}glow{radius.07size.1location B}#end// Nekar Xenos
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks.
I just missed this message when I sent the other one. I assume % is the
shortcut for #local then? Now I have more space to try and make it look like
lightning...
Nekar Xenos
"Wlodzimierz ABX Skiba" <abx### [at] abx art pl> wrote in message
news:3af6b48f@news.povray.org...
> Nekar Xenos wrote in message <3af66f2a@news.povray.org>...
> > Thanks!
>
>
> Do you want three lines long version ?
>
> #version unofficial MegaPov.7;#macro G(L)glow{radius.07size.1location
L}#end%Q
>
=seed(7);%E=<2,-2,5>;%B=<-2,2,5>;#while((E-B).x>.1)%S=B;%B=B+<rand(Q),rand(Q
),
>
rand(Q)>/20;%B=(vlength(B-E)<vlength(S-E)?B:2*S-B);G(<B.y,-B.x,B.z>)G(B)#end
>
> ABX
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nekar Xenos <j-p### [at] citywalk co za> wrote:
: I just missed this message when I sent the other one. I assume % is the
: shortcut for #local then? Now I have more space to try and make it look like
: lightning...
Do you think it's a good idea to make a unofficial-povray signature?
After all, not all povray users even have megapov...
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Do you think it's a good idea to make a unofficial-povray signature?
> After all, not all povray users even have megapov...
Mmm. Sorry, I didn't think of that. I also noticed I pasted it wrong into
the signature box. This one should be fine (I hope).
Thanks
Nekar Xenos
--
#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;#local
C=<2,4,6>*4;blob{
threshold 1#while(vlength(B-E)>.1)#local S=B;#local
B=B+<rand(Q),rand(Q),rand(
Q)>/20;#local B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));sphere{0,1,1
scale.1//NX
translate<B.y,-B.x,B.z>}sphere{0,1,1 scale.1translate B}#end pigment{rgb C}}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>This one should be fine (I hope).
>
> Thanks
>
> Nekar Xenos
>
> --
> #local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;#local
> C=<2,4,6>*4;blob{
> threshold 1#while(vlength(B-E)>.1)#local S=B;#local
> B=B+<rand(Q),rand(Q),rand(
> Q)>/20;#local B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));sphere{0,1,1
> scale.1//NX
> translate<B.y,-B.x,B.z>}sphere{0,1,1 scale.1translate B}#end pigment{rgb
C}}
>
>
It's still not right. Anyone know how to fix this?
--
#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;#local
C=<2,4,6>*4;blob{
threshold 1#while(vlength(B-E)>.1)#local S=B;#local
B=B+<rand(Q),rand(Q),rand(
Q)>/20;#local B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));sphere{0,1,1
scale.1//NX
translate<B.y,-B.x,B.z>}sphere{0,1,1 scale.1translate B}#end pigment{rgb C}}
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 8 May 2001 08:21:40
Message: <3af7e4d4@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote in message <3af7d222@news.povray.org>...
> --
> #local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;#local C=<2,4,6>*4;blob{
> threshold 1#while(vlength(B-E)>.1)#local S=B;#local
>B=B+<rand(Q),rand(Q),rand(
> Q)>/20;#local B=B-2*(B-S)*(vlength(B-E)>vlength(S-E));sphere{0,1,1 scale.1//NX
> translate<B.y,-B.x,B.z>}sphere{0,1,1 scale.1translate B}#end pigment{rgb C}}
#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;blob{threshold 1#while((E
-B).x>.1)#local S=B;#local B=B+<rand(Q),rand(Q),rand(Q)>/20;#local B=(vlength(
B-E)<vlength(S-E)?B:2*S-B);sphere{<B.y,-B.x,B.z>,.1,1}sphere{B,.1,1}#end
pigment{rgb<8,16,24>}}
rgb 9 is also shorter and readable
perhaps your problem with splitted lines depends on default line length in your
Outlook - but it is rather off topic
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>vlength(S-E)?B:2*S-B);
>sphere{<B.y,-B.x,B.z>,.1,1}
I don't understand the use of '?' and 'B.y'
Could you maybe explain it to me?
> perhaps your problem with splitted lines depends on default line length in
your
> Outlook - but it is rather off topic
That's OK, I've sorted it out.
Thanks for all your help :)
Nekar
--
#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;blob{threshold 1#while((E
-B).x>.1)#local S=B;#local B=B+<rand(Q),rand(Q),rand(Q)>/20;#local B=(vlength(
B-E)<vlength(S-E)?B:2*S-B);sphere{<B.y,-B.x,B.z>,.1,1}sphere{B,.1,1}#end
pigment{rgb<8,16,24>}}// nekar Xenos
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 8 May 2001 10:51:00
Message: <3af807d4@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote in message <3af7f31f@news.povray.org>...
> >vlength(S-E)?B:2*S-B);
> >sphere{<B.y,-B.x,B.z>,.1,1}
>
> I don't understand the use of '?' and 'B.y'
in your original sig there was assigment
#local B=B-(2*(B-S))*((vlength(B-E)>vlength(S-E)));
expression vlength(B-E)>vlength(S-E) is logical
and can return 1 (true) or 0 (false)
therefore you can change it to:
#if(vlength(B-E)>vlength(S-E))
#local B=B-2*(B-S)*1;
#else
#local B=B-2*(B-S)*0;
#end
and it is eqivalent of:
#if(vlength(B-E)>vlength(S-E))
#local B=B-2*(B-S);
#else
#local B=B;
#end
now, you must know that construction
A?B:C is eqivalent to #if(A) B #else C #end
such equivalent is very popular in programing
(not only POV script language)
(it is described in POV manual under "Float Expressions")
therefore you can write just
#local B=(vlength(B-E)<vlength(S-E)?B:2*S-B);
I have also changed condition for while
from #while(vlength(B-E)>.1) to #while((E-B).x>.1)
Considering that you are going from B to E
you can take length between B and E
but you can also take segment BE
and take one of coordinates
> Could you maybe explain it to me?
Do you need something more ?
> Thanks for all your help :)
Thanks for fun :)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 8 May 2001 16:50:05 +0200, Wlodzimierz ABX Skiba wrote:
>I have also changed condition for while
>from #while(vlength(B-E)>.1) to #while((E-B).x>.1)
>
>Considering that you are going from B to E
>you can take length between B and E
>but you can also take segment BE
>and take one of coordinates
Those two things aren't entirely equivalent, unless you can guarantee that
E and B have the same y and z coordinates. The substitution might be good
enough for this purpose, but it won't work in general.
--
#local R=<7084844682857967,32787982,826975826580>#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks
> Do you need something more ?
I'd like to add a cyan 'N' before the 'X' and keep it at four lines, but I
think that's pushing it a little... ;)
Nekar X
--
#local Q=seed(7);#local B=<-2,2,5>;#local E=<2,-2,5>;blob{threshold 1#while((E
-B).x>.1)#local S=B;#local B=B+<rand(Q),rand(Q),rand(Q)>/20;#local B=(vlength(
B-E)<vlength(S-E)?B:2*S-B);sphere{<B.y,-B.x,B.z>,.1,1}sphere{B,.1,1}#end
pigment{rgb<8,16,24>}}// nekar Xenos
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 8 May 2001 11:11:00
Message: <3af80c84@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Ron Parker wrote in message ...
> Those two things aren't entirely equivalent, unless you can guarantee that
> E and B have the same y and z coordinates. The substitution might be good
> enough for this purpose, but it won't work in general.
of course, this shortcuts was connected with sense algorithm
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: I was disappointed with six lines
Date: 8 May 2001 11:16:15
Message: <3af80dbf@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nekar Xenos wrote in message <3af80a77@news.povray.org>...
> Thanks
>
> > Do you need something more ?
>
> I'd like to add a cyan 'N' before the 'X' and keep it at four lines, but I
> think that's pushing it a little... ;)
perhaps you can achive N with part of X, something like:
/\/ /
/ /\/
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Cool! Why didn't I think of that... :)
Nekar
--
#local N=<-4,8,20>;#local K=<4,-8,20>;#local R=seed(0);union{#while((K-N).x>0)
#local X=N;#local N=N+<rand(R),rand(R),1>/30;#local N=(vlength(N-K)<vlength(X-K
)?N:2*X-N);sphere{<N.y,-N.x,N.z>,.2}sphere{N,.2}sphere{<-N.x-8,N.y,N.z>,.1//-NX
pigment{rgb N}}sphere{<N.x+8,-N.y,N.z>,.1 pigment{rgb N}}#end pigment{rgb 9}}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |