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.

58 lines
1.5 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="frank_jr">
<node name="input_params">
<real name="frank_jr">1</real>
<real name="frank_jr_power">2</real>
<real name="frank_jr_dist">1</real>
<real name="frank_jr_a">1</real>
<real name="frank_jr_b">0</real>
<real name="frank_jr_c">0</real>
<real name="frank_jr_d">1</real>
<real name="frank_jr_e">0</real>
<real name="frank_jr_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_jr_init_result(frank_jr, frank_jr_power, frank_jr_dist / frank_jr_power * 0.5, frank_jr_a, frank_jr_b,
frank_jr_c, frank_jr_d, frank_jr_e, frank_jr_f)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x1 = quartpi() * p_in.x
y1 = quartpi() * p_in.y
sinhsin = sin(y1)
sinhcos = cos(y1)
sinhsinh = sinh(x1)
sinhcosh = cosh(x1)
sinh = vec2(sinhsinh * sinhcos, sinhcosh * sinhsin)
x2 = a * sinh.x + b * sinh.y + e
y2 = c * sinh.x + d * sinh.y + 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>