Sha256: edd078a938447a1f558ece94fbb4c993e77bc8c4d7d304a35298e59c718f5229

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

package org.sunflow.core.filter;

import org.sunflow.core.Filter;

public class GaussianFilter implements Filter {

    private float es2;

    public GaussianFilter() {
        es2 = (float) -Math.exp(-getSize() * getSize());
    }

    @Override
    public final float getSize() {
        return 3.0f;
    }

    @Override
    public float get(float x, float y) {
        float gx = (float) Math.exp(-x * x) + es2;
        float gy = (float) Math.exp(-y * y) + es2;
        return gx * gy;
    }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
joonsrenderer-1.3.1-java src/main/java/org/sunflow/core/filter/GaussianFilter.java
joonsrenderer-1.2.0-java src/main/java/org/sunflow/core/filter/GaussianFilter.java
joonsrenderer-1.1.3-java src/main/java/org/sunflow/core/filter/GaussianFilter.java
joonsrenderer-1.1.2-java src/main/java/org/sunflow/core/filter/GaussianFilter.java
joonsrenderer-1.1.1-java src/main/java/org/sunflow/core/filter/GaussianFilter.java
joonsrenderer-1.1-java src/main/java/org/sunflow/core/filter/GaussianFilter.java