POV-Ray : Newsgroups : povray.text.scene-files : icicles macro Server Time
1 Nov 2024 07:25:16 EDT (-0400)
  icicles macro (Message 1 to 4 of 4)  
From: Bob H 
Subject: icicles macro
Date: 10 May 2001 14:59:28
Message: <3afae510@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: icicles.pov
// Vers: MegaPov 0.6 >
// Desc: random icicles in a row.  yours to use freely, and modify, etcetera
// Date: 2001.35
// Auth: Bob Hughes
// Mail: omn### [at] charternet
// Note: very unfinished, especially placement/orientation, with any luck it will
render for you


#version unofficial MegaPov 0.7;

global_settings {
        max_trace_level 9
        photons {
                spacing .125 media 67
                save_file "icicle.ph"
               // load_file "icicle.ph"
                }
}


light_source {-10000*z,1
         rotate <30,30,0>
  photons {refraction on reflection on}
}

camera {location <1,-5,-7.5> look_at -2.5*y}

sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0 color rgb <.67,.75,.9>] [.3 color rgb <.3,.6,.9>] [1 color rgb
<.2,.4,.8>] }
  }
}

box {-1,1 // gutter
        texture {
        pigment {wood pigment_map {
                [0 rgb <.75,.67,.5>]
                [.1 rgb <.875,.75,.5>]
                [.3 rgb <.9,.875,.67>]
                } frequency 1 turbulence .1 scale .1}
        normal {wood .2 frequency 1 turbulence .1 scale .1}
        finish {ambient .075 diffuse .5 phong .1 phong_size 15 crand .125}
         rotate <10,80,0> translate .5*z
         }
         scale <5,.5,.5> translate z/2
}

box {-1,1 // wall
        texture {
        pigment {rgb <1,.99,.96>}
        normal {spotted .2 frequency 3 turbulence .67 scale .3}
        finish {ambient .125 diffuse .7 phong .05 phong_size 10}
         scale <.1,.1,1>
         }
         scale <4.5,5,.5> translate <0,-5,1.5>
}


// icicles
#macro Icicles (IceDistance,IceSize,IceLengthVariable,Threshold,IceRandom)

#declare S=seed(IceRandom);
#declare Id=IceDistance;
#declare Is=IceSize;
#declare C=Is;
#declare In=0; // ending point
#declare IRn=1; // separation random limiter
#declare IRl=0; // length random limiter (not working right)
#if (IceLengthVariable>5) #declare Iv=5; #else #declare Iv=IceLengthVariable; #end

blob {
        threshold Threshold // thickened or thinned out
#while (Id>In)
#declare R=rand(S);
#declare Il=rand(S)*2; // length random limiter (works right)
#while (IRn>.75)
#declare IRn=rand(S);
#end
#while (IRl<.125)
#declare IRl=rand(S); // ?? see above
#end
#while (C>In+(Il+(IRl*(6-Iv))))
#declare Rx=rand(S);
#declare Ry=rand(S);
#declare Rz=rand(S);
sphere
{<(Id+R*1.5)+(Rx*(Is/100)),(Ry*(Is/(Is*10)))+(C/2.5),Rz*(Is/(Is*100))>,(C/25)*(2-IRn),1/C}
#declare Is=Is-.15;
#declare C=C-.15;
#end
#declare Is=IceSize;
#declare C=Is;
#declare Id=Id-(.75*(IRn+.5));
#end
       material {
        texture {
        pigment {rgbf<1,1,1,.96>}
        normal {wrinkles .25 scale .25}
        finish {diffuse .125 specular .8 roughness .008 phong .02 phong_size 2
                 reflection_type 1 reflection_min .05 reflection_max .5
conserve_energy}
        }
        interior {ior 1.333 // caustics 1
               // dispersion 1.067 dispersion_samples 9
                media {method 2
                        intervals 1
                        samples 1,10 // sample_spacing .3,3
                        absorption <.33,.25,.225>*.3
                        scattering {2,<9.3,9.6,9.9> extinction .9}
                        density {marble
                                density_map {
                                        [.09 rgb<.03,.033,.0333>*6]
                                        [.11 rgb<.03,.033,.0333>*1]
                                        [.12 rgb<.03,.033,.0333>*5]
                                        } frequency 2 turbulence .67 scale .25 rotate
30}
                }
                }
       }

 translate <-6*(IceDistance/10),-3.5*(IceSize/10),0> // centering, hopefully
 // positioning needs refining, IceSize is y start, IceDistance is x start

        photons {target .2 refraction on reflection on ignore_photons}

hollow
} // blob

#end // macro


/* macro name (distance, size, length (0 to 5), blob threshold, random seed) */

Icicles ( 10 , 10 , 4 , .25 , 12345 )

// end scene


Post a reply to this message

From: yooper
Subject: Re: icicles macro
Date: 11 May 2001 00:00:53
Message: <3afb63f5@news.povray.org>
Thanks Bob . . .
This looks interesting . . .

Y


Post a reply to this message

From: Bob H 
Subject: Re: icicles macro
Date: 11 May 2001 01:53:08
Message: <3afb7e44$1@news.povray.org>
Good luck with it.
I tried my best to make it usable, which doesn't mean much from me.  I might
try a few more changes to it myself.

Bob H.


Post a reply to this message

From: GrndAdmThrawn
Subject: Re: icicles macro
Date: 11 May 2001 17:15:13
Message: <3afc5661@news.povray.org>
it works for me and i'm useing megapov 0.7


Post a reply to this message

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