17 x = std::cos(x *
M_PI);
23 return 1.0 - 2.0 * std::abs(x - std::floor(x + 0.5));
28 constexpr qreal peakXOffset = 0.9;
29 constexpr qreal peakYOffset = 0.5;
30 x = x - std::floor(x);
31 return (x < peakXOffset ? 1.0 / peakXOffset * x : -1.0 / (1.0 - peakXOffset) * (x - 1.0)) * peakYOffset;
38 return std::sqrt(x * x + y * y) / M_SQRT2;
54 const qreal zOverSqrt2 = z / M_SQRT2;
55 const qreal zOverSqrt2Squared = zOverSqrt2 * zOverSqrt2;
56 if (z <= M_SQRT2 / 2.0) {
57 return M_PI * zOverSqrt2Squared;
59 return M_PI * zOverSqrt2Squared -
60 4.0 * (zOverSqrt2Squared * std::acos(M_SQRT2 / (2.0 * z)) -
61 0.5 * std::sqrt(zOverSqrt2Squared - 0.25));
67 return (
sin(x) +
sin(y)) / 2.;
76 return M_SQRT2 / 2.0 - std::sqrt(-(z - 0.5469) / 1.0938);
78 return (1.0 - M_SQRT2 / 2.0) + std::sqrt((z - (1.0 - 0.5469)) / 1.0938);
84 constexpr qreal aspectRatio = 1.25;
87 constexpr qreal factor = 0.625;
90 return std::sqrt(x * x + y * y) * factor;
105 constexpr qreal factor = 0.625;
106 constexpr qreal factorTimes2 = factor * 2.0;
107 const qreal zOverFactorTimes2 = z / factorTimes2;
108 const qreal zTimesPoint8OverFactorTimes2 = 0.8 * zOverFactorTimes2;
109 qreal result =
M_PI * zOverFactorTimes2 * zTimesPoint8OverFactorTimes2;
111 const qreal zOverFactorTimes2Squared = zOverFactorTimes2 * zOverFactorTimes2;
112 result -= 2.0 * (zOverFactorTimes2Squared * std::acos(factor / z) -
113 0.5 * std::sqrt(zOverFactorTimes2Squared - 0.25)) * 0.8;
116 const qreal zTimesPoint8OverFactorTimes2Squared =
117 zTimesPoint8OverFactorTimes2 * zTimesPoint8OverFactorTimes2;
118 result -= 2.0 * (zTimesPoint8OverFactorTimes2Squared * std::acos(factor / (0.8 * z)) -
119 0.5 * std::sqrt(zTimesPoint8OverFactorTimes2Squared - 0.25)) / 0.8;
144 const qreal z2 = z * z;
145 const qreal z3 = z * z2;
147 return 0.8795 * z3 + 0.1825 * z2 + 0.6649 * z + 0.0008;
148 }
else if (z <= 0.4) {
149 return 32.0507 * z3 - 30.3781 * z2 + 10.6756 * z - 1.0937;
150 }
else if (z <= 0.5) {
151 return 27.8089 * z3 - 39.4726 * z2 + 19.8992 * z - 3.0553;
152 }
else if (z <= 0.6) {
153 return 35.1490 * z3 - 55.6810 * z2 + 30.6244 * z - 5.2839;
154 }
else if (z <= 0.7) {
155 return 24.3210 * z3 - 50.1381 * z2 + 35.6452 * z - 7.9322;
157 return 0.7457 * z3 - 2.4792 * z2 + 3.3748 * z - 0.6402;
166 constexpr qreal ellipseRatioX = 0.4 / M_SQRT2;
167 constexpr qreal ellipseRatioY = 0.6 / M_SQRT2;
170 return std::sqrt(x * x + y * y) * M_SQRT2;
189 return -2.0 * z * z + 4.0 * z - 1.0;
257 return sin(y + x * x);
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const
qreal operator()(qreal x, qreal y) const