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.

33 lines
735 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="moth">
<node name="input_params">
<real name="moth">1</real>
<real name="moth_a">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="a" />
</node>
<string name="winter_init_function">
<![CDATA[
let
scaled_weight = moth * 1.3029400317411197908970256609023 # 4 / sqrt(3 * pi)
in
moth_init_result(scaled_weight, moth_a)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
y2 = p_in.y * a
r = weight * sqrt(abs(p_in.y * p_in.y) / (p_in.x * p_in.x + y2 * y2))
in
vec2(p_in.x, y2) * r
]]>
</string>
</transform_def>
</user_transforms>