Documentation ¶
Overview ¶
Package pdf provides probability density functions
Index ¶
Constants ¶
View Source
const (
SpherePdfValue float64 = 1 / (4 * math.Pi)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CosinePdf ¶
type CosinePdf struct {
// contains filtered or unexported fields
}
CosinePdf is a probability density functions with a cosine distribution
type MixturePdf ¶
type MixturePdf struct {
// contains filtered or unexported fields
}
MixturePdf is for generating a mixture of two different probability density functions
func (MixturePdf) Generate ¶
func (p MixturePdf) Generate() geo.Vec3
Generate random direction for the MixturePdf shape. Which is randomly chosen between the two base pdfs.
type Pdf ¶
Pdf is the common interface for the probability density functions
func NewCosinePdf ¶
NewCosinePdf creates a new instance of a CosinePdf
func NewMixturePdf ¶
NewMixturePdf creates a new instance of a MixturePdf
Click to show internal directories.
Click to hide internal directories.