Examples of polar()


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

      Vector3 v = q.isPoint() ? q.toPoint3().unitVectorFromOrigin()
                          : q.toVector3().unit();
      SphericalCoordinates sc = SphericalCoordinates.fromCartesian(v,
          BASIS);
      double x = sc.azimuthal() / (2.0 * Math.PI);
      double y = 0.5 * (1.0 - Math.cos(sc.polar()));
      if (x < 0.0) {
        x += 1.0;
      }
      return new Point2(x, y);
    }
View Full Code Here

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

//
//        Gj += ujk * vjk;
//      }
      double Gj = MathUtil.bilinearInterpolate(
          0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, G[j],
          omegaP.polar(), phiP, false, true);

      spf += Fj * Gj;
    }

    double intensity = spf / NdotI;
View Full Code Here

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

    double Fb = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Fc[2],
        omegaO.polar(), phiO);
    double Gr = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[0],
        omegaP.polar(), phiP);
    double Gg = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[1],
        omegaP.polar(), phiP);
    double Gb = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[2],
View Full Code Here

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

    double Gr = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[0],
        omegaP.polar(), phiP);
    double Gg = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[1],
        omegaP.polar(), phiP);
    double Gb = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[2],
        omegaP.polar(), phiP);

    double r = Fr * Gr * intensity;
 
View Full Code Here

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

    double Gg = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[1],
        omegaP.polar(), phiP);
    double Gb = MathUtil.bilinearInterpolate(
        0, 0.5 * Math.PI, 0.0, 2.0 * Math.PI, Gc[2],
        omegaP.polar(), phiP);

    double r = Fr * Gr * intensity;
    double g = Fg * Gg * intensity;
    double b = Fb * Gb * intensity;
//    double r = intensity;
View Full Code Here

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

   * @see ca.eandb.jmist.framework.RayShader#shadeRay(ca.eandb.jmist.math.Ray3, ca.eandb.jmist.framework.color.WavelengthPacket)
   */
  public Color shadeRay(Ray3 ray, WavelengthPacket lambda) {
    SphericalCoordinates sc = SphericalCoordinates.fromCartesian(ray.direction(), basis);
    double theta = -sc.azimuthal();
    double r = 0.5 * (1.0 - (Math.PI - sc.polar()) / Math.PI);
    Point2 uv = new Point2(
        0.5 + r * Math.cos(theta),
        0.5 + r * Math.sin(theta));
    return texture.evaluate(uv, lambda);
  }
View Full Code Here

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

   */
  public Color shadeRay(Ray3 ray, WavelengthPacket lambda) {
    SphericalCoordinates sc = SphericalCoordinates.fromCartesian(ray.direction(), basis);
    Point2 uv = new Point2(
        (sc.azimuthal() + Math.PI) / (2.0 * Math.PI),
        sc.polar() / Math.PI);
    return texture.evaluate(uv, lambda);
  }

}
View Full Code Here

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

  public Color shadeRay(Ray3 ray, WavelengthPacket lambda) {
    if (ray.direction().dot(basis.w()) >= 0.0) {
      SphericalCoordinates sc = SphericalCoordinates.fromCartesian(ray.direction(), basis);
      Point2 uv = new Point2(
          (sc.azimuthal() + Math.PI) / (2.0 * Math.PI),
          2.0 * sc.polar() / Math.PI);
      return texture.evaluate(uv, lambda);
    } else {
      return background.shadeRay(ray, lambda);
    }
  }
View Full Code Here

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

                specimenIndex,
                incidentAngle.polar(),
                incidentAngle.azimuthal(),
                wavelengthIndex,
                sensor,
                exitantAngle.polar(),
                exitantAngle.azimuthal(),
                solidAngle,
                projectedSolidAngle,
                this.outstandingSamplesPerMeasurement,
                colorToCSV(raw),
View Full Code Here

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

  public static SphericalCoordinates uniformOnUpperHemisphere(double radius, double ru, double rv) {

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