Browse Source

+radial_outside

=circlecrop_inv
master
Crystalize 8 months ago
parent
commit
97a095bc8a
  1. 2
      circlecrop_inv.xml
  2. 46
      linkA_radial_outside.xml

2
circlecrop_inv.xml

@ -9,8 +9,6 @@
<real name="weight" />
</node>
<int name="num_unit_randoms">4</int>
<string name="winter_init_function">
<![CDATA[
circlecrop_inv_init_result(circlecrop_inv)

46
linkA_radial_outside.xml

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linkA_radial_outside">
<node name="input_params">
<real name="radial_outside">1</real>
<real name="radial_outside_power">1</real>
<real name="radial_outside_dist">1</real>
<real name="radial_outside_switch" minval="0" maxval="0.05">0</real>
<real name="radial_outside_hole" minval="0">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="power" />
<real name="dist" />
<real name="switch" />
<real name="hole" />
</node>
<int name="num_unit_randoms">4</int>
<string name="winter_init_function">
<![CDATA[
linkA_radial_outside_init_result(radial_outside, radial_outside_power, radial_outside_dist / radial_outside_power * 0.5, radial_outside_switch, radial_outside_hole)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
root = truncateToInt(power * unit_rnd_0)
ja = (atan2(p_in.y, p_in.x) + toReal(root) * twopi()) / power
jr = weight * pow(dot(p_in, p_in), dist)
julian = vec2(cos(ja), sin(ja)) * jr
r = length(julian)
a = atan2(julian.y, julian.x) * (1 / sign(floor(dot(julian * hole, julian * hole))))
ccrop = (vec2(cos(a), sin(a)) * r)
plastic = julian + (normalise(julian) * hole)
in
(if switch == 0.0 then ccrop else plastic) * weight
]]>
</string>
</transform_def>
</user_transforms>
Loading…
Cancel
Save