mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-09-15 19:10:41 -04:00
--User changes
-Allow for pausing the renderer in the main window. This makes is more efficient when entering many parameters, such as when following a tutorial. -Add support for new variations: erf, gamma, jac_cn, jac_dn, jac_sn, logDB, pressure_wave, pRose3D, splits3D, w, waves2b, x, xerf, y, z. -Inform user of the start and stop of file parsing in EmberAnimate because the files could potentially be very large. -Move the follwing fields to a new table called Animation: Interpolation, Affine Interpolation, Temporal Samples, Temporal Filter Width, Temporal Filter Type. -These currently have no effect on the interactive renderer and instead are used when running flames through EmberGenome to generate sequences, and then animating them in Fractorium or EmberAnimate. -Add new parameter overrides for EmberRender and EmberAnimate which directly assign values to all flames being rendered, rather than scale: --quality --demin --demax --Bug fixes -Left pad instead of right pad names of sequence outputs from EmberGenome. -Unique file naming was broken for files which already had an underscore in them. -Properly report that png is the default format of EmberRender and EmberAnimate output instead of erroneously claiming it was jpg. -Make command line programs search these folders in this order for the palette file: ./ ~/.fractorium ~/.config/fractorium /usr/share/fractorium /usr/local/share/fractorium -Fix possible bad values in hexes. -Better assignment of Z variables. -Fix boarders due to use of poorly implemented rint() function from flam3. Use std::rint() now. -wedge_sph was completely wrong due to having accidentally swapped the mapping of two parameters. -Make juliascope juliascope_power parameter be of type REAL_NONZERO since it's used as a denominator. -Make Z assignment compatible with the originals in: -arch, bcircle, bCollide, bent, bent2, bisplit, blob, blur_linear, blur_square, bMod, boarders, boarders2, bSwirl, bTransform, butterfly, cardioid, cell, circleblur, circlize, circlize2, circus, collideoscope, cos, cosine, cosh, coth, cpow, cpow2, crescents, cropn, csc, csch, curl, curve, dc_gridout, deltaa, diamond, disc2, eclipse, eCollide, edisc, eJulia, elliptic, eMod, eMotion, ennepers, epispiral, ePush, eRotate, eScale, eSwirl, ex, exp, expo, exponential, fan, fdisc, fibonacci, fibonacci2, fisheye, flipcircle, flipy, flower, flux, funnel, glynnia, GlynnSim1, GlynnSim2, GlynnSim3, gridout, handkerchief, heart, hole, idisc, julia, julian2, juliaNab, kaleidoscope, lazyTravis, Lissajous, mask, MobiusN, mobius_strip, modulus, murl, murl2, npolar, ortho, oscilloscope, parabola, perspective, petal, phoenix_julia, pie (was also inconsistent between cpu and gpu), poincare, popcorn, popcorn2, power, pow_block, rational3, rays, rblur, rings, rippled, roundspher, sec, secant2, sigmoid, sin, sineblur, sinh, sinusgrid, sphericaln, spiralwing, spirograph, split, squarize, squirrel, squish, sschecks, starblur, stripes, stwin, super_shape, tan, tancos, tangent, tanh, TwinTrian, twoface, unpolar, waves, wavesn, wedge_julia, whorl, xheart, zblur, zscale. --Code changes -Generalize Variation::PrecalcHelper() and rename to PrePostPrecalcHelper(). --Do the same for the OpenCL version and rename it PrePostPrecalcOpenCLString(). -Rename Variation::m_AssignType to m_PrePostAssignType since it's only relevant to pre/post variations.
This commit is contained in:
@ -255,7 +255,7 @@ public:
|
||||
if (pmq.x == 0 && pmq.y == 0)
|
||||
return 1;
|
||||
|
||||
return 2 * ((u.x - q.x) * pmq.x + (u.y - q.y) * pmq.y) / (SQR(pmq.x) + SQR(pmq.y));
|
||||
return 2 * ((u.x - q.x) * pmq.x + (u.y - q.y) * pmq.y) / Zeps(SQR(pmq.x) + SQR(pmq.y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -279,6 +279,99 @@ public:
|
||||
return ratiomax;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used in the jac_* variations.
|
||||
/// </summary>
|
||||
static void JacobiElliptic(T uu, T emmc, T& sn, T& cn, T& dn)
|
||||
{
|
||||
//Code is taken from IROIRO++ library,
|
||||
//released under CC share-alike license.
|
||||
//Less accurate for faster rendering (still very precise).
|
||||
T const CA = T(0.0003);//The accuracy is the square of CA.
|
||||
T a, b, c, d, em[13], en[13];
|
||||
int bo;
|
||||
int l;
|
||||
int ii;
|
||||
int i;
|
||||
T emc = emmc;
|
||||
T u = uu;
|
||||
|
||||
if (emc != 0)
|
||||
{
|
||||
bo = 0;
|
||||
|
||||
if (emc < 0)
|
||||
bo = 1;
|
||||
|
||||
if (bo != 0)
|
||||
{
|
||||
d = 1 - emc;
|
||||
emc = -emc / d;
|
||||
d = std::sqrt(d);
|
||||
u = d * u;
|
||||
}
|
||||
|
||||
a = 1;
|
||||
dn = 1;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
l = i;
|
||||
em[i] = a;
|
||||
emc = std::sqrt(emc);
|
||||
en[i] = emc;
|
||||
c = T(0.5) * (a + emc);
|
||||
|
||||
if (std::abs(a - emc) <= CA * a)
|
||||
break;
|
||||
|
||||
emc = a * emc;
|
||||
a = c;
|
||||
}
|
||||
|
||||
u = c * u;
|
||||
sincos(u, &sn, &cn);
|
||||
|
||||
if (sn != 0)
|
||||
{
|
||||
a = cn / sn;
|
||||
c = a * c;
|
||||
|
||||
for (ii = l; ii >= 0; --ii)
|
||||
{
|
||||
b = em[ii];
|
||||
a = c * a;
|
||||
c = dn * c;
|
||||
dn = (en[ii] + a) / (b + a);
|
||||
a = c / b;
|
||||
}
|
||||
|
||||
a = 1 / std::sqrt(c * c + 1);
|
||||
|
||||
if (sn < 0)
|
||||
sn = -a;
|
||||
else
|
||||
sn = a;
|
||||
|
||||
cn = c * sn;
|
||||
}
|
||||
|
||||
if (bo != 0)
|
||||
{
|
||||
a = dn;
|
||||
dn = cn;
|
||||
cn = a;
|
||||
sn = sn / d;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cn = 1 / std::cosh(u);
|
||||
dn = cn;
|
||||
sn = std::tanh(u);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLETON_DERIVED_IMPL(VarFuncs<T>);
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user