Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master with latest code #158

Conversation

PaulTheLionHeart
Copy link
Contributor

I have added a few fractals:

Mandelbrot derivatives: Burning ship, mandelbar and celtic.
Tierazon: Talis, newton apple, newton cross, newton polygon, nova, newton flower, newton variation and a few quartets.
Art Matrix: Cubic

The three Mandelbrot derivatives also have bigfloat versions.

Perturbation is applied to the three Mandelbrot derivatives, Mandelbrot itself and ManzPower where the exponent is an integer

Only perturbation and tierazon files now use ManpWIN's complex library
Cleanup some function names in tierazon.cpp
@PaulTheLionHeart
Copy link
Contributor Author

I only tested the merge on Windows code and don't know how to test the Linux version. The help files may need some work as per issue #159.

@@ -70,7 +70,7 @@

// routines in this module
static void perform_worklist();
static int potential(double, long);
int potential(double, long); // no longer static as it is called by perturbation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this declaration from calcfrac.cpp to calcfrac.h and delete the comment

@@ -1194,14 +1194,20 @@ static void perform_worklist()
boundary_trace();
break;
case 'g':
solid_guess();
if (g_calc_status != calc_status_value::COMPLETED) // horrible cludge preventing crash when

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark the comment with TODO so we can find it as a cleanup item later.

Always use {} to surround statements in control blocks (e.g. if, while, etc.) like this:

if (g_calc_status != calc_status_value::COMPLETED)
{
    solid_guess();
}

break;
case 'd':
diffusion_scan();
break;
case 'o':
sticky_orbits();
break;
case 'p':
if (bit_set (g_cur_fractal_specific->flags, fractal_flags::PERTURB)) // we already finished perturbation, so let's get outa here
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{} with control statements

@@ -2518,7 +2524,7 @@ static void decomposition()
// controlling the level and slope of the continuous potential
// surface. Returns color.
//
static int potential(double mag, long iterations)
int potential(double mag, long iterations) // no longer static as it is called by perturbation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the comment

@@ -0,0 +1,536 @@
// SPDX-License-Identifier: GPL-3.0-only
//
// Complex.cpp: interface for the Complex class.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the file (and header) to Complex.cpp from complex.cpp

The easiest way to do this is with git:

cd libid
git mv complex.cpp Complex.cpp
cd include
git mv complex.h Complex.h

temp.x = x;
temp.y = y;
temp1 = temp.CLog()*expon;
// x = temp1.x;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete all commented-out code throughout

x+=1;
return *this;
}
// end new stuff

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this comment

sin(x+iy) = sin(x)cosh(y) + icos(x)sinh(y)
***************************************************************************/

Complex Complex::CSin()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a free function instead of a member function and just named sin instead of CSin. Same for the other trig functions.

Always prefer a free (e.g. plain) function over a member function when possible.

{
Complex a;

a.x = sin(x) * cosh(y);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include <cmath> and qualify math functions with std::

(a + bi)^n = r^n(cos nθ + i sin nθ).

In particular, if n = ½, we have
√a + bi = √r [cos θ/2 + i sin θ/2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use only ASCII characters in source files. No unicode. This marks the file as binary and prevents diffing and merging. I explained this in an earlier email when I tried to rebase your branch, I believe.

This has probably 'tainted' this entire pull request because the file will be permanently marked as binary as-is. Maybe there's a way for a git guru to undo it, but what I saw when attempting to rebase your branch was that it was very difficult to undo this and honestly, I think it will be easier if you just create a new branch, remove the unicode BOM at the front of the file and remove all unicode characters before you add the file.

Because of this situation, I'm going to ask that you try recreating a branch without unicode in the source files and make a new pull request before I continue reviewing this one. This is a show stopper, unfortunately.

@PaulTheLionHeart
Copy link
Contributor Author

PaulTheLionHeart commented Nov 11, 2024 via email

@PaulTheLionHeart
Copy link
Contributor Author

PaulTheLionHeart commented Nov 11, 2024 via email

@PaulTheLionHeart
Copy link
Contributor Author

I have created a new pull request with a "fixed" Complex.cpp and a temporary fix for the help file issues: New Merge of Paul's files with master #160.

@LegalizeAdulthood
Copy link
Owner

Closing this pull request as it has been replaced by another attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants