Browse Source

Split interest final update(?)

master
Crystalize 8 months ago
parent
commit
43cbfd4239
  1. 32
      linkA_split_interest.xml

32
linkA_split_interest.xml

@ -38,31 +38,25 @@
fluxb = vec2(-cos(a), if syty == 0.0 then -sin(a) else sin(a)) * r
rflux = if unit_rnd_0 >= 0.5 then fluxa else fluxb
d = dot(p_in,p_in) * (spread - 1)
r_avg = weight * sqrt(1 + 4 * p_in.x / (d - 2 * p_in.x + 1.0))
a_avg = 0.5 * atan2(2 * p_in.y, (d - 1))
d = dot(p_in, p_in)
r_avg = weight * sqrt(1 + 4 * p_in.x / (d - spread * p_in.x + 1.0))
a_avg = 0.5 * atan2(spread * p_in.y, (d - 1))
deltaa = vec2(cos(a_avg), sin(a_avg)) * r_avg
deltab = vec2(-cos(a_avg), if syty == 0.0 then -sin(a_avg) else sin(a_avg)) * r_avg
rdelta = if unit_rnd_0 >= 0.5 then deltaa else deltab
r2 = dot(p_in, p_in) * abs(max(spread, -spread))
fspher = if r2 > 1.0
then if unit_rnd_1 < 0.5
then p_in * (2.0 / r2)
else p_in * 2.0
else vec2(0.0, 0.0)
spher = vec2(fspher.x + 1.0, fspher.y / 0.5)
r3 = length(spher) * weight
a3 = atan2(spher.y, spher.x)
c = floor(a * halfinvpi() + 0.5)
alpha = a3 * 0.5 + c * pi()
fluxphera = vec2(cos(alpha), sin(alpha)) * r3
fluxpherb = vec2(-cos(alpha), if syty == 0.0 then -sin(alpha) else sin(alpha)) * r3
rfluxpher = if unit_rnd_0 >= 0.5 then fluxphera else fluxpherb
r2 = length(p_in)
a2 = atan2(p_in.y, p_in.x) + (spread - 2.0) * r2
c2 = floor(a2 * halfinvpi() + 0.5)
alpha = a2 * 0.5 + c2 * pi()
wedgea = vec2(cos(alpha), sin(alpha)) * (r2 * weight)
wedgeb = vec2(-cos(alpha), if syty == 0.0 then -sin(alpha) else sin(alpha)) * (r2 * weight)
rwedge = if unit_rnd_0 >= 0.5 then wedgea else wedgeb
x_offset = if (if inty == 0.0 then rflux.x else if inty == 0.5 then rfluxpher.x else rdelta.x) >= 0 then split else -split
interest = if inty == 0.0 then rflux else if inty == 0.5 then rwedge else rdelta
x_offset = if interest.x >= 0 then split else -split
in
(if inty == 0.0 then rflux else if inty == 0.5 then rfluxpher else rdelta) + vec2(x_offset, 0.0)
interest + vec2(x_offset, 0.0)
]]>
</string>
</transform_def>

Loading…
Cancel
Save