package
Version:
v0.0.0-...-ec9fd1c
Opens a new window with list of versions in this module.
Published: Dec 14, 2012
License: GPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package sampleutil provides useful sampling functions.
-
func AddMod1(a, b float64) (s float64)
-
func Cone(d, u, v vec64.Vector, maxCosAngle, s1, s2 float64) vec64.Vector
-
func CosHemisphere(n, ru, rv vec64.Vector, s1, s2 float64) (v vec64.Vector)
-
func Sphere(s1, s2 float64) (dir vec64.Vector)
-
type Pdf1D
AddMod1 performs an floating-point addition modulo 1. Both values must be in the range [0,1].
Cone uniformly samples a cone.
CosHemisphere samples a cosine-weighted hemisphere given the coordinate system built by n, ru, and rv.
Sphere uniformly samples a sphere.
Pdf1D stores a 1-dimensonal probability distribution function.
NewPdf1D creates a new probably distribution function and calculates its
cumulative distribution function.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.