POV-Ray : Newsgroups : povray.binaries.images : City SSC WIP 2 Server Time
11 Aug 2024 21:25:16 EDT (-0400)
  City SSC WIP 2 (Message 11 to 19 of 19)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: nospam
Subject: Re: City SSC WIP 2
Date: 17 Feb 2004 22:02:25
Message: <4032d448.12822716@localhost>
On Sun, 15 Feb 2004 19:06:02 -0800, "Tek" <tek### [at] evilsuperbraincom>
wrote:

>
>This is probably the final version. What do you think of it?
>
>Oh, and just because I can, here's the full source:

That is really cool.  Could you also post the source for the
first version please?

thank you

Pete


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 01:43:19
Message: <40330987$1@news.povray.org>
"nospam" <Pet### [at] nymaliasnetalmost> wrote in message
news:4032d448.12822716@localhost...
> That is really cool.  Could you also post the source for the
> first version please?

Certainly:

#macro C()function{pigment{crackle#end#local A=C()solid}}#local
B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
,z*9).x)/80}pigment{rgb z+y}finish{reflection{.8 metallic.1}
ambient 0}}sky_sphere{pigment{agate scale 2}}

Enjoy :)

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: Dave Matthews
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 12:06:08
Message: <40339b80$1@news.povray.org>
> All { braces must have a matching } brace. This scene just puts the 
> opening braces in the macro, and the closing braces after the calls to 
> that macro. Cleanly indented, the code's a lot easier to understand:
> 
> #macro C()
>     function {
>         pigment {crackle
> #end
> 
> #local A = C() solid}}
> 
> #local B = C() }}
> 
> This is equivalent to:
> 
> #local A = function {pigment {crackle solid}}
> 
> #local B = function {pigment {crackle}}
> 
OH.  Clever.  I guess that if I traced it out the whole code, I should 
have seen that.

Thanks

Dave Matthews


Post a reply to this message

From: stephen parkinson
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 12:46:36
Message: <4033a4fc@news.povray.org>
Dave Matthews wrote:
> 
>> All { braces must have a matching } brace. This scene just puts the 
>> opening braces in the macro, and the closing braces after the calls to 
>> that macro. Cleanly indented, the code's a lot easier to understand:
>>
>> #macro C()
>>     function {
>>         pigment {crackle
>> #end
>>
>> #local A = C() solid}}
>>
>> #local B = C() }}
>>
>> This is equivalent to:
>>
>> #local A = function {pigment {crackle solid}}
>>
>> #local B = function {pigment {crackle}}
>>
> OH.  Clever.  I guess that if I traced it out the whole code, I should 
> have seen that.
> 
> Thanks
> 
> Dave Matthews
> 

is there a way of capturing the expanded source ?

similar to gcc -S||-s ??

stephen


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 13:11:49
Message: <4033aae5$1@news.povray.org>
I don't believe so, I think pov's # instructions aren't exactly a strict
pre-processor, though I might be completely wrong!

Though it's pretty easy to expand by hand, this is the more readable version I'm
going to submit with my entry:

#local A=function{pigment{crackle solid}}
#local B=function{pigment{crackle}}

#local Scale = 1/9;    //scale the isosurface to fit inside the unit sphere (the
default container object).
#local MaxGradient = 99;

isosurface{
    function{
        max(
            2+y/Scale-A(x/Scale,0,z/Scale).x*4,    //solid crackle pigment + y
=> horizontal roofs of buildings
            .2-B(x/Scale,0,z/Scale).x    //crackle pigment => walls of
buildings. .2 is the gap between buildings.
        )/MaxGradient   //adjust range of values to fit default max_gradient ==
1
    }
    finish{reflection{0,1}}
}

fog{
    rgb <1,1.2,1.33>
    distance .7
    fog_type 2
    fog_alt.1
}

sky_sphere{pigment{agate}}

sphere{<5.4,-3.6,5.4>, 5}

-- 
Tek
www.evilsuperbrain.com


"stephen parkinson" <ste### [at] zmemw16demoncouk> wrote in message
news:4033a4fc@news.povray.org...
> Dave Matthews wrote:
> >
> >> All { braces must have a matching } brace. This scene just puts the
> >> opening braces in the macro, and the closing braces after the calls to
> >> that macro. Cleanly indented, the code's a lot easier to understand:
> >>
> >> #macro C()
> >>     function {
> >>         pigment {crackle
> >> #end
> >>
> >> #local A = C() solid}}
> >>
> >> #local B = C() }}
> >>
> >> This is equivalent to:
> >>
> >> #local A = function {pigment {crackle solid}}
> >>
> >> #local B = function {pigment {crackle}}
> >>
> > OH.  Clever.  I guess that if I traced it out the whole code, I should
> > have seen that.
> >
> > Thanks
> >
> > Dave Matthews
> >
>
> is there a way of capturing the expanded source ?
>
> similar to gcc -S||-s ??
>
> stephen


Post a reply to this message

From: Christopher James Huff
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 13:39:52
Message: <cjameshuff-CEE56D.13402718022004@news.povray.org>
In article <4033a4fc@news.povray.org>,
 stephen parkinson <ste### [at] zmemw16demoncouk> wrote:

> is there a way of capturing the expanded source ?
> 
> similar to gcc -S||-s ??

Nope. Macro expansions are done as the scene is parsed, not as a 
preprocessing step.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: nospam
Subject: Re: City SSC WIP 2
Date: 23 Feb 2004 17:17:55
Message: <403a57f8.2365970@localhost>
On Tue, 17 Feb 2004 22:43:29 -0800, "Tek" <tek### [at] evilsuperbraincom>
wrote:

>> That is really cool.  Could you also post the source for the
>> first version please?
>
>Certainly:
>

Thank you!


Post a reply to this message

From: Marc Champagne
Subject: Re: City SSC WIP 2
Date: 24 Feb 2004 22:52:37
Message: <Xns9499E8B0E6227POVMIKA@203.29.75.35>
"Tek" <tek### [at] evilsuperbraincom> wrote in
news:403033c1@news.povray.org: 

> After thee feedback from my last posting, I've decided to
> enter the city image in the short code contest. I've
> managed to find enough room in the 256 bytes of source to
> add some fog and a hill in the distance, and to completely
> change the colours, I'm really pleased with the result :)
> 
> This is probably the final version. What do you think of
> it? 

Just 3 words: Evil, Super, Brain

P.S. 1 more word: Outstanding!

> Oh, and just because I can, here's the full source:
> #macro C()function{pigment{crackle#end#local
> A=C()solid}}#local 
> B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x
> *9,0 ,z*9).x)/99}finish{reflection{0,1}}}fog{rgb
> 1+y/5+z/3distance.7 fog_type
> 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5} 

-- 
Marc Champagne
marcch.AT.videoSPAMNOTtron.DOT.ca.invalid
Montreal, Canada


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 24 Feb 2004 23:46:16
Message: <403c2898$1@news.povray.org>
"Marc Champagne" <marcch.AT.videoSPAMNOTtron.DOT.ca.invalid> wrote in message
news:Xns9499E8B0E6227POVMIKA@203.29.75.35...
> Just 3 words: Evil, Super, Brain
>
> P.S. 1 more word: Outstanding!

:D

Thanks!
-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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