POV-Ray : Newsgroups : povray.binaries.images : IsoStones : Re: IsoStones Server Time
8 Aug 2024 12:17:58 EDT (-0400)
  Re: IsoStones  
From: PM 2Ring
Date: 14 Sep 2005 09:45:00
Message: <web.432826d28195286505e02d50@news.povray.org>
"s.day" <s.d### [at] uelacuk> wrote:
> "PM 2Ring" <nomail@nomail> wrote:
> > This group of stones is a single isosurface. The wet sand is a
> > normal-perturbed plane. The stone textures are the standard textures
> > in stones.inc.
> >
> > Now I just need to figure out how to perturb the stones' positions a bit
> > more...
>
> Excellent stones, I spent a while trying to get good isosurface stone shapes
> for one of my IRTC entries for this round. (I didn't get as intersting
> shapes as you managed would you mind posting the source for a couple so I
> can see how you did it....

Thanks, Sean. I guess you've seen my source code by now. :)

> Here's how I created one of mine
>
> #declare  S = function { sqrt(pow(x,2) + pow(y,2) + pow(z,2)) - 2 }
>
> #declare Stone1 = isosurface {
>   function {
>
S(x,y*(1.5-y/12),z)-f_wrinkles(x*0.3,y*0.5,z*0.03)*0.05-fn_scallop_ripples(x,y,z).gray*0.001-f_wrinkles(x*3,y*4,z*4)*
0.
> 005
> }
>         accuracy isoAccuracy
>         max_gradient 2.75
>         contained_by{sphere{0,2.2}}
> }

Interesting function, though I'm not familiar with your
fn_scallop_ripples().
I don't think I would use wrinkles on pebbles like these, such patterns are
more suited to large objects like really huge stones, whole landscapes,
asteroids and planets, where the self-scaling nature of such fractal noise
can be seen over several scales at once.

A couple of suggestions about your code, though. Firstly,
fn_pattern(x,y,z).red is more efficient than fn_pattern(x,y,z).gray, and
gives identical results for a pattern using the default grayscale colour
map. Secondly, the internal functions f_r() and f_sphere will be more
efficient than your S function.

Also, I'm pretty sure that x*x is generally more efficient than pow(x,2),
although if pow() is well-optimized, the difference may be negligible. The
POV source code experts will know the answer to that one.


Post a reply to this message

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