mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-08 05:50:07 -05:00
Merged mfeemster/fractorium into master
This commit is contained in:
commit
926578ec76
@ -2,7 +2,7 @@
|
|||||||
%define buildroot %{_topdir}/BUILDROOT
|
%define buildroot %{_topdir}/BUILDROOT
|
||||||
|
|
||||||
Name: Fractorium
|
Name: Fractorium
|
||||||
Version: 1.0.0.16
|
Version: 1.0.0.17
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: A fractal flame editor with GPU support
|
Summary: A fractal flame editor with GPU support
|
||||||
|
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
1.0.0.17 6/24/2019
|
||||||
|
--User changes
|
||||||
|
-Add hex_modulus, inkdrop, Truchet_hex_crop and Truchet_hex_fill variations.
|
||||||
|
-Remove "Current" option for xform selection options. Now only Selected and All are available. If none are explicitly selected, it defaults to current being selected.
|
||||||
|
-Prevent mouse scrolling when panning the image with the middle mouse button down.
|
||||||
|
|
||||||
|
--Bug fixes
|
||||||
|
-Prevent the minus key from changing the current xform when being pressed in a textbox or spinner.
|
||||||
|
-Fix xform selection logic to prevent selecting hidden pre and post xforms.
|
||||||
|
|
||||||
1.0.0.16 6/03/2019
|
1.0.0.16 6/03/2019
|
||||||
--User changes:
|
--User changes:
|
||||||
-Allow changes which do not trigger a full render to be added to the undo list.
|
-Allow changes which do not trigger a full render to be added to the undo list.
|
||||||
|
@ -8,7 +8,7 @@ Homepage: http://fractorium.com/
|
|||||||
Vcs-Git: https://bitbucket.org/mfeemster/fractorium
|
Vcs-Git: https://bitbucket.org/mfeemster/fractorium
|
||||||
Vcs-Browser: https://bitbucket.org/mfeemster/fractorium
|
Vcs-Browser: https://bitbucket.org/mfeemster/fractorium
|
||||||
Package: Fractorium
|
Package: Fractorium
|
||||||
Version: 1.0.0.16
|
Version: 1.0.0.17
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Description: A fractal flame editor with GPU support
|
Description: A fractal flame editor with GPU support
|
||||||
Fractorium
|
Fractorium
|
||||||
|
10
README.md
10
README.md
@ -9,11 +9,11 @@ of the cuburn algorithm in OpenCL.
|
|||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
Download: [Fractorium_1.0.0.16.msi](https://drive.google.com/open?id=1FY43J-NbiaOIqgspGJDugFqVjan43xAl)
|
Download: [Fractorium_1.0.0.17.msi](https://drive.google.com/open?id=1xR7rPFcVvPMhh_n9v5JZ9-QUi7ktF7Qj)
|
||||||
|
|
||||||
## Mac
|
## Mac
|
||||||
|
|
||||||
Download: [Fractorium_1.0.0.16.dmg](https://drive.google.com/open?id=1Jbwkg53ncjFaQhBYnRrXykyUDEao5mra)
|
Download: [Fractorium_1.0.0.17.dmg](https://drive.google.com/open?id=17UjkEBObj_rHRV8DCi1y3CDDONUZSxq_)
|
||||||
|
|
||||||
## Linux
|
## Linux
|
||||||
|
|
||||||
@ -37,16 +37,16 @@ sudo apt-get install fractorium
|
|||||||
|
|
||||||
Install ubuntu.
|
Install ubuntu.
|
||||||
|
|
||||||
Download: [Fractorium-1.0.0.16-.x86_64.deb](https://drive.google.com/open?id=14EJv5zKt6iohgTOT8J0AIyi8u1NIM_v5)
|
Download: [Fractorium-1.0.0.17.x86_64.deb](https://drive.google.com/open?id=1aYJ5XC58XPyFA-u-HuApLH4v9hFhf3oG)
|
||||||
|
|
||||||
```
|
```
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
sudo dpkg -i Fractorium-1.0.0.16-.x86_64.deb
|
sudo dpkg -i Fractorium-1.0.0.17.x86_64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install from App Image .rpm
|
### Install from App Image .rpm
|
||||||
|
|
||||||
Download: [Fractorium-1.0.0.16.x86_64.rpm](https://drive.google.com/open?id=1nzvIJ6gc7uAk6zubTPy4NIuMWCnCC2dx)
|
Download: [Fractorium-1.0.0.17.x86_64.rpm](https://drive.google.com/open?id=18LVDl5UYMGodvF1TjClGn-0HulgX6vhB)
|
||||||
|
|
||||||
# Building from git
|
# Building from git
|
||||||
|
|
||||||
|
@ -5026,7 +5026,7 @@ public:
|
|||||||
<< "\t\treal_t t;\n"
|
<< "\t\treal_t t;\n"
|
||||||
<< "\t\treal_t pt = " << perturbation << " * sin(" << tpf2 << " * vIn.y);\n"
|
<< "\t\treal_t pt = " << perturbation << " * sin(" << tpf2 << " * vIn.y);\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\tif (!" << damping << ")\n"
|
<< "\t\tif (" << damping << " == 0)\n"
|
||||||
<< "\t\t t = fma(" << amplitude << ", cos(fma(" << tpf << ", vIn.x, pt)), " << separation << ");\n"
|
<< "\t\t t = fma(" << amplitude << ", cos(fma(" << tpf << ", vIn.x, pt)), " << separation << ");\n"
|
||||||
<< "\t\telse\n"
|
<< "\t\telse\n"
|
||||||
<< "\t\t t = fma(" << amplitude << ", exp(-fabs(vIn.x) * " << damping << ") * cos(fma(" << tpf << ", vIn.x, pt)), " << separation << ");\n"
|
<< "\t\t t = fma(" << amplitude << ", exp(-fabs(vIn.x) * " << damping << ") * cos(fma(" << tpf << ", vIn.x, pt)), " << separation << ");\n"
|
||||||
|
@ -2360,7 +2360,7 @@ public:
|
|||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\tif (rad > " << out << " || rad < " << in << ")\n"
|
<< "\t\tif (rad > " << out << " || rad < " << in << ")\n"
|
||||||
<< "\t\t{\n"
|
<< "\t\t{\n"
|
||||||
<< "\t\t if (!" << zero << ")\n"
|
<< "\t\t if (" << zero << " == 0)\n"
|
||||||
<< "\t\t {\n"
|
<< "\t\t {\n"
|
||||||
<< "\t\t s = sin(ang) * " << outweight << ";\n"
|
<< "\t\t s = sin(ang) * " << outweight << ";\n"
|
||||||
<< "\t\t c = cos(ang) * " << outweight << ";\n"
|
<< "\t\t c = cos(ang) * " << outweight << ";\n"
|
||||||
|
@ -1581,7 +1581,7 @@ public:
|
|||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\tbool add = true;\n"
|
<< "\t\tbool add = true;\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\tif (" << seed << " == 1)\n"
|
<< "\t\tif (" << seed << " == (real_t)(1.0))\n"
|
||||||
<< "\t\t{\n"
|
<< "\t\t{\n"
|
||||||
<< "\t\t if (!((int)rx & 1) && !((int)rz & 1))\n"
|
<< "\t\t if (!((int)rx & 1) && !((int)rz & 1))\n"
|
||||||
<< "\t\t add = false;\n"
|
<< "\t\t add = false;\n"
|
||||||
@ -1861,7 +1861,7 @@ public:
|
|||||||
<< "\t\treal_t y0 = sin(angle2);\n"
|
<< "\t\treal_t y0 = sin(angle2);\n"
|
||||||
<< "\t\treal_t dist = sqrt(Sqr(FX - x0) + Sqr(FY - y0));\n"
|
<< "\t\treal_t dist = sqrt(Sqr(FX - x0) + Sqr(FY - y0));\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\tif (" << inv << ")\n"
|
<< "\t\tif (" << inv << " != (real_t)(0.0))\n"
|
||||||
<< "\t\t{\n"
|
<< "\t\t{\n"
|
||||||
<< "\t\t if ((dist > " << d1precalc << ") || (dist < " << d2precalc << "))\n"
|
<< "\t\t if ((dist > " << d1precalc << ") || (dist < " << d2precalc << "))\n"
|
||||||
<< "\t\t {\n"
|
<< "\t\t {\n"
|
||||||
@ -3007,11 +3007,12 @@ public:
|
|||||||
f = f - int_angle;
|
f = f - int_angle;
|
||||||
T x = f * m_Length;
|
T x = f * m_Length;
|
||||||
T z = std::sqrt(1 + SQR(x) - 2 * x * m_CosAlpha);
|
T z = std::sqrt(1 + SQR(x) - 2 * x * m_CosAlpha);
|
||||||
|
int iangle = int(int_angle);
|
||||||
|
|
||||||
if (!(((int)int_angle) & 1))
|
if (!(iangle & 1))
|
||||||
int_angle = m_2piOverPower * (((int)int_angle) / 2) + std::asin(m_SinAlpha * x / Zeps(z));
|
int_angle = m_2piOverPower * (iangle / 2) + std::asin(m_SinAlpha * x / Zeps(z));
|
||||||
else
|
else
|
||||||
int_angle = m_2piOverPower * (((int)int_angle) / 2) - std::asin(m_SinAlpha * x / Zeps(z));
|
int_angle = m_2piOverPower * (iangle / 2) - std::asin(m_SinAlpha * x / Zeps(z));
|
||||||
|
|
||||||
z *= std::sqrt(rand.Frand01<T>());
|
z *= std::sqrt(rand.Frand01<T>());
|
||||||
by = std::sin(int_angle - T(M_PI_2));
|
by = std::sin(int_angle - T(M_PI_2));
|
||||||
@ -3056,11 +3057,12 @@ public:
|
|||||||
<< "\t\t f = f - int_angle;\n"
|
<< "\t\t f = f - int_angle;\n"
|
||||||
<< "\t\t real_t x = f * " << length << ";\n"
|
<< "\t\t real_t x = f * " << length << ";\n"
|
||||||
<< "\t\t real_t z = sqrt(1 + SQR(x) - 2 * x * " << cosalpha << ");\n"
|
<< "\t\t real_t z = sqrt(1 + SQR(x) - 2 * x * " << cosalpha << ");\n"
|
||||||
|
<< "\t\t int iangle = (int)int_angle;\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\t if (!(((int)int_angle) & 1))\n"
|
<< "\t\t if (!(iangle & 1))\n"
|
||||||
<< "\t\t int_angle = " << twopioverpower << " * (((int)int_angle) / 2) + asin(" << sinalpha << " * x / Zeps(z));\n"
|
<< "\t\t int_angle = " << twopioverpower << " * (iangle / 2) + asin(" << sinalpha << " * x / Zeps(z));\n"
|
||||||
<< "\t\t else\n"
|
<< "\t\t else\n"
|
||||||
<< "\t\t int_angle = " << twopioverpower << " * (((int)int_angle) / 2) - asin(" << sinalpha << " * x / Zeps(z));\n"
|
<< "\t\t int_angle = " << twopioverpower << " * (iangle / 2) - asin(" << sinalpha << " * x / Zeps(z));\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\t z *= sqrt(MwcNext01(mwc));\n"
|
<< "\t\t z *= sqrt(MwcNext01(mwc));\n"
|
||||||
<< "\t\t by = sin(int_angle - MPI2);\n"
|
<< "\t\t by = sin(int_angle - MPI2);\n"
|
||||||
@ -3155,11 +3157,12 @@ public:
|
|||||||
f = f - int_angle;
|
f = f - int_angle;
|
||||||
T x = f * m_Length;
|
T x = f * m_Length;
|
||||||
T z = std::sqrt(1 + SQR(x) - 2 * x * std::cos(m_Alpha));
|
T z = std::sqrt(1 + SQR(x) - 2 * x * std::cos(m_Alpha));
|
||||||
|
int iangle = int(int_angle);
|
||||||
|
|
||||||
if (!(((int)int_angle) & 1))
|
if (!(iangle & 1))
|
||||||
int_angle = m_2piOverPower * (((int)int_angle) / 2) + std::asin(std::sin(m_Alpha) * x / Zeps(z));
|
int_angle = m_2piOverPower * (iangle / 2) + std::asin(std::sin(m_Alpha) * x / Zeps(z));
|
||||||
else
|
else
|
||||||
int_angle = m_2piOverPower * (((int)int_angle) / 2) - std::asin(std::sin(m_Alpha) * x / Zeps(z));
|
int_angle = m_2piOverPower * (iangle / 2) - std::asin(std::sin(m_Alpha) * x / Zeps(z));
|
||||||
|
|
||||||
z *= std::sqrt(rand.Frand01<T>());
|
z *= std::sqrt(rand.Frand01<T>());
|
||||||
by = std::sin(int_angle - T(M_PI_2));
|
by = std::sin(int_angle - T(M_PI_2));
|
||||||
@ -3209,11 +3212,12 @@ public:
|
|||||||
<< "\t\t f = f - int_angle;\n"
|
<< "\t\t f = f - int_angle;\n"
|
||||||
<< "\t\t real_t x = f * " << length << ";\n"
|
<< "\t\t real_t x = f * " << length << ";\n"
|
||||||
<< "\t\t real_t z = sqrt(1 + SQR(x) - 2 * x * cos(" << alpha << "));\n"
|
<< "\t\t real_t z = sqrt(1 + SQR(x) - 2 * x * cos(" << alpha << "));\n"
|
||||||
|
<< "\t\t int iangle = (int)int_angle;\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\t if (!(((int)int_angle) & 1))\n"
|
<< "\t\t if (!(iangle & 1))\n"
|
||||||
<< "\t\t int_angle = " << twopioverpower << " * (((int)int_angle) / 2) + asin(sin(" << alpha << ") * x / Zeps(z));\n"
|
<< "\t\t int_angle = " << twopioverpower << " * (iangle / 2) + asin(sin(" << alpha << ") * x / Zeps(z));\n"
|
||||||
<< "\t\t else\n"
|
<< "\t\t else\n"
|
||||||
<< "\t\t int_angle = " << twopioverpower << " * (((int)int_angle) / 2) - asin(sin(" << alpha << ") * x / Zeps(z));\n"
|
<< "\t\t int_angle = " << twopioverpower << " * (iangle / 2) - asin(sin(" << alpha << ") * x / Zeps(z));\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\t\t z *= sqrt(MwcNext01(mwc));\n"
|
<< "\t\t z *= sqrt(MwcNext01(mwc));\n"
|
||||||
<< "\t\t by = sin(int_angle - MPI2);\n"
|
<< "\t\t by = sin(int_angle - MPI2);\n"
|
||||||
|
@ -736,6 +736,38 @@ bool SearchVar(const Variation<T>* var, const vector<string>& stringVec, bool ma
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool SearchVarWWO(const Variation<T>* var, const vector<string>& withVec, const vector<string>& withoutVec)
|
||||||
|
{
|
||||||
|
bool ret = false;
|
||||||
|
size_t i, j, k;
|
||||||
|
bool onegood = false;
|
||||||
|
auto cl = var->OpenCLFuncsString() + "\n" + var->OpenCLString();
|
||||||
|
vector<string> clsplits = Split(cl, '\n');
|
||||||
|
|
||||||
|
for (i = 0; i < clsplits.size(); i++)
|
||||||
|
{
|
||||||
|
for (j = 0; j < withVec.size(); j++)
|
||||||
|
{
|
||||||
|
if (clsplits[i].find(withVec[j]) != std::string::npos)
|
||||||
|
{
|
||||||
|
for (k = 0; k < withoutVec.size(); k++)
|
||||||
|
{
|
||||||
|
if (clsplits[i].find(withoutVec[k]) != std::string::npos)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onegood = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return onegood;
|
||||||
|
//return i == clsplits.size() && j == withVec.size() && k == withoutVec.size();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find all variations whose OpenCL string contains any of the search strings in stringVec.
|
/// Find all variations whose OpenCL string contains any of the search strings in stringVec.
|
||||||
/// This is useful for finding variations with certain characteristics since it's not possible
|
/// This is useful for finding variations with certain characteristics since it's not possible
|
||||||
@ -766,6 +798,23 @@ static vector<const Variation<T>*> FindVarsWith(const vector<const Variation<T>*
|
|||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static vector<const Variation<T>*> FindVarsWithWithout(const vector<const Variation<T>*>& vars, const vector<string>& withVec, const vector<string>& withoutVec)
|
||||||
|
{
|
||||||
|
vector<const Variation<T>*> vec;
|
||||||
|
auto vl = VariationList<T>::Instance();
|
||||||
|
|
||||||
|
for (auto& v : vars)
|
||||||
|
{
|
||||||
|
if (SearchVarWWO<T>(v, withVec, withoutVec))
|
||||||
|
{
|
||||||
|
vec.push_back(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vec;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find all variations whose OpenCL string does not contain any of the search strings in stringVec.
|
/// Find all variations whose OpenCL string does not contain any of the search strings in stringVec.
|
||||||
/// This is useful for finding variations without certain characteristics since it's not possible
|
/// This is useful for finding variations without certain characteristics since it's not possible
|
||||||
|
@ -1585,21 +1585,26 @@ void TestOperations()
|
|||||||
|
|
||||||
void TestArbitrary()
|
void TestArbitrary()
|
||||||
{
|
{
|
||||||
vector<string> stringVec;
|
vector<string> stringVec, withoutVec;
|
||||||
auto varList = VariationList<float>::Instance();
|
auto varList = VariationList<float>::Instance();
|
||||||
auto& vars = varList->AllVars();
|
auto& vars = varList->AllVars();
|
||||||
stringVec.push_back(" = vIn.x - ");
|
stringVec.push_back("if (!");
|
||||||
stringVec.push_back(" = vIn.y - ");
|
withoutVec.push_back("=");
|
||||||
stringVec.push_back("sqrt(");
|
withoutVec.push_back("<");
|
||||||
stringVec.push_back("atan2(");
|
withoutVec.push_back(">");
|
||||||
stringVec.push_back("sin(");
|
//stringVec.push_back(" = vIn.x - ");
|
||||||
stringVec.push_back("cos(");
|
//stringVec.push_back(" = vIn.y - ");
|
||||||
|
//stringVec.push_back("sqrt(");
|
||||||
|
//stringVec.push_back("atan2(");
|
||||||
|
//stringVec.push_back("sin(");
|
||||||
|
//stringVec.push_back("cos(");
|
||||||
//stringVec.push_back("sincos(");
|
//stringVec.push_back("sincos(");
|
||||||
auto varVec = FindVarsWith<float>(vars, stringVec, true, true);
|
//auto varVec = FindVarsWith<float>(vars, stringVec, true, true);
|
||||||
|
auto varVec = FindVarsWithWithout<float>(vars, stringVec, withoutVec);
|
||||||
|
|
||||||
for (auto& it : varVec)
|
for (auto& it : varVec)
|
||||||
{
|
{
|
||||||
cout << "Variation " << it->Name() << " contained the desired strings." << endl;
|
cout << "Variation " << it->Name() << " contained the desired w/wo strings." << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,10 +404,11 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
|||||||
}
|
}
|
||||||
else if (o == this)
|
else if (o == this)
|
||||||
{
|
{
|
||||||
|
auto focusedctrlEdit = dynamic_cast<QLineEdit*>(this->focusWidget());
|
||||||
auto focusedctrlSpin = dynamic_cast<QSpinBox*>(this->focusWidget());
|
auto focusedctrlSpin = dynamic_cast<QSpinBox*>(this->focusWidget());
|
||||||
auto focusedctrlDbSpin = dynamic_cast<QDoubleSpinBox*>(this->focusWidget());
|
auto focusedctrlDblSpin = dynamic_cast<QDoubleSpinBox*>(this->focusWidget());
|
||||||
|
|
||||||
if (!focusedctrlSpin && !focusedctrlDbSpin)//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform.
|
if (!focusedctrlEdit && !focusedctrlSpin && !focusedctrlDblSpin)//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform.
|
||||||
{
|
{
|
||||||
unsigned int index = combo->currentIndex();
|
unsigned int index = combo->currentIndex();
|
||||||
|
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
fractorium (1.0.0.17-0ubuntu1) bionic; urgency=low
|
||||||
|
|
||||||
|
* release 1.0.0.17
|
||||||
|
|
||||||
|
-- Matt Feemster <matt.feemster@gmail.com> Mon, 24 Jun 2019 20:30:00 -0700
|
||||||
|
|
||||||
fractorium (1.0.0.16-0ubuntu1) bionic; urgency=low
|
fractorium (1.0.0.16-0ubuntu1) bionic; urgency=low
|
||||||
|
|
||||||
* release 1.0.0.16
|
* release 1.0.0.16
|
||||||
|
Loading…
Reference in New Issue
Block a user