Skip to content

Commit

Permalink
Corrected julian and outcolorfun
Browse files Browse the repository at this point in the history
  • Loading branch information
PC-SUMMO\Michele Summo committed May 17, 2022
1 parent 3af3414 commit c661821
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/sffe/sffe_cmplx_gsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,15 +681,20 @@ sfarg *sftwave(sfarg *const p)
sfarg *sfjulian(sfarg *const p)
{
gsl_complex z = sfvalue(sfaram3(p));
double mag = gsl_complex_abs(
gsl_complex_pow(z, sfvalue(sfaram2(p))));
gsl_complex m;
GSL_SET_COMPLEX(&m, gsl_complex_abs(z), 0);
m = gsl_complex_pow(m, sfvalue(sfaram2(p)));
gsl_complex b = sfvalue(sfaram1(p));
double mx = GSL_REAL(m);
double my = GSL_IMAG(m);
double arg = gsl_complex_arg(z);
double byg = exp(-GSL_IMAG(b)*arg);
double bxg = arg * GSL_REAL(b);
double cosbxg = cos(bxg);
double sinbxg = sin(bxg);

GSL_REAL(sfvalue(p)) = mag * byg * cos(bxg);
GSL_IMAG(sfvalue(p)) = mag * byg * sin(bxg);
GSL_REAL(sfvalue(p)) = byg*(mx*cosbxg - my*sinbxg);
GSL_IMAG(sfvalue(p)) = byg*(my*cosbxg + mx*sinbxg);
return sfaram3(p);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui-hlp/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ void uih_registermenus_i18n(void)
uih_setincolorfun, uih_numdialog);
MENUDIALOG_I("fractal", NULL, TR("Menu", "Outside coloring speed function"),
"outcolorfun", MENUFLAG_NOMENU | MENUFLAG_INTERRUPT,
uih_setoutcolorfun, uih_fpdialog);
uih_setoutcolorfun, uih_numdialog);
MENUDIALOG_I("fractal", NULL, TR("Menu", "Inside coloring speed"),
"incolorspeed", MENUFLAG_NOMENU | MENUFLAG_INTERRUPT,
uih_setincolorspeed, uih_fpdialog);
Expand Down

0 comments on commit c661821

Please sign in to comment.