7273747576777879808182
// TODO implement this directly so it's more efficient. SphericalCoordinates result = uniformOnSphere(radius, ru, rv); if (result.polar() > (Math.PI / 2.0)) result = new SphericalCoordinates(Math.PI - result.polar(), result.azimuthal(), radius); return result; }
180181182183184185186187188189190
specimenIndex, incidentAngle.polar(), incidentAngle.azimuthal(), wavelength, sensor, exitantAngle.polar(), exitantAngle.azimuthal(), solidAngle, projectedSolidAngle, this.samplesPerMeasurement, hits,
105106107108109110111112113114115
Vector3 n = x.getNormal(); SphericalCoordinates sc = SphericalCoordinates.fromCartesian(new Vector3(n.x(), -n.z(), n.y())); return new Point2( (Math.PI + sc.azimuthal()) / (2.0 * Math.PI), sc.polar() / Math.PI ); } /* (non-Javadoc) * @see ca.eandb.jmist.framework.SceneElement#isClosed()
168169170171172173174175176177178
"%f,%f,%e,%d,%f,%f,%f,%f,%d,%d,%f,%e,%e", incidentAngle.polar(), incidentAngle.azimuthal(), wavelength, sensor, exitantAngle.polar(), exitantAngle.azimuthal(), solidAngle, projectedSolidAngle, this.samplesPerMeasurement, hits,
563564565566567568569570571572573
for (int sensor = 0; sensor < numSensors; sensor++) { SphericalCoordinates exitantAngle = collector.getSensorCenter(sensor); Vector3 v = exitantAngle.toCartesian(); polar[sensor] = exitantAngle.polar(); azimuthal[sensor] = exitantAngle.azimuthal(); solidAngle[sensor] = collector.getSensorSolidAngle(sensor); projectedSolidAngle[sensor] = collector.getSensorProjectedSolidAngle(sensor); center[sensor * 3 + 0] = v.x(); center[sensor * 3 + 1] = v.y();
363364365366367368369370371372373
* @see ca.eandb.jmist.framework.AbstractGeometry#getTextureCoordinates(ca.eandb.jmist.framework.AbstractGeometry.GeometryIntersection) */ @Override protected Point2 getTextureCoordinates(GeometryIntersection x) { SphericalCoordinates sc = SphericalCoordinates.fromCartesian(x.getPosition().vectorFromOrigin()); return new Point2((Math.PI + sc.azimuthal()) / (2.0 * Math.PI), sc.polar() / Math.PI); } /* (non-Javadoc) * @see ca.eandb.jmist.framework.SceneElement#isClosed() */