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
899 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="green">
<node name="input_params">
<real name="green">1</real>
<real name="green_a">1</real>
<real name="green_b">1</real>
<real name="green_c">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="a" />
<real name="b" />
<real name="c" />
</node>
<string name="winter_init_function">
<![CDATA[
green_init_result(green, green_a, green_b, green_c)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
p_len1 = length(p_in) * twopi()
p_len2 = length(p_in) * quartpi()
g = twopi() * tan(weight)
x1 = p_in.x / a
x2 = c * p_in.x
y1 = p_in.y / b
y2 = c * p_in.y
in
mat2x2(x1, y1, x2, y2) * vec2(cosh(p_len1), sinh(p_len2)) * g
]]>
</string>
</transform_def>
</user_transforms>