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.

39 lines
1.2 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="loonish_h">
<node name="input_params">
<real name="loonish_h">1</real>
<real name="loonish_h_b" minval="-1" maxval="1">1</real>
<real name="loonish_h_fuzzy" minval="0" maxval="1">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="b" />
<real name="scale" />
<real name="c" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
let
scale = (loonish_h * loonish_h_b) / halfpi()
in
loonish_h_init_result(loonish_h, loonish_h_b, scale, loonish_h_fuzzy)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = ((p_in.x * p_in.y) / weight * -1) / (dot(p_in, p_in) * scale) / if c > 0 then sinh(p_in.x / (unit_rnd_0 * twopi() * p_in.y)) * cosh(p_in.y / (unit_rnd_1 * twopi() * p_in.x)) * p_in.y else sin(p_in.x * p_in.y) * cos(p_in.x)
y = abs(dot(vec2(tanh((p_in.x * 2) * (p_in.y / 2)), p_in.y * 2), vec2(tanh((p_in.y * 2) * (p_in.y / 2)), p_in.x * 2)))
z = abs(sqrt(cosh(x) + sinh(y)) / twopi())
in
(p_in * z) + (p_in * (weight * -1))
]]>
</string>
</transform_def>
</user_transforms>