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.

54 lines
1.5 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="squeeze_boqs">
<node name="input_params">
<real name="squeeze_boqs">1</real>
<real name="squeeze_boqs_power">2</real>
<real name="squeeze_boqs_dist">1</real>
<real name="squeeze_boqs_re">1</real>
<real name="squeeze_boqs_im">0</real>
<real name="squeeze_boqs_a">0</real>
<real name="squeeze_boqs_b">1</real>
<real name="squeeze_boqs_c">0</real>
<real name="squeeze_boqs_d">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="power" />
<real name="dist" />
<real name="re" />
<real name="im" />
<real name="ay" />
<real name="be" />
<real name="ci" />
<real name="de" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
squeeze_boqs_init_result(squeeze_boqs, squeeze_boqs_power * 2, squeeze_boqs_dist / squeeze_boqs_power * 0.5,
squeeze_boqs_re, squeeze_boqs_im,
squeeze_boqs_a, squeeze_boqs_b, squeeze_boqs_c, squeeze_boqs_d)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = (ay * p_in.x) + (p_in.y * be)
y = (ci * p_in.x) - (p_in.y * de)
root = truncateToInt(power * unit_rnd_0)
ca2 = complex(y, x) * complex(y, x)
are = ca2.re * re
aim = ca2.im * im
a = (atan2(are, aim) + toReal(root) * twopi()) / power
r = weight * pow(dot(p_in, p_in), dist)
in
vec2(cos(a), sin(a)) * r
]]>
</string>
</transform_def>
</user_transforms>