Package ca.eandb.jmist.framework.color

Examples of ca.eandb.jmist.framework.color.Color


      //Point2 p      = RandomUtil.uniform(bounds, seq);
      Point2 p      = RandomUtil.canonical2(seq);
      seq.mark();

      Color sample    = colorModel.sample(seq);
      seq.mark();

      PathInfo pi      = new PathInfo(scene, sample.getWavelengthPacket());
      Lens lens      = scene.getLens();
      PathNode eyeTail  = strategy.traceEyePath(lens, p,
                    pi, seq);
      seq.mark();
View Full Code Here


      seq.mutate(width);
      Point2 p      = RandomUtil.canonical2(seq);
      seq.mark();

      Color sample    = colorModel.sample(seq);
      seq.mark();

      PathInfo pi      = new PathInfo(scene, sample.getWavelengthPacket());
      Lens lens      = scene.getLens();
      PathNode eyeTail  = strategy.traceEyePath(lens, p,
                    pi, seq);
      seq.mark();
View Full Code Here

      seq.mutate(width);
      Point2 p      = RandomUtil.canonical2(seq);
      seq.mark();

      seq.mutate(width);
      Color sample    = colorModel.sample(seq);
      seq.mark();

      seq.mutate(width);
      PathInfo pi      = new PathInfo(scene, sample.getWavelengthPacket());
      Lens lens      = scene.getLens();
      PathNode eyeTail  = strategy.traceEyePath(lens, p,
                    pi, seq);
      seq.mark();
View Full Code Here

        cy.clear();

        Path y = (x != null) ? mutate(x) : generateNewPath();

        Color score      = join(y.getLightTail(), y.getEyeTail(),
                      lightImageWeight, cy);
        if (score != null) {
          Point2 p = y.getPointOnImagePlane();
          cy.add(new Contribution(p, score));
        }
View Full Code Here

//      return joinInnerToInner(eyeNode, light);
//    }

    private Color join(PathNode lightTail, PathNode eyeTail,
        double lightImageWeight, List<Contribution> contrib) {
      Color score = null;

      PathNode lightNode = lightTail;
      while (true) {

        PathNode eyeNode = eyeTail;
        while (true) {

          Color c = joinAt(lightNode, eyeNode, lightImageWeight,
              contrib);
          score = ColorUtil.add(score, c);

          if (eyeNode == null) {
            break;
View Full Code Here

    }

    private Color joinInnerToInner(PathNode lightNode, PathNode eyeNode) {
      double w = strategy.getWeight(lightNode, eyeNode);
      if (w > 0.0) {//MathUtil.EPSILON) {
        Color c = measure.evaluate(lightNode, eyeNode);
        return ColorUtil.mul(c, w);
      } else {
        return null;
      }
    }
View Full Code Here

        double weight, List<Contribution> contrib) {
      double w = strategy.getWeight(lightNode, eyeNode);
      if (w > 0.0) {//MathUtil.EPSILON) {
        Point2 p = eyeNode.project(lightNode.getPosition());
        if (p != null) {
          Color c = measure.evaluate(lightNode, eyeNode);
          c = ColorUtil.mul(c, weight * w);
          if (c != null) {
            contrib.add(new Contribution(p, c));
          }
        }
View Full Code Here

        return null;
      }

      double w = strategy.getWeight(null, eyeNode);
      if (w > 0.0) {// MathUtil.EPSILON) {
        Color c = measure.evaluate(null, eyeNode);
        return ColorUtil.mul(c, w);
      } else {
        return null;
      }
    }
View Full Code Here

        return null;

      Ray3 ray = new Ray3(
          Point3.ORIGIN,
          new Vector3(nx, ny,  -Math.sqrt(1.0 - d2)));
      Color color = getWhite();
      double pdf = 0.25;

      return ScatteredRay.diffuse(ray, color, pdf);
    }
View Full Code Here

    public ScatteredRay sample(double ru, double rv, double rj) {
      Point3 o = context.getPosition();
      Vector3 n = context.getNormal();
      Vector3 v = RandomUtil.diffuse(ru, rv).toCartesian(Basis3.fromW(n));
      Ray3 ray = new Ray3(o, v);
      Color color = getWhite();
      return ScatteredRay.diffuse(ray, color, 1.0 / Math.PI);
    }
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.color.Color

Copyright © 2018 www.massapicom. 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.