sphere_project
sphere_project(sph, cam, fl) ⇒ number
Computations of screen-space pixel area covered by a sphere NOTE: Port of GLSL code by Ingo Quilez. Source: http://www.iquilezles.org/www/articles/sphereproj/sphereproj.htm
Kind: global function
Returns: number
- area on the screen as a fraction, 1=entire screen, 0=zero area
Param | Type | Description |
---|---|---|
sph | Array.<number> | Object | Sphere in world space |
cam | Array.<number> | Float32Array | camera transform matrix (world to camera)(inverse world matrix of camera) |
fl | number | focal length (fov in Radians) |