POV-Ray : Newsgroups : povray.general : Snow : Re: Snow Server Time
12 Aug 2024 23:25:42 EDT (-0400)
  Re: Snow  
From: Spider
Date: 15 Dec 1998 11:30:26
Message: <36768DEA.B031F468@bahnhof.se>
Ho Mike.
I jump in here with a THANKYOU.
I posted a line about this pice called 3D match a while up...
Hadn't found the bounded_by statement... Or was to dumb to use it....

Thanx again...
But, the question remains... What are the formula to test if a pont is inside a sphere
(useful in a few othjer progs I'm doing... ??

Well, thankya again...
AS for the snowflakes, try a scaled sphere.... scale <0.1,1,1> or so... Then a
rotation...

//Spider


Mike wrote:
> 
> Hmm, could try something like this:
> 
> /*untested code, but should be a good starting point*/
> 
> //The globe
> 
> difference {
> 
> sphere {<0, 0, 0>, 5
> interior {ior 1.48 caustics .5 fade_distance 9 fade_power 2}
> }
> 
> sphere {<0, 0, 0>, 4.9
> interior {ior 1.33 caustics .5 fade_distance 15 fade_power 2}
> }
> 
> pigment {color rgbf <.97, .98, .975, .98>}
> finish {reflection .05 phong .5 phong_size 70 ambient 0}
> 
> }
> 
> #declare R1 = seed(1234)
> #declare R2 = seed(4321)
> #declare R3 = seed(1+2+3+4+4+3+2+1)
> 
> #declare make_snow = 0
> 
> union {
> 
> #while (make_snow < 1000)  //how many flakes
> 
> sphere {<0, 0, 0>, .01
> translate <-5, -5, -5>  //move to one corner of the cube
> translate <10*rand(R1), 10*rand(R2), 10*rand(R3)> //then spread around
> }
> 
> #declare make_snow = make_snow + 1
> #end
> 
> /*This should be the shape of the globe*/
> bounded_by { sphere {<0, 0, 0>, 4.899} }
> 
> pigment {color White}
> finish {ambient .5}
> }
> 
> That should work pretty good unless you want to animate it.
> 
> -Mike
> 
> Mary K Casteel wrote:
> >
> > I'm working on creating a snowglobe and don't know what to do about snow,
> > does anyone have a tip for creating sparkling particles within the globe?
> > -Patrick Casteel


Post a reply to this message

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