POV-Ray : Newsgroups : povray.general : My turn! Server Time
8 Aug 2024 01:21:59 EDT (-0400)
  My turn! (Message 1 to 10 of 42)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Francois Labreque
Subject: My turn!
Date: 8 May 2001 11:01:52
Message: <3AF80917.FF2B40DB@videotron.ca>
-- 
#local a=<1,1,0>;#local b=<2,1,0>;#local c=<3,2,0>;#local d=<5,3,0>;
#macro P(A,B) polygon{4,A,A+z,B+z,B texture{pigment{color rgb 1}finish
{ambient 1}}}#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P(2*b,d)P(
d,<2,3,0>)}camera{location <5,1.2,-5>look_at a orthographic}//FL


Post a reply to this message

From: Ron Parker
Subject: Re: My turn!
Date: 8 May 2001 11:16:10
Message: <slrn9fg3dv.ik2.ron.parker@fwi.com>
On Tue, 08 May 2001 10:56:23 -0400, Francois Labreque wrote:
>
>-- 
>#local a=<1,1,0>;#local b=<2,1,0>;#local c=<3,2,0>;#local d=<5,3,0>;
>#macro P(A,B) polygon{4,A,A+z,B+z,B texture{pigment{color rgb 1}finish
>{ambient 1}}}#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P(2*b,d)P(
>d,<2,3,0>)}camera{location <5,1.2,-5>look_at a orthographic}//FL

I had to do it; it's a compulsion. Doesn't anyone understand?

#local a=x+y;#local b=x+a;#local c=a+b;#macro P(A,B) polygon{
4,A,A+z,B+z,B texture{pigment{color rgb 1}finish{ambient 1}}}
#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P(2*b,b+c)P(b+
c,<2,3>)}camera{location<5,1.2,-5>look_at a orthographic}//FL

or

#local a=x+y;#local b=x+a;#local c=a+b;#macro P(A,B)polygon{5,A,A+z,B+z,B,A//FL
texture{pigment{rgb 1}finish{ambient 1}}}#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P
(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)}camera{location<5,1.2,-5>look_at a orthographic}

which has the advantage of rendering without warnings.


-- 
#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

From: Warp
Subject: Re: My turn!
Date: 8 May 2001 11:37:27
Message: <3af812af@news.povray.org>
Francois Labreque <fla### [at] videotronca> wrote:
: #local a=<1,1,0>;#local b=<2,1,0>;#local c=<3,2,0>;#local d=<5,3,0>;
: #macro P(A,B) polygon{4,A,A+z,B+z,B texture{pigment{color rgb 1}finish
: {ambient 1}}}#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P(2*b,d)P(
: d,<2,3,0>)}camera{location <5,1.2,-5>look_at a orthographic}//FL

  I don't understand what does it do, but it can ne made a lot shorter:

#local a=x+y;#local b=a+x;#local c=a+b;#local d=b+c;#macro P(A,B)polygon{
5,A,A+z,B+z,B,A pigment{rgb 9}}#end P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P
(2*b,d)P(d,<2,3,0>)camera{location <5,1.2,-5>look_at a orthographic}//FL


-- 
#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

From: Warp
Subject: Re: My turn!
Date: 8 May 2001 11:45:16
Message: <3af81483@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:
: #local a=x+y;#local b=x+a;#local c=a+b;#macro P(A,B)polygon{5,A,A+z,B+z,B,A//FL
: texture{pigment{rgb 1}finish{ambient 1}}}#end union{P(0,a)P(a,b)P(b,c)P(c,2*a)P
: (2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)}camera{location<5,1.2,-5>look_at a orthographic}

  Darn, you made it first.
  However, my version is shorter :)

#local a=x+y;#local b=a+x;#local c=a+b;#local d=b+c;#macro P(A,B)polygon{
5,A,A+z,B+z,B,A pigment{rgb 9}}#end P(0,a)P(a,b)P(b,c)P(c,2*a)P(2*a,2*b)P
(2*b,d)P(d,<2,3,0>)camera{location <5,1.2,-5>look_at a orthographic}//FL

  And doesn't warn either.

-- 
#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

From: Ron Parker
Subject: Re: My turn!
Date: 8 May 2001 12:03:50
Message: <slrn9fg67b.ikq.ron.parker@fwi.com>
On 8 May 2001 11:45:16 -0400, Warp wrote:
>  Darn, you made it first.
>  However, my version is shorter :)

Yes, I like the rgb 9 trick.  That one's new to me.  And of course the
'texture' keyword is almost always redundant.

>2*b,d)P(d,<2,3,0>)camera{location <5,1.2,-5>look_at a orthographic}//FL

The ,0 is unnecessary, as is the space after location.

So can you make my new one smaller?

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z} // Only my opinions


Post a reply to this message

From: Ron Parker
Subject: Re: My turn!
Date: 8 May 2001 16:01:26
Message: <slrn9fgk4s.itd.ron.parker@fwi.com>
On 8 May 2001 12:03:50 -0400, Ron Parker wrote:
>So can you make my new one smaller?

Okay, that one was boring.  So's this one, but at least the output is pretty.

-- 
plane{z 3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate z
*60#local a=a-1;#end translate-15*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{-9blue 1scale-x-y+z}text{ttf
"arial.ttf""RP".01,0translate-<.6,.4,.02>}light_source{-z*3rgb-.2} // Ron Parker


Post a reply to this message

From: Ron Parker
Subject: Re: My turn!
Date: 8 May 2001 16:17:24
Message: <slrn9fgl2q.itd.ron.parker@fwi.com>
On 8 May 2001 16:01:26 -0400, Ron Parker wrote:
>On 8 May 2001 12:03:50 -0400, Ron Parker wrote:
>>So can you make my new one smaller?
>
>Okay, that one was boring.  So's this one, but at least the output is pretty.

And now: the warning-free version.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Tek
Subject: Re: My turn!
Date: 8 May 2001 16:21:22
Message: <3af85542@news.povray.org>
That looks like fun! So I made my own. I'm sure it can be shortened more
than this, but 4 lines ain't bad :)

--
#default{texture{pigment{rgb 0}finish{reflection 1}}}#macro M(A) #declare
B=A;
#end#macro L(A) sphere{A,1}sphere{B,1}cylinder{A,B,1}#declare B=A;#end
M(<4,0>)
L(<8,8>)L(<2,8>)M(<6,0>)L(<10,8>)L(<16,8>)M(<8,4>)L(<12,4>)camera{location
<9,4,-15>}sky_sphere{pigment{bozo colour_map{[0 rgb 0][1 rgb 1]}}} // Tek


Post a reply to this message

From: Tek
Subject: Re: My turn!
Date: 8 May 2001 16:22:27
Message: <3af85583$1@news.povray.org>
> #default{texture{pigment{rgb 0}finish{reflection 1}}}#macro M(A) #declare
> B=A;
> #end#macro L(A) sphere{A,1}sphere{B,1}cylinder{A,B,1}#declare B=A;#end
> M(<4,0>)
> L(<8,8>)L(<2,8>)M(<6,0>)L(<10,8>)L(<16,8>)M(<8,4>)L(<12,4>)camera{location
> <9,4,-15>}sky_sphere{pigment{bozo colour_map{[0 rgb 0][1 rgb 1]}}} // Tek
>
>

Doh! It wrapped wrong! Can anyone explain what's going on with that? When I
wrote it it wasn't wrapping like that :(

--
Tek
http://www.evilsuperbrain.com


Post a reply to this message

From: Tek
Subject: Re: My turn!
Date: 8 May 2001 16:24:32
Message: <3af85600@news.povray.org>
I think I've fixed it now... I hope...

--
#default{texture{pigment{rgb 0}finish{reflection 1}}}#macro M(A) #declare B=A;
#end#macro L(A) sphere{A,1}sphere{B,1}cylinder{A,B,1}#declare B=A;#end M(<4,0>)
L(<8,8>)L(<2,8>)M(<6,0>)L(<10,8>)L(<16,8>)M(<8,4>)L(<12,4>)camera{location
<9,4,-15>}sky_sphere{pigment{bozo colour_map{[0 rgb 0][1 rgb 1]}}} // Tek


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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