Examples of Plane


Examples of vash.Plane

  @Override
  public Plane compute(ImageParameters ip) {
    float freq = (float)this.frequency.getV();
    float phase = (float)this.phase.getV();
    Plane A = _children[0].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        out.data[i][j] = (float)Math.sin(A.data[i][j] * freq + phase);
      }
      }
View Full Code Here

Examples of vash.Plane

    return new Multiply(_children[0].clone(), _children[1].clone());
  }

  @Override
  public Plane compute(ImageParameters ip) {
    Plane A = _children[0].compute(ip);
    Plane B = _children[1].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        out.data[i][j] = A.data[i][j] * B.data[i][j];
      }
      }
View Full Code Here

Examples of vash.Plane

  }

  @Override
  public Plane compute(ImageParameters ip) {
    float twoOverPi = (float)(2.0 / Math.PI);
    Plane A = _children[0].compute(ip);
    Plane B = _children[1].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        float v0 = A.data[i][j];
        float val;
        if(v0 == 0.0f)
View Full Code Here

Examples of vash.Plane

  @Override
  public Plane compute(ImageParameters ip) {
    int w = ip.getW();
    int h = ip.getH();
    float v = (float)this.v.getV();
    Plane p = ip.getPlane();
    for(int y = 0; y < h; y++) {
      for(int x = 0; x < w; x++) {
        p.data[x][y] = v;
      }
    }
View Full Code Here

Examples of vash.Plane

    return new Modulus(_children[0].clone(), _children[1].clone());
  }

  @Override
  public Plane compute(ImageParameters ip) {
    Plane A = _children[0].compute(ip);
    Plane B = _children[1].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        if(B.data[i][j] == 0.0f) {
          if(A.data[i][j] > 0.0f)      out.data[i][j] = 1.0f;
          else if(A.data[i][j] < 0.0fout.data[i][j] = -1.0f;
View Full Code Here

Examples of vash.Plane

    float[] Y = ip.getYValues();
    float x0 = (float)p0.getX();
    float y0 = (float)p0.getY();
    float x1 = (float)p1.getX();
    float y1 = (float)p1.getY();
    Plane out = ip.getPlane();
    float pX, pY, ppY;
    float color;
   
    // get angle p0->p1 vector (Note: subtract p0 so we are from the origin)
    double ang = Math.atan2(y1 - y0, x1 - x0);
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.