Documentation ¶
Index ¶
- Constants
- func AllocateOutputSpace(nsurfaces, nrays int) ([][]Vec3, [][]Vec3)
- func BlockRaytraceNoAlloc(prescription []Surface, Ps, Ss []Vec3, wvl, nAmbient float64, ...)
- func DotVec3(a, b Vec3) float64
- func Intersect(P0, S Vec3, FFp SagNormalFunc, eps float64, maxiter int) (Vec3, Vec3)
- func NewtonRaphsonIntersect(P1, S Vec3, FFp SagNormalFunc, s1, eps float64, maxiter int) (Vec3, Vec3)
- func ParallelRaytrace(prescription []Surface, Ps, Ss []Vec3, wvl, nAmbient float64, ...)
- func Raytrace(prescription []Surface, P, S Vec3, wvl, nAmbient float64, niterIntersect int) ([]Vec3, []Vec3)
- func RaytraceNoAlloc(prescription []Surface, P, S Vec3, wvl, nAmbient float64, niterIntersect int, ...)
- func SumSqVec3(a Vec3) float64
- func TransformToLocalCoords(XYZ, P, S Vec3, R *Mat3) (Vec3, Vec3)
- type Conic
- type Geometry
- type Glass
- type Mat3
- type Plane
- type Ray
- type SagNormalFunc
- type Surface
- type Vec3
Constants ¶
View Source
const ( REFLECT int = 1 REFRACT int = 2 STOP int = 3 )
Variables ¶
This section is empty.
Functions ¶
func AllocateOutputSpace ¶
AllocateOutputSpace creates output buffers for a raytrace
func BlockRaytraceNoAlloc ¶
func BlockRaytraceNoAlloc(prescription []Surface, Ps, Ss []Vec3, wvl, nAmbient float64, niterIntersect int, Pout, Sout [][]Vec3)
BlockRaytraceNoAlloc is simply a loop over P, S, Pout, Sout to trace multiple rays. It's used to help implement massively parallel raytracing
func NewtonRaphsonIntersect ¶
func NewtonRaphsonIntersect(P1, S Vec3, FFp SagNormalFunc, s1, eps float64, maxiter int) (Vec3, Vec3)
NewtonRaphsonIntersect returns the point P and surface normal vector N at which the ray and surface described by FFP intersect
func ParallelRaytrace ¶
func RaytraceNoAlloc ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.