POV-Ray : Newsgroups : povray.general : yet another sig... Server Time
18 Nov 2024 17:16:53 EST (-0500)
  yet another sig... (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Tom Melly
Subject: yet another sig...
Date: 20 Jul 2002 03:13:37
Message: <3d390da1@news.povray.org>
light_source{0rgb 1translate-9}#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0
)#local V=V-128/B;box{0,1pigment{rgb 1}translate<C-4,R,9>}#end#local B=B*2;
#local C=C+1;#end#end A(234,1,0,1)A(85,1,0,0)A(81,1,0,-1)//TomMelly


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: yet another sig...
Date: 20 Jul 2002 07:58:40
Message: <Xns92518D9BAC0A0raf256com@204.213.191.226>
"Tom Melly" <tom### [at] tomandlucouk> wrote in news:3d390da1@news.povray.org

nice :)

but... why not change

> light_source{0rgb 1translate-9}#macro

to

> light_source{-9rgb 1}#macro

?

> A(V,B,C,R)#while(B-256)#if(V-128/B>=0 )#local
> V=V-128/B;box{0,1pigment{rgb 1}translate<C-4,R,9>}#end#local B=B*2; 
> #local C=C+1;#end#end A(234,1,0,1)A(85,1,0,0)A(81,1,0,-1)//TomMelly

-- 

> A jedyne co czytam, ze to terrorysci internetowi z echelonu planuja
> kolejny atak na centrale TPSA
- Expert vel Jacek (obecnie gol### [at] pocztaonetpl)


Post a reply to this message

From: Tom Melly
Subject: Re: yet another sig...
Date: 20 Jul 2002 11:02:17
Message: <3d397b79@news.povray.org>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in message
news:Xns### [at] 204213191226...

> nice :)
>
> but... why not change
>
> > light_source{0rgb 1translate-9}#macro
>
> to
>
> > light_source{-9rgb 1}#macro
>
> ?

Doh!


Post a reply to this message

From: Warp
Subject: Re: yet another sig...
Date: 20 Jul 2002 12:44:25
Message: <3d399369@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> light_source{0rgb 1translate-9}#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0
> )#local V=V-128/B;box{0,1pigment{rgb 1}translate<C-4,R,9>}#end#local B=B*2;
> #local C=C+1;#end#end A(234,1,0,1)A(85,1,0,0)A(81,1,0,-1)//TomMelly

  What a waste of space.

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


-- 
#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: yet another sig...
Date: 20 Jul 2002 17:41:55
Message: <3d39d923$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3d399369@news.povray.org...

>   What a waste of space.
>
> light_source{-9rgb 1}#macro A(V,B,C,R)#if(B-256)#if(V-128/B>=0)
> #local V=V-128/B;box{0,1pigment{rgb 1}translate<C-4R,9>}#end A(
> V,B*2C+1R)#end#end A(234,1,0,1)A(85,1,0,0)A(81,1,0,-1)//TomMelly
>

I can honestly say that I would never have thought of that (even ignoring
the ability to drop commas which I didn't know about and confused the hell
out of me on first reading).

BTW you can lose 3 more chars - light_source{-9 1} also seems to work.

Here's my final version with some added cover (I've adopted your comma
trick)

#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: Tom Melly
Subject: Re: yet another sig...
Date: 21 Jul 2002 05:54:30
Message: <3d3a84d6@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3d39d923$1@news.povray.org...

> Here's my final version with some added cover

Umm, "added colour"


Post a reply to this message

From:
Subject: Re: yet another sig...
Date: 22 Jul 2002 03:29:25
Message: <8vcnjusalp2u7at8b2ck1aem7i7s9qge7o@4ax.com>
On 20 Jul 2002 12:44:25 -0400, Warp <war### [at] tagpovrayorg> wrote:
>  What a waste of space.
>
> light_source{-9rgb 1}#macro A(V,B,C,R)#if(B-256)#if(V-128/B>=0)
> #local V=V-128/B;box{0,1pigment{rgb 1}translate<C-4R,9>}#end A(
> V,B*2C+1R)#end#end A(234,1,0,1)A(85,1,0,0)A(81,1,0,-1)//TomMelly

What a waste of space ;)

light_source{-9on}#macro A(V,B,R)#if(B-256)#if(V>=128/B)#local
V=V-128/B;box{0,1pigment{rgb 1}translate<log(B)/log(2)-4R,9>}#
end A(V,B*2R)#end#end A(234,1on)A(85on,0)A(81on,-1)//TomMelly

ABX


Post a reply to this message

From: Steve
Subject: Re: yet another sig...
Date: 22 Jul 2002 17:04:42
Message: <slrnajnrl2.hjd.steve@zeropps.org.uk>
On Sat, 20 Jul 2002 22:42:20 +0100, Tom Melly wrote:
 
> Here's my final version with some added cover (I've adopted your comma
> trick)
> 
> #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
> 

That one is excelent. 

-- 
#local i=.1;#local I=(i/i)/i;#local l=(i+i)/i;#local ll=(I/i)/l;box{<-ll,
-((I/I)+l),-ll><ll,-l,ll>pigment{checker scale l}finish{ambient((I/l)/I)+
(l/I)}}sphere{<i-i,l-l,(I/l)>l/l pigment{rgb((I/l)/I)}finish{reflection((
I/l)/I)-(l/I)specular(I/l)/I}}light_source{<I-l,I+I,(I-l)/l>l/l} // Steve


Post a reply to this message

From: Felix Wiemann
Subject: Re: yet another sig...
Date: 23 Jul 2002 07:26:17
Message: <3d3d3d58@news.povray.org>
Tom Melly wrote:

[quote]
#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
[/quote]


What about this (without name):

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

Or this:

#macro A(V,C,R)#while(C-8)#if(V-pow(2,7-C)>=0)sphere{<C-4#local
V=V-pow(2,7-C);R-1 9>.5pigment{rgb<1-C/8R/2C/8>}}#end#local C=C
+1;#end#end A(234,0,2)A(85,0,1)A(81,0,0)light_source{-5 1} //TM

Or this:

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

The parameter B has been completely removed.

I doubt if the mathematics are necessary. There is probably a much simpler 
and shorter way: Just define a macro(X,Y) that places a sphere and invoke 
it several times.

Felix Wiemann
-- 
light_source{0#macro L(N,S,J)sphere{S.5}sphere{N.5}sphere{J.5}cylinder{
S,N.5}cylinder{S,J.5}#end 3}union{L(0v*-2<2,-2>)L(y*-3z-v*5z*3-y)L(-y*3
0u*3)L(y*-3v*-5-z,z*-3-y)rotate-v*clock pigment{rgb.5}translate<0,2,9>}
// +KFF200 +KF720 +W120 +H90 -F -A -GA -P


Post a reply to this message

From:
Subject: Re: yet another sig...
Date: 23 Jul 2002 08:00:09
Message: <hugqju0q0am06so1ned7qpam49pvmshn00@4ax.com>
On Tue, 23 Jul 2002 13:28:35 +0200, Felix Wiemann <Fel### [at] gmxnet>
wrote:
> What about this (without name):
>
> #macro A(V,C,R)#while(C-8)#if(V-pow(2,7-C)>=0)sphere{<C-4R-1#
> local V=V-pow(2,7-C);9>.5pigment{rgb<1-C/8R/2C/8>}}#end#local
> C=C+1;#end#end A(234,0,2)A(85,0,1)A(81,0,0)light_source{-5 1}

Why without name ?

#macro A(C,R,V)#if(C-8)A(C+1R,#if(V<pow(2,7-C))V)#else V-pow(
2,7-C))sphere{<C-4R-1,9>.5pigment{rgb<1-C/8R/2C/8>}}#end#end#
end A(0,2,234)A(0on,85)A(0,0,81)light_source{-5on}//Tom Melly

> I doubt if the mathematics are necessary. There is probably a much simpler 
> and shorter way: Just define a macro(X,Y) that places a sphere and invoke 
> it several times.

or use method similiar I used in
http://news.povray.org/m2am9uo755ncf7d7j223jdsgnhlq9trggu%404ax.com

ABX
-- 
disc{z,-z#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e 1))/10-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()>.01#
end}}}}{k(g(atan2(x,y)),g(ln(pow(x+y,2)+1e-5)),0)}}finish{ambient 1}}//ABX35


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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