POV-Ray : Newsgroups : povray.general : Bell curves : Re: Bell curves Server Time
30 Jul 2024 06:24:52 EDT (-0400)
  Re: Bell curves  
From: triple r
Date: 1 Sep 2009 14:55:00
Message: <web.4a9d6d9b687fa7e9958421d50@news.povray.org>
SharkD <mik### [at] gmailcom> wrote:
> I would like to create a function for a heightfield that has a nice bell
> curve shape, but can also be normalized between 0 and 1 along each axis.
> I've looked at the normal distribution and beta distribution functions,
> but they can only be normalized along one axis.

Oh.  It took me a bit to realize what you meant, but why not just

exp(-x*x-y*y) * (x-1) * (x+1) * (y-1) * (y+1)

This just clamps the edges to zero while keeping the center at 1.  Still 'looks'
gaussian.

 - Ricky


Post a reply to this message

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