xforms for Chaotica
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="frank_bride">
<node name="input_params">
<real name="frank_bride">1</real>
<real name="frank_bride_power">2</real>
<real name="frank_bride_dist">1</real>
<real name="frank_bride_a">1</real>
<real name="frank_bride_b">0</real>
<real name="frank_bride_c">0</real>
<real name="frank_bride_d">1</real>
<real name="frank_bride_e">0</real>
<real name="frank_bride_f">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="power" />
<real name="dist" />
<real name="a" />
<real name="b" />
<real name="c" />
<real name="d" />
<real name="e" />
<real name="f" />
</node>
<int name="num_unit_randoms">3</int>
<string name="winter_init_function">
<![CDATA[
frank_bride_init_result(frank_bride, frank_bride_power, frank_bride_dist / frank_bride_power * 0.5,
frank_bride_a, frank_bride_b, frank_bride_c, frank_bride_d,
frank_bride_e, frank_bride_f)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = quartpi() * p_in.x
y = quartpi() * p_in.y
sechsin = sin(y)
sechcos = cos(y)
sechsinh = sinh(x)
sechcosh = cosh(x)
sechden = 2.0 / (cos(2.0 * y) + cosh(2.0 * x))
sx = (sechcos * sechcosh) * sechden
sy = (sechsin * sechsinh) * sechden
x2 = a * sx + b * sy + e
y2 = c * sx + d * sy + f
root = truncateToInt(abs(power) * unit_rnd_0)
a = (atan2(y2, x2) + toReal(root) * twopi()) / power
r = weight * pow(x2 * x2 + y2 * y2, dist)
in
vec2(sin(a), cos(a)) * r
]]>
</string>
</transform_def>
</user_transforms>