Skip to content

Commit

Permalink
gaussian int avg now interpolated like TIA
Browse files Browse the repository at this point in the history
  • Loading branch information
dbyrne committed Apr 2, 2010
1 parent dcfb609 commit 5fc99f8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions native-src/FractalMath/FractalMath.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ JNIEXPORT jintArray JNICALL Java_byrne_fractal_NativeLib_getFractalRow
index--;
}
}
} else if (alg == 7) {
} else if (alg == 7 || alg == 3) {
if (xsq + ysq > 40000) {
mu = (log(log(200)) - log(log(sqrt(xsq + ysq))))/log(power) + 1;
lessThanMax = 1;
Expand Down Expand Up @@ -371,7 +371,9 @@ JNIEXPORT jintArray JNICALL Java_byrne_fractal_NativeLib_getFractalRow
distance = minVal(distance,gaussianIntDist());
break;
case 3: //Gaussian Integer Average Distance
distance += gaussianIntDist();
distance1 = distance;
if (index > 0)
distance += gaussianIntDist();
break;
case 4: //Epsilon Cross Minimum Distance
distance = minVal(distance,epsilonCrossDist());
Expand All @@ -386,11 +388,12 @@ JNIEXPORT jintArray JNICALL Java_byrne_fractal_NativeLib_getFractalRow
}
}

if (alg==3) { //Gaussian Integer average
/* if (alg==3) { //Gaussian Integer average
values[row][col] = maxVal(1,(int)(((distance/(index+1))/(SQRT_OF_TWO/trapFactor))*10200));
minimum = minVal(minimum,values[row][col]);
} else if (alg==7) { //TIA
if (lessThanMax) {
}*/
if (alg==7 || alg==3) { //TIA
if (lessThanMax || alg == 3) {
distance1 = distance1/(index-1);
distance = distance/index;

Expand Down

0 comments on commit 5fc99f8

Please sign in to comment.