|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.testing.MonteCarlo
public class MonteCarlo
Monte Carlo methods.
| Field Summary | |
|---|---|
protected static RandomJames |
rnd
Random number generator. |
| Constructor Summary | |
|---|---|
MonteCarlo()
|
|
| Method Summary | |
|---|---|
static double |
balanceHeuristic(double f,
double pdfF,
double g,
double pdfG)
Balance heuristic. |
static double[] |
concentricSampleDisk(double ksi1,
double ksi2,
double[] result)
Samples concentric disk. |
static double[] |
cosineSampleHemisphere(double ksi1,
double ksi2,
double[] result)
Samples hemisphere according to the cosine-distribution. |
static double |
lerp(double t,
double v1,
double v2)
|
static double |
powerHeuristic(double f,
double pdfF,
double g,
double pdfG)
Power heuristic. |
static double[] |
randomPointFromTriangle(double u,
double v,
double[] a,
double[] b,
double[] c,
double[] result)
Generates random point in the given triangle. |
static boolean |
sameHemisphere(double[] in,
double[] normal,
double[] out)
Are these directions on the same side of hemisphere. |
static double[] |
sampleSquare(double u,
double v,
double[] vertUR,
double[] vertUL,
double[] vertLL,
double[] vertLR,
double[] pos)
Generates point on the light. |
static double[] |
uniformSampleCone(double u,
double v,
double cosThetaMax,
double[] result)
Uniformly samples cone. |
static double[] |
uniformSampleHemisphere(double ksi1,
double ksi2,
double[] result)
Samples hemisphere uniformly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final RandomJames rnd
| Constructor Detail |
|---|
public MonteCarlo()
| Method Detail |
|---|
public static double[] uniformSampleHemisphere(double ksi1,
double ksi2,
double[] result)
public static double[] cosineSampleHemisphere(double ksi1,
double ksi2,
double[] result)
public static double[] concentricSampleDisk(double ksi1,
double ksi2,
double[] result)
public static double[] sampleSquare(double u,
double v,
double[] vertUR,
double[] vertUL,
double[] vertLL,
double[] vertLR,
double[] pos)
public static final double[] randomPointFromTriangle(double u,
double v,
double[] a,
double[] b,
double[] c,
double[] result)
a - Triangle vertex A.b - Triangle vertex B.c - Triangle vertex C.result - Pre-allocated result array (can be null).
null in case of failure.
public static double[] uniformSampleCone(double u,
double v,
double cosThetaMax,
double[] result)
u - Uniform random number.v - Uniform random number.cosThetaMax - Maximal possible cosinus of angle theta.dir - Pre-allocated array to hold result.
public static boolean sameHemisphere(double[] in,
double[] normal,
double[] out)
public static double lerp(double t,
double v1,
double v2)
public static double balanceHeuristic(double f,
double pdfF,
double g,
double pdfG)
f - Function f.pdfF - Underlying probability density function of f.g - Function g.pdfG - Underlying probability density function of g.
public static double powerHeuristic(double f,
double pdfF,
double g,
double pdfG)
f - Function f.pdfF - Underlying probability density function of f.g - Function g.pdfG - Underlying probability density function of g.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||