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.

44 lines
1.3 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="mathplaydough">
<!-- based on 'tanh' xform by cothe. and Tatasz, fucked with by Crystalize :D -->
<node name="input_params">
<real name="mathplaydough">1</real>
<real name="mathplaydough_x">1</real>
<real name="mathplaydough_y">0.5</real>
<real name="mathplaydough_z">5</real>
<real name="mathplaydough_a">1</real>
<real name="mathplaydough_b">20</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="ex" />
<real name="wy" />
<real name="ze" />
<real name="ay" />
<real name="be" />
</node>
<string name="winter_init_function">
<![CDATA[
mathplaydough_init_result(mathplaydough, mathplaydough_x, mathplaydough_y, mathplaydough_z, mathplaydough_a, mathplaydough_b)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = ex * pi() * (p_in.y / (1 / cos(p_in.x * ay))) / 2
y = wy * pi() * (p_in.x / (1 / sin(p_in.y * be))) / 2
tanhsin = sin(y)
tanhcos = cos(y)
tanhsinh = sinh(x)
tanhcosh = cosh(x)
tanhden = if ze > 0 then ze / (tanhcos + tanhcosh) * log(sqrt(ex / wy)) else ze * (tanhcos + tanhcosh)
in
vec2(tanhsinh, tanhsin) * (weight * tanhden)
]]>
</string>
</transform_def>
</user_transforms>