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.

31 lines
832 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="average_ghosts">
<node name="input_params">
<real name="average_ghosts">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<string name="winter_init_function">
<![CDATA[
average_ghosts_init_result(average_ghosts * pi())
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
n = complex(sin(toReal(truncateToInt(p_in.x))), cos(toReal(truncateToInt(p_in.y))))
r = length(vec2(n.im + n.re)) * twoinvpi()
x = truncateToInt(r)
y1 = log(complex(tan(toReal(x)), sin(toReal(x))))
y2 = log(complex(cos(toReal(x)), tan(toReal(x))))
in
(p_in * vec2(y1.im + y2.re).x * floor(r)) * (0.1 / weight)
]]>
</string>
</transform_def>
</user_transforms>