/* (non-Javadoc)
* @see ca.eandb.jmist.framework.path.PathNode#sample(double, double, double)
*/
@Override
public ScatteredRay sample(double ru, double rv, double rj) {
Point2 p = pointOnImagePlane;
SphericalCoordinates v = new SphericalCoordinates(
Math.acos(1.0 - 2.0 * p.y()),
2.0 * Math.PI * p.x());
Ray3 ray = new Ray3(Point3.ORIGIN, v.toCartesian(BASIS));
Color color = getWhite();
double pdf = 1.0 / (4.0 * Math.PI);
return ScatteredRay.diffuse(ray, color, pdf);