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.

47 lines
1.2 KiB

10 months ago
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="epolar2">
<!-- Xform by Crystalize, based on the wonderful work of Tatasz -->
<node name="input_params">
<real name="epolar2">1</real>
<real name="epolar2_length" minval="0" >1</real>
<real name="epolar2_a">1</real>
<real name="epolar2_b">0</real>
<real name="epolar2_c">0</real>
<real name="epolar2_d">1</real>
<real name="epolar2_e">0</real>
<real name="epolar2_f">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="t" />
<real name="a" />
<real name="b" />
<real name="c" />
<real name="d" />
<real name="e" />
<real name="f" />
</node>
<string name="winter_init_function">
<![CDATA[
epolar2_init_result(epolar2 * invpi(), epolar2_length, epolar2_a, epolar2_b, epolar2_c, epolar2_d, epolar2_e, epolar2_f)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = a * p_in.x + b * p_in.y + e
y = c * p_in.x + d * p_in.y + f
tmp = dot(p_in, p_in) + t
z = complex(y, x)
result = weight * log((z * tmp) + (z * tmp))
in
vec2(result.im, result.re)
]]>
</string>
</transform_def>
</user_transforms>