Function that produce a spike in 3D

178 Views Asked by At

I am looking for a function that would produce a spike, of any size, in the z-direction at a given x and y coordinate. A little bit like the https://en.wikipedia.org/wiki/Dirac_delta_function but that could be graphed in 3D.

I am not sure if those specifications are clear, if not please let me know I will clarify according to feedback.

Thanks a lot

1

There are 1 best solutions below

7
On BEST ANSWER

There are a few ways of doing it, but a 'nice' way (continuous, infinitely differentiable) would be to consider a pulse as a normal distribution with close to zero variance, that is

$$z = A\exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2\sigma^2}\right)$$

You can keep taking variances smaller and smaller till you get the desired result