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.

50 lines
1.3 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="juliacrystal">
<node name="input_params">
<real name="juliacrystal">1</real>
<real name="juliacrystal_omg">.5</real>
<real name="juliacrystal_wtf">.5</real>
<real name="juliacrystal_lol" minval="0.0" maxval="1.0">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="omg" />
<real name="wtf" />
<real name="lol" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
juliacrystal_init_result(juliacrystal, juliacrystal_omg, juliacrystal_wtf, juliacrystal_lol)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rnd = if unit_rnd_0 < 0.5 then 0.0 else pi()
r = weight * exp(0.25 * log(dot(p_in,p_in)))
ae = omg * atan2(p_in.x,p_in.y) + rnd
ai = wtf * atan2(p_in.x,p_in.y) + rnd
in
if lol < 1 then vec2(cos(ae), sin(ai)) * r else vec2(cos(ae), sinh(ai)) * r
]]>
</string>
</transform_def>
<!-- <string name="winter_eval_function">
<![CDATA[
let
r = weight * exp(0.25 * log(dot(p_in,p_in)))
a = 0.5 * atan2(p_in.x,p_in.y) + if unit_rnd_0 < 0.5 then 0.0 else pi()
in
vec2(cos(a), sin(a)) * r
]]>
</string>
-->
</user_transforms>