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.

37 lines
826 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="disc2strip">
<node name="input_params">
<real name="disc2strip">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<int name="num_unit_randoms">4</int>
<string name="winter_init_function">
<![CDATA[
disc2strip_init_result(disc2strip)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
scale = dot(p_in, p_in)
rin = p_in * scale
r_factor = exp(log(dot(rin, rin)) * 2.0)
theta = atan2(rin.y, rin.x)
phi = theta - pi() * floor(theta / pi())
phi2 = if phi > 0.5 * pi()
then phi - pi()
else phi
amp = (1 / cos(phi2)) * r_factor * weight
in
rin * amp
]]>
</string>
</transform_def>
</user_transforms>