2D Gaussian Splat Evaluation
Compute the 2D Gaussian splat value at a pixel.
3D Gaussian Splatting represents scenes as millions of 3D Gaussians. When projected to 2D, each becomes an elliptical Gaussian:
where:
- is the pixel position
- is the Gaussian center
- are the standard deviations (scale)
This axis-aligned version is simplified - real 3DGS uses full 2D covariance for rotated ellipses.
Example
gaussian_splat((0, 0), (0, 0), (1, 1))
1.0
- Inputs:
pixelis the query point ,centeris the splat's mean , andsigmagives the spread along each axis, , in pixel units. - Offsets: the pixel sits exactly on the center, so and .
- Exponent terms: each axis contributes its squared offset scaled by twice its variance: for and for . Their sum is .
- Value: , which rounded to 4 decimal places is the output
1.0. - Notice that is the largest value a splat can take: any offset makes the exponent negative and the value falls toward . One standard deviation away along , e.g. pixel , gives , and a larger would make that falloff slower.
Constraints
- pixel: (x, y) query position
- center: (μx, μy) Gaussian center
- sigma: (σx, σy) standard deviations
- Return Gaussian value, rounded to 4 decimal places