|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
The sine wave can be normalized, but it is not "fat" enough (i.e. I
would like the peak to be wider than the trough). What other options are
there?
-Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
SharkD writes :
> I would like to create a function for a heightfield that has a nice bel
l
> 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.
>
> The sine wave can be normalized, but it is not "fat" enough (i.e. I
> would like the peak to be wider than the trough). What other options ar
e
> there?
t in [0,2*Pi], y in ]-1,1[ then bell curve is
"cos^2(t)+sin^2(t)=(4+ath(-y))^2"
ath() is hyperbolic arctangent means inverse of hyperbolic tangent th().
Does it suits you ?
Regards,
--
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/
http://fon.gs/eureka/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Francois LE COAT wrote:
> t in [0,2*Pi], y in ]-1,1[ then bell curve is
>
> "cos^2(t)+sin^2(t)=(4+ath(-y))^2"
>
> ath() is hyperbolic arctangent means inverse of hyperbolic tangent th().
>
> Does it suits you ?
>
> Regards,
>
Is this a correct transformation?
0 = tanh(sqrt(cos(t)^2 + sin(t)^2) - 4) + y
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
SharkD wrote:
> I've looked at the normal distribution and beta distribution functions,
> but they can only be normalized along one axis.
I figured out how to normalize the beta distribution, but the formula
involves and integral and I don't know how to do that in POV.
-Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
I don't know quite what you mean by normalizing a two-dimensional function along
one axis. You can normalize the maximum of the function to 1. You can
normalize the volume under the whole surface to one. You can also normalize
the area under a cross-section, but which quantity do you want to normalize
along different axes? What part of
exp(-((x/sigma_x)^2 + (y/sigma_y)^2) / 2)
makes it unsuitable for the purpose? Please don't interpret the question
negatively; I just really don't understand the question.
- Ricky
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
SharkD writes :
> Francois LE COAT writes :
>> t in [0,2*Pi], y in ]-1,1[ then bell curve is
>>
>> "cos^2(t)+sin^2(t)=(4+ath(-y))^2"
>>
>> ath() is hyperbolic arctangent means inverse of hyperbolic tangent th(
).
>>
>> Does it suits you ?
>
> Is this a correct transformation?
>
> 0 = tanh(sqrt(cos(t)^2 + sin(t)^2) - 4) + y
y = th( 4 - sqrt(x^2 + z^2) ) with x in [-8,8] and z in [-8,8]
That's correct, it looks like :-)
Regards,
--
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/
http://fon.gs/eureka/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Francois LE COAT wrote:
> Hi,
>
> SharkD writes :
>> 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
.
>>
>> The sine wave can be normalized, but it is not "fat" enough (i.e. I
>> would like the peak to be wider than the trough). What other options
>> are there?
>
> t in [0,2*Pi], y in ]-1,1[ then bell curve is
>
> "cos^2(t)+sin^2(t)=(4+ath(-y))^2"
>
You do know that "cos^2(t)+sin^2(t)" is 1 for all t do you?
Jerome
--
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr
Post a reply to this message
Attachments:
Download 'us-ascii' (1 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
> You do know that "cos^2(t)+sin^2(t)" is 1 for all t do you?
Please read the following reply. It's a mistake. You should
replace the formula with "x^2+y^2" like in the final equation.
The bell curve surface y=f(x,z) is described correctly.
Thanks,
--
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/
http://fon.gs/eureka/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
triple_r wrote:
> 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
>
>
>
I ended up using this function:
#local BetaA = 3;
#local BetaB = 3;
#local ThingX = ((BetaA - 1) / (BetaB - 1 + BetaA - 1) - 1/2) * 2;
#local ThingY = pow(ThingX/2 + 1/2, BetaA - 1) * pow(1 - (ThingX/2 +
1/2), BetaB - 1);
function {pow(f_r(x,y,z)/2 + 1/2, BetaA - 1) * pow(1 - (f_r(x,y,z)/2 +
1/2), BetaB - 1) / ThingY}
It's basically the same as the beta distribution function, minus the
exponent (or beta function). I realized it was not necessary.
-Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |