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.

56 lines
1.5 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="minha_menina">
<node name="input_params">
<real name="minha_menina">1</real>
<real name="minha_menina_im">1</real>
<real name="minha_menina_re">1</real>
<real name="minha_menina_im_rotate">0.5</real>
<real name="minha_menina_re_rotate">1</real>
<real name="minha_menina_ir_rotate">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="ex" />
<real name="wy" />
<real name="r1" />
<real name="r2" />
<real name="r3" />
</node>
<string name="winter_init_function">
<![CDATA[
minha_menina_init_result(minha_menina / 2, minha_menina_im, minha_menina_re,
minha_menina_im_rotate * pi(), minha_menina_re_rotate * pi(),
minha_menina_ir_rotate * pi())
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rotm1 = mat2x2(cos(r1), -sin(r1),
sin(r1), cos(r1))
rotm2 = mat2x2(cos(r2), -sin(r2),
sin(r2), cos(r2))
rotm3 = mat2x2(cos(r3), -sin(r3),
sin(r3), cos(r3))
cxy = complex(p_in.x, p_in.y)
rim = rotm1 * (vec2(cxy.im) * ex)
rre = rotm2 * (vec2(cxy.re) * wy)
mmout = (rim + rre)
mmor = (rotm3 * mmout)
rx = halfpi() * mmor.x
ry = halfpi() * mmor.y
tsin = sin(ry)
tcos = cos(ry)
tsinh = sinh(rx)
tcosh = cosh(rx)
tanhden = 1.0 / (tcos + tcosh)
in
vec2(tsinh, tsin) * (weight * tanhden)
]]>
</string>
</transform_def>
</user_transforms>