iColorIndex.hint="Specifies the color to use. -1 means 'maxiter'. Parameter is used only if Inside-Coloring is set to <nnn>";
iColorIndex.default=1.0;
iColorIndex.min=-1.0;
iColorIndex.max=255.0;
bTruncate.caption="Truncate";
bTruncate.hint="If set, the resulting color index gets truncated to the nearest color index. Otherwise (i.e. normal behaviour of ChaosPro) the two neighboured colors would be interpolated.";
bTruncate.default=true;
iEpsCrossDistance.caption="Distance";
iEpsCrossDistance.hint="Valid only for epsilon cross coloring: Specifies the distance from the axis";
iEpsCrossDistance.default=0.01;
iEpsCrossDistance.min=0.0000000000000000001;
iEpsCrossDistance.max=100000;
}
}
Decomp(OUTSIDE) {
real lowestIter,range;
real z_angle;
parameter int iDecomp;
parameter int iLogmapSetting;
parameter bool bTruncate;
void final(void)
{
z_angle = atan2(z);
if (z_angle<0)
{
z_angle = z_angle + 2*pi;
}
if (iDecomp<256)
{
index = 1;
}
else
{
index = 0;
}
if (bTruncate)
{
index = index + (z_angle * (iDecomp - index)) / (2 * pi);
}
else
{
index = index + trunc((z_angle * iDecomp) / (2 * pi));
}
if (iLogmapSetting != 0 && index > maxiter)
{
index = maxiter;
}
if (iLogmapSetting>0)
{
// iLogmapSetting=1 ==> Standard logmap, >1 ==> Standard logmap, but starting at iteration count <iLogmapSetting>
if (iLogmapSetting>1)
{
lowestIter = iLogmapSetting;
}
else
{
lowestIter = 0;
}
// Lets initialize a helper variable for the available range (from lowestIter upto maxiter)
// In order to avoid math errors, let us restrict lowestIter to a value smaller than maxiter...
iDecomp.hint = "This is the Decomp Option parameter in Fractint.";
iDecomp.default = 256;
iDecomp.min = 0;
iDecomp.max = 256;
iLogmapSetting.caption = "Log Palette";
iLogmapSetting.hint = "Imitates the Log Palette value in Fractint. 0=no, 1=yes, -1=old, +n=cmprsd, -n=sqrt.";
iLogmapSetting.default = 0;
bTruncate.caption="Truncate";
bTruncate.hint="If set, the resulting color index gets truncated to the nearest color index. Otherwise (i.e. normal behaviour of ChaosPro) the two neighboured colors would be interpolated.";
bTruncate.default=true;
}
}
Outside(OUTSIDE) {
bool bSkip;
real lowestIter,range;
parameter int iOutside;
parameter real iColorIndex;
parameter bool bTruncate;
parameter bool bRestrict;
parameter int iLogmapSetting;
parameter real rBiomorphSetting;
parameter real rBailoutValue;
void final(void)
{
bSkip= (iOutside==1);
index=1+numiter;
// iOutside: 0 ==> <nnn>
// 1 ==> iter^
// 2 ==> real
// 3 ==> imag
// 4 ==> mult
// 5 ==> mult
// 6 ==> summ
// 7 ==> atan
if (iOutside==2)
{
if (bTruncate)
{
index=index+7+trunc(real(z));
}
else
{
index=index+7+real(z);
}
}
else if (iOutside==3)
{
if (bTruncate)
{
index=index+7+trunc(imag(z));
}
else
{
index=index+7+imag(z);
}
}
else if (iOutside==4)
{
if (bTruncate)
{
index=trunc(index*real(z)*imag(z));
}
else
{
index=index*real(z)*imag(z);
}
}
else if (iOutside==5)
{
if (bTruncate)
{
index=index+trunc(real(z)+imag(z));
}
else
{
index=index+real(z)+imag(z);
}
}
else if (iOutside==6)
{
if (bTruncate)
{
index=trunc(abs(atan2(z)*180/pi));
}
else
{
index=abs(atan2(z)*180/pi);
}
}
if (rBiomorphSetting>=0 && ( abs(real(z))<=sqrt(rBailoutValue) || abs(imag(z))<=sqrt(rBailoutValue) ) )
{
index = rBiomorphSetting;
bSkip = false;
}
if (bRestrict)
{
if (index<0 || index>maxiter)
{
index = 0;
}
}
if (iOutside==0)
{
index=iColorIndex;
}
else
{
if (iLogmapSetting>0)
{
// iLogmapSetting=1 ==> Standard logmap, >1 ==> Standard logmap, but starting at iteration count <iLogmapSetting>
if (iLogmapSetting>1)
{
lowestIter = iLogmapSetting;
}
else
{
lowestIter = 0;
}
// Lets initialize a helper variable for the available range (from lowestIter upto maxiter)
// In order to avoid math errors, let us restrict lowestIter to a value smaller than maxiter...
iColorIndex.hint="Specifies the color to use. Parameter is used only if Outside-Coloring is set to <nnn>";
iColorIndex.default=1;
iColorIndex.min=0;
iColorIndex.max=255;
bTruncate.caption="Truncate";
bTruncate.hint="If set, the resulting color index gets truncated to the nearest color index. Otherwise (i.e. normal behaviour of ChaosPro) the two neighboured colors would be interpolated.";
bTruncate.default=true;
bRestrict.caption="Cut Colors";
bRestrict.hint="If set, the resulting index value is restricted to 0..maxiter: If it falls outside, it is set to 0 or maxiter.";
bRestrict.default=true;
iLogmapSetting.caption = "Log Palette";
iLogmapSetting.hint = "Imitates the Log Palette value in Fractint. 0=no, 1=yes, -1=old, +n=cmprsd, -n=sqrt.";
iLogmapSetting.default = 0;
rBiomorphSetting.caption = "Biomorph Color";
rBiomorphSetting.hint = "Reconstructs the biomorph option from FractInt. -1 turns biomorph coloring off (default). A color value (0..255) turns it on using the specified color.";
rBiomorphSetting.default = -1;
rBiomorphSetting.min = -1;
rBiomorphSetting.max = 255;
rBailoutValue.caption = "Biomorph Bailout";
rBailoutValue.hint = "Lets you specify the bailout value used with the biomorph option. Should be set to match to standard bailout value, but may be changed for some reason...";