POV-Ray : Newsgroups : povray.binaries.animations : grass blowing in the wind (animation) : Re: grass blowing in the wind (animation) Server Time
1 Jun 2024 03:38:34 EDT (-0400)
  Re: grass blowing in the wind (animation)  
From: Tek
Date: 25 Sep 2010 19:35:14
Message: <4c9e8732$1@news.povray.org>
Well I wouldn't bother using a spline. The values from spotted give a nice 
smooth randomly varying result, so I'd just use f_spotted(time*speed,0,0). 
Or if you want a 3D value something like 
<f_spotted(T,0,0),f_spotted(T,seed1,0),f_spotted(T,seed2)> where seed1 and 
seed2 randomly offset the pattern.

Alternatively you can use vturbulence(2,.5,1, T*x) which gives a vector 
result and is also perlin noise based. You can increase the number of 
octaves (1 in that example) to make it bumpier.

-- 
Tek
http://evilsuperbrain.com

"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news:web.4c9744cd40e56284196b08580@news.povray.org...
> "Tek" <tek### [at] evilsuperbraincom> wrote:
>> "Kenneth" <kdw### [at] earthlinknet> wrote in message
>> > ...I'm essentially using the spline as an array, just
>> > a holder of a certain number of random values.
>>
>> Nice! Are the values actually random? Have you considered using perlin 
>> noise
>> instead? (i.e. f_spotted(x,0,0))
>> Much of my time with POV has been spent finding interesting uses for 
>> perlin
>> noise!
>
> That's an interesting idea; hadn't considered it.  (The macro just takes a
> user-chosen seed value and creates its many random spline values from 
> that.) I
> don't exactly understand how I would pull a string of 'different' values 
> out of
> f_spotted(x,0,0) to create the spline with; would something like this 
> work?
> (Just a general example)...
>
> f_spotted(200*counter,0,0) // counter is just some advancing integer
>
> I.e., translating the pattern a fair distance each count, to get a new 
> 'random'
> value each time?
>
> Ken
>
>
>
>


Post a reply to this message

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