"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "ingo" <nomail@nomail> wrote:
> > A plane cut ...
>
> to reveal new rabbit holes.. :-)
My main problem (rabbit hole) was to come up with a Hash macro. But this morning
I thought, POV-Ray has deterministic noise. Use that.
- Shoot ray at point.
- floorInt floorInt ... for as many dimensions you neeed (POV: 3) and get to the
cell corners.
- Get noise values at corners an use them to come up with a feature point in
that cell. (this I do now by hashing the coordinates of the point and a seed)
- Do it for all the neighbour cells.
- for reuse, stick cell id and feature point in a small Least Recently Used
(LRU) Cache. One only needs to cache ~ 10 points to be near the optimum
speed/memory. That (rabbit hole) will be quite a thing to code with lots of
array's doubly linked lists etc. and might not be faster that recalculation.
- from there on you can do the usual sorted / minimum distance thing for Worley
noise.
ingo
Post a reply to this message
|