Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Vector2.y()


    public Node(Point2 p, PathInfo pathInfo, double ru, double rv, double rj) {
      super(pathInfo, ru, rv, rj);
      this.pointOnImagePlane = p;

      Vector2 uv = RandomUtil.uniformOnDisc(apertureRadius, ru, rv).toCartesian();
      Point3 origin = new Point3(uv.x(), uv.y(), 0.0);
      Point3 focus = new Point3(
          (pointOnImagePlane.x() - 0.5) * objPlaneWidth,
          (0.5 - pointOnImagePlane.y()) * objPlaneHeight,
          -focusDistance);

View Full Code Here


      Vector3 ac = a.vectorTo(c);

      Vector2 tab = ta.vectorTo(tb);
      Vector2 tac = ta.vectorTo(tc);

      double r = 1.0 / (tab.x() * tac.y() - tab.y() * tac.x());

      Vector3 n = plane.normal();
      Vector3 u = new Vector3(
          r * (tac.y() * ab.x() - tab.y() * ac.x()),
          r * (tac.y() * ab.y() - tab.y() * ac.y()),
 
View Full Code Here

      double r = 1.0 / (tab.x() * tac.y() - tab.y() * tac.x());

      Vector3 n = plane.normal();
      Vector3 u = new Vector3(
          r * (tac.y() * ab.x() - tab.y() * ac.x()),
          r * (tac.y() * ab.y() - tab.y() * ac.y()),
          r * (tac.y() * ab.z() - tab.y() * ac.z()));
      Vector3 v = new Vector3(
          r * (tab.x() * ac.x() - tac.x() * ab.x()),
          r * (tab.x() * ac.y() - tac.x() * ab.y()),
 
View Full Code Here

      double r = 1.0 / (tab.x() * tac.y() - tab.y() * tac.x());

      Vector3 n = plane.normal();
      Vector3 u = new Vector3(
          r * (tac.y() * ab.x() - tab.y() * ac.x()),
          r * (tac.y() * ab.y() - tab.y() * ac.y()),
          r * (tac.y() * ab.z() - tab.y() * ac.z()));
      Vector3 v = new Vector3(
          r * (tab.x() * ac.x() - tac.x() * ab.x()),
          r * (tab.x() * ac.y() - tac.x() * ab.y()),
          r * (tab.x() * ac.z() - tac.x() * ab.z()));
 
View Full Code Here

      Vector3 n = plane.normal();
      Vector3 u = new Vector3(
          r * (tac.y() * ab.x() - tab.y() * ac.x()),
          r * (tac.y() * ab.y() - tab.y() * ac.y()),
          r * (tac.y() * ab.z() - tab.y() * ac.z()));
      Vector3 v = new Vector3(
          r * (tab.x() * ac.x() - tac.x() * ab.x()),
          r * (tab.x() * ac.y() - tac.x() * ab.y()),
          r * (tab.x() * ac.z() - tac.x() * ab.z()));

 
View Full Code Here

    Vector2 uv = RandomUtil.uniformOnDisc(boundingSphere.radius(), ru, rv).toCartesian();
    Basis3 basis = Basis3.fromW(this.plane.normal(), Basis3.Orientation.RIGHT_HANDED);

    Point3 p = boundingSphere.center()
        .plus(basis.u().times(uv.x()))
        .plus(basis.v().times(uv.y()));

    int id = (twoSided && RandomUtil.coin(rj))
        ? DISC_SURFACE_BOTTOM
        : DISC_SURFACE_TOP;
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.