F(x, y) describing a distorted 3D Gaussian bell

  • #1
I am new to these forums - if I have posted in the wrong place please let me know.
Standard 3D Gaussian bell: z = e^-(x^2) * e^-(y^2)
From along the z-axis this looks "round".
I would like a generalized f(x, y) which would look egg-shaped from above - possibly quite distorted..
I thought at first that this would be easy - hours of experimentation later I have a new respect for this problem. I hope someone finds a simple solution - I would love to have missed something simple!
Thanks,
Broos
 
Last edited:
  • Like
Likes Delta2

Answers and Replies

  • #2
Stephen Tashi
Science Advisor
7,578
1,467
Basically you need a function of the form ##f(x,y) = e^{-( Ax^2 + Bxy + Cy^2)}##. Look up "bivariate normal distribution" , "bivariate gaussian distribution", or "multivariate normal distribution".
 
  • #3
That is super-cool, and will allow me to squish and rotate the bell; however, all the resultant shapes are still bilaterally symmetric. Not so much egg-shaped as oval. I would very much like to find a way of producing a 3D shape with a 2D cross-section similar to this:
https://www.screencast.com/t/ztmJfYS2Gen0

Looks like e^-(1*ln(x)2+ 1*ln(y)2)
get closer - from the side it looks like this: https://www.screencast.com/t/ZfDcDhGiTj
but from the top it looks sqare-ish: https://www.screencast.com/t/wV5Oz1G7
 
Last edited:
  • #4
mathman
Science Advisor
7,898
461
It's not clear from the picture what you want. In general you can easily distort a 2-d Gaussian so that the cross section looks like an ellipse. In this case, set up the ellipse and determine its center and the two axes. These then can be used for the 2-d Gaussian exponent.
 
  • #5
35,259
11,510
Something like the Crystal Ball function?

In general you can rotate your function by an angle ##\phi## by setting ##x' = \cos(\phi)x + \sin(\phi) y## and ##y' = \cos(\phi)y - \sin(\phi)x##.
 
  • #6
It's not clear from the picture what you want. In general you can easily distort a 2-d Gaussian so that the cross section looks like an ellipse. In this case, set up the ellipse and determine its center and the two axes. These then can be used for the 2-d Gaussian exponent.
@mathman - actually I am specifically *not* looking for a z-ward cross-section that looks like an ellipse - the shape I am looking for is distorted so that the cross-section looks like an exaggerated egg: one end narrow, the other wide. More like you took a regular Gaussian bell and smudged it in one direction.
 
  • #7
Something like the Crystal Ball function?

In general you can rotate your function by an angle ##\phi## by setting ##x' = \cos(\phi)x + \sin(\phi) y## and ##y' = \cos(\phi)y - \sin(\phi)x##.
@mfb - Oh that is excellent! I am not sure how to generalize it to a 3D shape; if we simply rotate around the maximum then our shape again becomes symmetrical. As in my reply to @mathman, the shape should look "like you took a regular Gaussian bell and smudged it in one direction."

FYI the way in which this will be used:
I am making procedurally generated islands. The base is Perlin noise. I am looking for a family of shapes to distort, rotate, and overlap to create an envelope over the Perlin noise. The egg, or teardrop z-ward outline is meant to roughly simulate arms of a central mountain system; the off-central maximum with exponential falloff should leave a rough, pleasing edge.
Just for fun here is an earlier attempt using Perlin noise and many overlapping Sinwaves: https://www.screencast.com/t/2w6unMYt9i7
Ty!
 
  • #8
35,259
11,510
A Crystal Ball in one dimension, a Gaussian shape in the other one will give some sort of egg-shaped peak.
 

Related Threads on F(x, y) describing a distorted 3D Gaussian bell

  • Last Post
Replies
10
Views
4K
Replies
22
Views
1K
Replies
2
Views
2K
Replies
16
Views
5K
Replies
8
Views
769
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
5
Views
13K
Replies
9
Views
3K
  • Last Post
Replies
7
Views
3K
Top