Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.SphericalCoordinates.polar()


    // 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;

  }
View Full Code Here


                specimenIndex,
                incidentAngle.polar(),
                incidentAngle.azimuthal(),
                wavelength,
                sensor,
                exitantAngle.polar(),
                exitantAngle.azimuthal(),
                solidAngle,
                projectedSolidAngle,
                this.samplesPerMeasurement,
                hits,
View Full Code Here

    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()
View Full Code Here

              "%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,
View Full Code Here

    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();
View Full Code Here

   * @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()
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.