Skip to content

Commit

Permalink
Merge pull request #3 from hrkalona/release/1.0.8.2
Browse files Browse the repository at this point in the history
Release/1.0.8.2
  • Loading branch information
hrkalona committed Apr 13, 2022
2 parents f16cdef + 0901a3a commit 3c32bec
Show file tree
Hide file tree
Showing 64 changed files with 2,539 additions and 2,236 deletions.
6 changes: 5 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Version 1.0.8.2
-Fixed a bug that caused settings for julia set to fail to load
-Fixed a bug in orbit traps when the initial value was a constant

Version 1.0.8.1
-Added a new fixed point precision implementation (BigNum)
-Optimized the reference calculation and pixel to coordinate mapping on all fractals that support pertubation and do not use division
-Optimized the reference calculation and pixel to coordinate mapping on all fractals that support perturbation and do not use division
-Reduced the memory footprint of the reference orbit
-Reduced the memory footprint when saving struct-like types and saved them like primitive values
-Optimized SA for Mandelbrot, add thread support, and increased the terms up to 257
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fractal Zoomer 1.0.8.1
Fractal Zoomer 1.0.8.2

The most complete fractal generating software using java!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void initialize(Complex pixel) {
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public CircleCrossOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public CircleOrbitTrap(int checkType, double pointRe, double pointIm, double tra
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public CirclePointOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public CrossOrbitTrap(int checkType, double pointRe, double pointIm, double trap
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GoldenRatioSpiralCircleOrbitTrap(int checkType, double pointRe, double po
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GoldenRatioSpiralCrossOrbitTrap(int checkType, double pointRe, double poi
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GoldenRatioSpiralNNormOrbitTrap(int checkType, double pointRe, double poi
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GoldenRatioSpiralOrbitTrap(int checkType, double pointRe, double pointIm,
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GoldenRatioSpiralPointNNormOrbitTrap(int checkType, double pointRe, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GoldenRatioSpiralPointOrbitTrap(int checkType, double pointRe, double poi
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GoldenRatioSpiralRhombusOrbitTrap(int checkType, double pointRe, double p
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public GoldenRatioSpiralSquareOrbitTrap(int checkType, double pointRe, double po
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ImOrbitTrap(int checkType, double pointRe, double pointIm, double trapLen
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ImageOrbitTrap(int checkType, double pointRe, double pointIm, double trap
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void initialize(Complex pixel) {
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public NNormCrossOrbitTrap(int checkType, double pointRe, double pointIm, double
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public NNormOrbitTrap(int checkType, double pointRe, double pointIm, double trap
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public NNormPointNNormOrbitTrap(int checkType, double pointRe, double pointIm, d
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public NNormPointOrbitTrap(int checkType, double pointRe, double pointIm, double
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
37 changes: 33 additions & 4 deletions src/fractalzoomer/fractal_options/orbit_traps/OrbitTrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public abstract class OrbitTrap {
protected boolean trapped;
protected boolean countTrapIterations;
protected int checkType;
protected boolean isJulia;
protected boolean usesPerturbation;
protected boolean usesStaticInitVal;
protected boolean doFirstIterationSkipCheck;
protected int skipTrapCheckForIterations;

public OrbitTrap(int checkType, double pointRe, double pointIm, double trapLength, double trapWidth, boolean countTrapIterations) {

Expand All @@ -44,7 +49,6 @@ public OrbitTrap(int checkType, double pointRe, double pointIm, double trapLengt
this.trapWidth = trapWidth;
this.countTrapIterations = countTrapIterations;
this.checkType = checkType;

}

public void initialize(Complex pixel) {
Expand All @@ -56,10 +60,18 @@ public void initialize(Complex pixel) {
extraIterations = 0;
trappedPoint = new Complex();
trapped = false;
doFirstIterationSkipCheck = !isJulia && (usesPerturbation || usesStaticInitVal);

}

public abstract void check(Complex val, int iteration);

public void check(Complex val, int iteration) {
if((doFirstIterationSkipCheck && iteration == 0) || (iteration < skipTrapCheckForIterations)) {
return;
}
checkInternal(val, iteration);
}

protected abstract void checkInternal(Complex val, int iteration);

public double getDistance() {

Expand Down Expand Up @@ -164,5 +176,22 @@ public boolean isTrapped() {
return trapped;

}


public void setJulia(boolean julia) {
isJulia = julia;
}

public void setUsesPerturbation(boolean usesPerturbation) {
this.usesPerturbation = usesPerturbation;
}

public void setUsesStaticInitVal(boolean usesStaticInitVal) {
this.usesStaticInitVal = usesStaticInitVal;
}

public void setSkipTrapCheckForIterations(int skipTrapCheckForIterations) {
this.skipTrapCheckForIterations = skipTrapCheckForIterations;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public PointNNormOrbitTrap(int checkType, double pointRe, double pointIm, double
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PointOrbitTrap(int checkType, double pointRe, double pointIm, double trap
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PointRhombusOrbitTrap(int checkType, double pointRe, double pointIm, doub
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PointSquareOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ReOrbitTrap(int checkType, double pointRe, double pointIm, double trapLen
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void initialize(Complex pixel) {
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public RhombusCrossOrbitTrap(int checkType, double pointRe, double pointIm, doub
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public RhombusOrbitTrap(int checkType, double pointRe, double pointIm, double tr
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public RhombusPointOrbitTrap(int checkType, double pointRe, double pointIm, doub
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void initialize(Complex pixel) {
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if (checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public SquareCrossOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public SquareOrbitTrap(int checkType, double pointRe, double pointIm, double tra
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public SquarePointOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public StalksCircleOrbitTrap(int checkType, double pointRe, double pointIm, doub
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public StalksCrossOrbitTrap(int checkType, double pointRe, double pointIm, doubl
}

@Override
public void check(Complex val, int iteration) {
protected void checkInternal(Complex val, int iteration) {

if(checkType == TRAP_CHECK_TYPE_TRAPPED_FIRST && trapped) {
return;
Expand Down
Loading

0 comments on commit 3c32bec

Please sign in to comment.