Skip to content

Commit

Permalink
Merge pull request #12 from hrkalona/release/1.0.9.1
Browse files Browse the repository at this point in the history
Release/1.0.9.1
  • Loading branch information
hrkalona committed Jun 14, 2024
2 parents 402d285 + 813d7f5 commit fc9e4c2
Show file tree
Hide file tree
Showing 569 changed files with 19,818 additions and 8,819 deletions.
17 changes: 17 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
Version 1.0.9.1
-Reimplemented the image size format (width, height), in order to allow images of any dimension
-Changed the UI to flatlaf, so the application will be consistent between windows and linux
-Modified some UI elements to make them more consistent with the overall theme of flatlaf
-Implemented an additional zooming and rotating mechanism, a selection rectangle.
-The blending algorithm can now be configured for the post-processing algorithms independently. This option
along with the processing order can produce a multi-layer image format
-Added a preview to Image Expander
-Added image support for bmp, jpg, ppm, pgm
-Added some charts in the statistics and task statistics
-Added metrics functionality which displays the JVM memory usage and CPU usage in a time-series
-Added 2 trap coloring algorithms, 2 out coloring algorithms and 1 in coloring algorithm
-Fixed a bug concerning the v1-v30 user variables
-Reimplemented the final calculation order of the statistic coloring, in order for user statistical coloring to be able
to be used in user out coloring or user in coloring methods via the usage of v1-v30 variables
-Bug fixes and stability changes

Version 1.0.9.0
-Implemented Zhuoran's reference compression algorithm as a memory/speed tradeoff for locations with high memory requirement
-Optimized the custom BigNum implementation, which decreases the reference calculation time in shallow areas
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.9.0
Fractal Zoomer 1.0.9.1

The most complete fractal generating software using java!

Expand Down
Binary file added lib/flatlaf-3.4.1.jar
Binary file not shown.
Binary file added lib/jfreechart-1.5.4.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/fractalzoomer/bailout_conditions/BailoutCondition.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected BailoutCondition(double bound) {

useThreads = true;
this.bound = bound;
if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
ddbound = new MyApfloat(bound);
ddcbound = new DoubleDouble(bound);
bnbound = BigNum.create(bound);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public CircleBailoutCondition(double bound, boolean allocateMemory) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if(allocateMemory) {
if (TaskDraw.allocateMPFR()) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public CrossBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public CustomBailoutCondition(double bound) {

super(Math.pow(bound, 1 / Math.sqrt(bound)));

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public FieldLinesBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public ImaginaryStripBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public NNormBailoutCondition(double bound, double n_norm) {
this.n_norm = n_norm;
n_norm_reciprocal = 1 / n_norm;

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
ddn_norm = new MyApfloat(n_norm);
dddn_norm = new DoubleDouble(n_norm);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public RealPlusImaginarySquaredBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if(TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
}
else if(TaskDraw.allocateMPIR()) {
else if(TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public RealStripBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if(TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
}
else if(TaskDraw.allocateMPIR()) {
else if(TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public RhombusBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public SquareBailoutCondition(double bound) {

super(bound);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
22 changes: 21 additions & 1 deletion src/fractalzoomer/bailout_conditions/UserBailoutCondition.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,34 @@ public UserBailoutCondition(double bound, String bailout_test_user_formula, Stri
parser[1].setSizevalue(c_size);
}

Complex c_isize = new Complex(TaskDraw.IMAGE_SIZE, 0);
Complex c_isize = new Complex(Math.min(TaskRender.WIDTH, TaskRender.HEIGHT), 0);
if (parser[0].foundISize()) {
parser[0].setISizevalue(c_isize);
}

if (parser[1].foundISize()) {
parser[1].setISizevalue(c_isize);
}

Complex c_width = new Complex(TaskRender.WIDTH, 0);

if (parser[0].foundWidth()) {
parser[0].setWidthvalue(c_width);
}

if (parser[1].foundWidth()) {
parser[1].setWidthvalue(c_width);
}

Complex c_height = new Complex(TaskRender.HEIGHT, 0);

if (parser[0].foundHeight()) {
parser[0].setHeightvalue(c_height);
}

if (parser[1].foundHeight()) {
parser[1].setHeightvalue(c_height);
}

Complex c_point = new Complex(point[0], point[1]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class CircleDistanceBailoutCondition extends ConvergentBailoutCondition {
public CircleDistanceBailoutCondition(double convergent_bailout) {
super(convergent_bailout);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected ConvergentBailoutCondition(double convergent_bailout) {

this.convergent_bailout = convergent_bailout;

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
ddconvergent_bailout = new MyApfloat(convergent_bailout);
ddcconvergent_bailout = new DoubleDouble(convergent_bailout);
binddconvergent_bailout = new BigIntNum(convergent_bailout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public NNormDistanceBailoutCondition(double convergent_bailout, double n_norm) {
n_norm_reciprocal = 1 / n_norm;


if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
ddn_norm = new MyApfloat(n_norm);
ddcn_norm = new DoubleDouble(n_norm);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class RhombusDistanceBailoutCondition extends ConvergentBailoutCondition
private MpirBigNum temp2p;
public RhombusDistanceBailoutCondition(double convergent_bailout) {
super(convergent_bailout);
if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public class SquareDistanceBailoutCondition extends ConvergentBailoutCondition {
public SquareDistanceBailoutCondition(double convergent_bailout) {
super(convergent_bailout);

if(TaskDraw.PERTURBATION_THEORY || TaskDraw.HIGH_PRECISION_CALCULATION) {
if (TaskDraw.allocateMPFR()) {
if(TaskRender.PERTURBATION_THEORY || TaskRender.HIGH_PRECISION_CALCULATION) {
if (TaskRender.allocateMPFR()) {
temp1 = new MpfrBigNum();
temp2 = new MpfrBigNum();
} else if (TaskDraw.allocateMPIR()) {
} else if (TaskRender.allocateMPIR()) {
temp1p = new MpirBigNum();
temp2p = new MpirBigNum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public UserConvergentBailoutCondition(double convergent_bailout, String converge
parser[1].setSizevalue(c_size);
}

Complex c_isize = new Complex(TaskDraw.IMAGE_SIZE, 0);
Complex c_isize = new Complex(Math.min(TaskRender.WIDTH, TaskRender.HEIGHT), 0);
if (parser[0].foundISize()) {
parser[0].setISizevalue(c_isize);
}
Expand All @@ -79,6 +79,26 @@ public UserConvergentBailoutCondition(double convergent_bailout, String converge
parser[1].setISizevalue(c_isize);
}

Complex c_width = new Complex(TaskRender.WIDTH, 0);

if (parser[0].foundWidth()) {
parser[0].setWidthvalue(c_width);
}

if (parser[1].foundWidth()) {
parser[1].setWidthvalue(c_width);
}

Complex c_height = new Complex(TaskRender.HEIGHT, 0);

if (parser[0].foundHeight()) {
parser[0].setHeightvalue(c_height);
}

if (parser[1].foundHeight()) {
parser[1].setHeightvalue(c_height);
}

Complex c_point = new Complex(point[0], point[1]);

if(parser[0].foundPoint()) {
Expand Down
26 changes: 22 additions & 4 deletions src/fractalzoomer/core/BigComplex.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ public final BigComplex fifth() {
public final Apfloat norm_squared() {

if(MyApfloat.use_threads) {
Future<Apfloat> temp1 = TaskDraw.reference_thread_executor.submit(() -> MyApfloat.fp.multiply(re, re));
Future<Apfloat> temp2 = TaskDraw.reference_thread_executor.submit(() -> MyApfloat.fp.multiply(im, im));
Future<Apfloat> temp1 = TaskRender.reference_thread_executor.submit(() -> MyApfloat.fp.multiply(re, re));
Future<Apfloat> temp2 = TaskRender.reference_thread_executor.submit(() -> MyApfloat.fp.multiply(im, im));

try {
return temp1.get().add(temp2.get());
Expand Down Expand Up @@ -933,8 +933,8 @@ public final BigComplex square_plus_c(GenericComplex cn) {
BigComplex c = (BigComplex)cn;

if(MyApfloat.use_threads) {
Future<Apfloat> temp1 = TaskDraw.reference_thread_executor.submit(() -> MyApfloat.fp.add(MyApfloat.fp.multiply(MyApfloat.fp.add(re, im), MyApfloat.fp.subtract(re, im)), c.re));
Future<Apfloat> temp2 = TaskDraw.reference_thread_executor.submit(() -> {
Future<Apfloat> temp1 = TaskRender.reference_thread_executor.submit(() -> MyApfloat.fp.add(MyApfloat.fp.multiply(MyApfloat.fp.add(re, im), MyApfloat.fp.subtract(re, im)), c.re));
Future<Apfloat> temp2 = TaskRender.reference_thread_executor.submit(() -> {
Apfloat temp = MyApfloat.fp.multiply(re, im);
return MyApfloat.fp.add(MyApfloat.fp.add(temp, temp), c.im);
});
Expand Down Expand Up @@ -1085,4 +1085,22 @@ public BigComplex absNegateIm_mutable() {

@Override
public BigComplex toBigComplex() {return this;}

@Override
public Object re() {
return getRe();
}

@Override
public Object im() {
return getIm();
}

@Override
public Object Norm() {
return norm();
}

@Override
public BigComplex times2_mutable() {return times2();}
}
18 changes: 8 additions & 10 deletions src/fractalzoomer/core/BigIntNum.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,10 @@ public static void reinitialize(double digits) {
if (temp == 0) {
temp = 1;
} else if (digits % SHIFT32 != 0) {
//0 is floor
if(TaskDraw.BIGNUM_INITIALIZATION_ALGORITHM == 1) { //always
temp++;
}
else if (TaskDraw.BIGNUM_INITIALIZATION_ALGORITHM == 2) { //round
temp = (int)(res + 0.5);
}
temp++;
}

fracDigits = temp * TaskDraw.BIGNUM_PRECISION_FACTOR;
fracDigits = temp * TaskRender.BIGNUM_PRECISION_FACTOR;

totalDigits = fracDigits + INTEGER_PART;
totalDigitsByteCount = totalDigits << 2;
Expand All @@ -74,9 +68,9 @@ else if (TaskDraw.BIGNUM_INITIALIZATION_ALGORITHM == 2) { //round
ONE = new BigIntNum(1);
ONESHIFTED = new BigIntNum(ONE.digits.shiftLeft(fracDigitsBits));

use_threads = TaskDraw.USE_THREADS_IN_BIGNUM_LIBS && fracDigits >= THREADS_THRESHOLD && Runtime.getRuntime().availableProcessors() >= 2;
use_threads = TaskRender.USE_THREADS_IN_BIGNUM_LIBS && fracDigits >= THREADS_THRESHOLD && Runtime.getRuntime().availableProcessors() >= 2;

//use_threads2 = TaskDraw.USE_THREADS_IN_BIGNUM_LIBS && fracDigits >= THREADS_THRESHOLD && Runtime.getRuntime().availableProcessors() >= 3;
//use_threads2 = TaskRender.USE_THREADS_IN_BIGNUM_LIBS && fracDigits >= THREADS_THRESHOLD && Runtime.getRuntime().availableProcessors() >= 3;
}

public BigIntNum() {
Expand Down Expand Up @@ -703,4 +697,8 @@ public String bits() {

public Apfloat toApfloat() { return new MyApfloat(bits(), 2).toRadix(10);}

public int signum() {
return digits.signum();
}

}
Loading

0 comments on commit fc9e4c2

Please sign in to comment.