Compare commits

...

11 Commits

  1. 54
      best_brot.xml
  2. 43
      codePoint.xml
  3. 35
      dimples.xml
  4. 12
      disc2strip.xml
  5. 40
      el_em.xml
  6. 38
      el_em_fill.xml
  7. 37
      hexi.xml
  8. 64
      julian_complex.xml
  9. 31
      linear_strip.xml
  10. 46
      linkA_radial_outside.xml
  11. 103
      linkB_perfect_circle.xml
  12. 92
      linkX_the_ringer2.xml
  13. 14
      log_pi.xml
  14. 42
      md.disc.xml
  15. 31
      powerh.xml

54
best_brot.xml

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="best_brot">
<node name="input_params">
<real name="best_brot">1</real>
<real name="best_brot_zoom">1</real>
<real name="best_brot_J">1</real>
<real name="best_brot_I">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="w" />
<real name="j1" />
<real name="i1" />
</node>
<string name="winter_init_function">
<![CDATA[
best_brot_init_result(best_brot, best_brot_zoom, best_brot_J, best_brot_I)
]]>
</string>
<!-- Functions brotA and brotB are not defined -->
<string name="winter_eval_function">
<![CDATA[
let
h = (w * p_in.y) / p_in.x
xmin = -w / 2
ymin = -h / 2
xmax = xmin + w
ymax = ymin + h
dx = (xmax - xmin) / p_in.x
dy = (ymax - ymin) / p_in.y
int_csx = truncateToInt(xmin)
int_csy = truncateToInt(ymin)
j = truncateToInt(p_in.x * j1)
i = truncateToInt(p_in.y * i1)
fx = brotA(int_csx, j)
fy = brotB(int_csy, i)
x = iterate(brotA, int_csx)
y = iterate(brotB, int_csy)
a = toReal(x)
b = toReal(y)
aa = a * a
bb = b * b
twoab = 2.0 * a * b
ra = aa - bb + a
rb = twoab + b
in
vec2((ra * dx), (rb * dy)) * weight
]]>
</string>
</transform_def>
</user_transforms>

43
codePoint.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="codePoint_x">
<node name="input_params">
<real name="codePoint_x">1</real>
<real name="codePoint_x_x">1</real>
<real name="codePoint_x_y">1</real>
<real name="codePoint_x_r">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="a2" />
<real name="b2" />
<real name="r" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
codePoint_x_init_result(codePoint_x * (pi() * 10000), codePoint_x_x, codePoint_x_y, codePoint_x_r * quartpi())
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rotmat = mat2x2(cos(r), -sin(r),
sin(r), cos(r))
x = complex(p_in.x - toReal(codePoint('\u{a2}')), p_in.y - toReal(codePoint('\u{b2}')))
y = (x / sqrt(x * (x + 1.0)))
z = vec2(y.re, y.im)
p = rotmat * z
fx = (tan(p_in.x * p.x) * cos(p_in.y * p.y)) / (toReal(codePoint('\u{a2}')))
fy = (cos(p_in.y * p.x) * tan(p_in.x * p.y)) / (toReal(codePoint('\u{b2}')))
fr = (weight) * (p.x * p.x - p.y * p.y)
in
normalise(vec2(fx, fy)) * fr
]]>
</string>
</transform_def>
</user_transforms>

35
dimples.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="dimples">
<!-- Crystalize added a pi rescale -->
<node name="input_params">
<real name="dimples" >1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
dimples_init_result(dimples / 2.0)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
z = complex(p_in.x, p_in.y)
result = exp(log(z + sqrt(z + 1.0) * sqrt(z - 1.0)))
outside = toVec2(result)
scale = 1.0 / length2(outside)
inside = outside * scale
in
(if unit_rnd_0 > 0.5 then inside else outside) * weight
]]>
</string>
</transform_def>
</user_transforms>

12
disc2strip.xml

@ -3,17 +3,17 @@
<transform_def name="disc2strip">
<node name="input_params">
<real name="disc2strip">1</real>
<real name="disc2strip_power">0.5</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="power" />
</node>
<int name="num_unit_randoms">4</int>
<string name="winter_init_function">
<![CDATA[
disc2strip_init_result(disc2strip)
disc2strip_init_result(disc2strip, -0.5 * disc2strip_power)
]]>
</string>
@ -22,13 +22,13 @@
let
scale = dot(p_in, p_in)
rin = p_in * scale
r_factor = exp(log(dot(rin, rin)) * 2.0)
r_factor = exp(log(dot(rin, rin)) * power)
theta = atan2(rin.y, rin.x)
phi = theta - pi() * floor(theta / pi())
phi2 = if phi > 0.5 * pi()
phi2 = if phi > halfpi()
then phi - pi()
else phi
amp = (1 / cos(phi2)) * r_factor * weight
amp = (1 / cos(phi2)) * weight * r_factor
in
rin * amp
]]>

40
el_em.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="el_em">
<!-- Crystalize made this -->
<node name="input_params">
<real name="el_em" >1</real>
<real name="mod" minval="-1.0" maxval="1.0">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="mod" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
el_em_init_result(el_em, mod)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = 1 / length(p_in)
elr = if p_in.x > r
then p_in
else if -p_in.x > r
then p_in
else if p_in.x < r && -p_in.x < r
then p_in * mod
else p_in * r
in
elr * weight
]]>
</string>
</transform_def>
</user_transforms>

38
el_em_fill.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="el_em_fill">
<!-- Crystalize made this -->
<node name="input_params">
<real name="el_em_fill" >1</real>
<real name="mod" minval="-0.0" maxval="1.0">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="mod" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
el_em_fill_init_result(el_em_fill, mod / 2.0)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = 1 / length(p_in)
elr = if p_in.x < r && p_in.x > r * mod
then p_in
else if -p_in.x < r && -p_in.x > r * mod
then p_in
else p_in * 65536
in
elr * weight
]]>
</string>
</transform_def>
</user_transforms>

37
hexi.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="hexi">
<node name="input_params">
<real name="hexi">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
hexi_init_result(hexi)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rin = p_in * (pi() / 3.0)
r = exp(rin.y)
up = vec2(cos(rin.x), sin(rin.x)) * r
den_re = -up.x + 1.0
den_im = -up.y
num_re = up.x + 1.0
num_im = up.y
inv_r2 = 1 / (den_re * den_re + den_im * den_im) * weight
in
vec2(num_re * den_re + num_im * den_im,
num_im * den_re - num_re * den_im) * inv_r2
]]>
</string>
</transform_def>
</user_transforms>

64
julian_complex.xml

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="julian_complex">
<node name="input_params">
<real name="julian_complex">1</real>
<real name="julian_complex_power">2</real>
<real name="julian_complex_dist">1</real>
<real name="julian_complex_rex">0</real>
<real name="julian_complex_imx">1</real>
<real name="julian_complex_rey">1</real>
<real name="julian_complex_imy">0</real>
<real name="julian_complex_c1">0</real>
<real name="julian_complex_c2">0</real>
<real name="julian_complex_interpolate">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="power" />
<real name="dist" />
<real name="rex" />
<real name="imx" />
<real name="rey" />
<real name="imy" />
<real name="c1" />
<real name="c2" />
<real name="inter" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
julian_complex_init_result(julian_complex, julian_complex_power, julian_complex_dist / julian_complex_power * 0.5, julian_complex_rex,
julian_complex_imx, julian_complex_rey, julian_complex_imy, julian_complex_c1, julian_complex_c2, julian_complex_interpolate)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
cx = complex(p_in.x, p_in.x)
cy = complex(p_in.y, p_in.y)
xre = cx.re * rex
xim = cx.im * imx
yre = cy.re * rey
yim = cy.im * imy
cx2 = complex(xre, xim)
cy2 = complex(yre, yim)
cxy = cx2 + cy2
root = truncateToInt(power * unit_rnd_0)
a2 = (atan2(cxy.re, cxy.im) + toReal(root) * twopi()) / (power)
r = weight * pow(dot(p_in, p_in), dist)
bout = vec2(cos(vec2(a2).x), sin(vec2(a2).y)) * r
lint1 = lerp(aout, bout, inter)
in
lint1
]]>
</string>
</transform_def>
</user_transforms>

31
linear_strip.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linear_strip">
<!-- Crystalize made this -->
<node name="input_params">
<real name="linear_strip" >1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<string name="winter_init_function">
<![CDATA[
linear_strip_init_result(linear_strip * invpi())
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rin = p_in * (pi() / 3)
z = complex(rin.x, rin.y)
result = weight * log(exp(z))
in
toVec2(result)
]]>
</string>
</transform_def>
</user_transforms>

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 = 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>

103
linkB_perfect_circle.xml

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linkB_perfect_circle">
<node name="input_params">
<real name="perfect_circle">1</real>
<real name="perfect_circle_ring" minval="0.0" maxval="1.0">0.1</real>
<real name="perfect_circle_switch" minval="0.0" maxval="1.0">0.0</real>
<real name="perfect_circle_mod">0.0</real>
<real name="perfect_circle_inner_weight" minval="0.0" maxval="1.0">0.1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="ring" />
<real name="switch" />
<real name="mod" />
<real name="iw" />
</node>
<int name="num_unit_randoms">7</int>
<int name="num_gauss_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
linkB_perfect_circle_init_result(perfect_circle, perfect_circle_ring, perfect_circle_switch, perfect_circle_mod, perfect_circle_inner_weight)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
rring = 1.0 - ring
ga = unit_rnd_0 * twopi()
gs = gauss_rnd_0 * mod
gauss = vec2(cos(ga), sin(ga)) * gs + p_in
hemisphere = gauss * (1.0 / sqrt(dot(gauss, gauss) + 1))
sa = unit_rnd_2 * twopi()
su = unit_rnd_3
sr = if mod == 1
then acos(su * 2 - 1)
else acos(exp(log(1 - su) * mod) * 2 - 1)
sm = sr * invpi()
sineblur = vec2(cos(sa), sin(sa)) * sm
rad = length(p_in)
ang = atan2(p_in.y, p_in.x) + log(rad) * mod
swirl = vec2(cos(ang), sin(ang)) * rad
z = complex(swirl.x, swirl.y)
z1 = 1.0 / z
resulta = invpi() * log((z + 1.0) / (-z + 1.0))
arctanh = vec2(resulta.re, resulta.im)
resultb = twoinvpi() * log(z + sqrt(z * z + 1.0))
arcsinh = vec2(resultb.re, resultb.im)
resultc = invpi() * log(z + sqrt(z + 1.0) * sqrt(z - 1.0))
arcsech = if unit_rnd_1 >= 0.5 then vec2(resultc.re, resultc.im) else vec2(-resultc.re, -resultc.im)
rswitch = (if switch <= 0.0
then swirl
else if switch <= 0.2
then hemisphere
else if switch <= 0.4
then sineblur
else if switch <= 0.6
then arctanh
else if switch <= 0.8
then arcsinh
else arcsech) * rring
imin = min(0.0, rring)
imax = max(0.0, rring)
irad = length(rswitch)
iang = atan2(rswitch.y, rswitch.x)
is = sin(iang)
ic = cos(iang)
inside = if irad > imax || irad < imin
then if 1.0 == 1.0
then vec2(0.0, 0.0)
else vec2(ic, is) * (imax)
else rswitch
br = unit_rnd_4
ba = unit_rnd_5 * twopi()
blur = vec2(cos(ba), sin(ba)) * br
bmin = min(rring, 1.0)
bmax = max(rring, 1.0)
rrad = length(blur)
rang = atan2(blur.y, blur.x)
rs = sin(rang)
rc = cos(rang)
ring = if rrad > bmax || rrad < bmin
then if 1.0 == 1.0
then vec2(0.0, 0.0)
else vec2(rc, rs) * (bmax)
else blur
total = if unit_rnd_6 <= iw then ring else inside
in
total * weight
]]>
</string>
</transform_def>
</user_transforms>

92
linkX_the_ringer2.xml

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linkX_the_ringer2">
<node name="input_params">
<real name="the_ringer2">1</real>
<real name="the_ringer2_split" minval="-1">0</real>
<real name="the_ringer2_outside_ring" minval="0">0.05</real>
<real name="the_ringer2_inside_ring" minval="0">0.05</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="split" />
<real name="oring" />
<real name="iring" />
</node>
<int name="num_unit_randoms">5</int>
<int name="num_gauss_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
linkX_the_ringer2_init_result(the_ringer2, the_ringer2_inside_outside_switch + 1.0, the_ringer2_outside_ring, the_ringer2_inside_ring)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
cr = length(p_in)
ca = atan2(p_in.y, p_in.x)
csplit = if cr < 1.0 - split
then p_in
else vec2(cos(ca), sin(ca)) * (cr + split)
osplit = if split >= 1.0
then split
else 1.0
isplit = if 1.0 - split >= 0.0
then 1.0 - split
else 0.0
riring = if 1.0 - split + iring >= 0.0
then if 1.0 - split + iring >= 1.0
then 1.0
else 1.0 - split + iring
else 0.0
roring = if osplit - oring <= 1.0
then 1.0
else osplit - oring
br = osplit * unit_rnd_0
ba = unit_rnd_1 * twopi()
blur = vec2(cos(ba), sin(ba)) * br
brad = length(blur)
bang = atan2(blur.y, blur.x)
bs = sin(bang)
bc = cos(bang)
obmin = min(osplit, roring)
obmax = max(osplit, roring)
out_ring = if brad > obmax || brad < obmin
then if 1.0 == 1.0
then vec2(0.0, 0.0)
else vec2(bc, bs) * (obmax)
else blur
ibmin = min(isplit, riring)
ibmax = max(isplit, riring)
in_ring = if brad > ibmax || brad < ibmin
then if 1.0 == 1.0
then vec2(0.0, 0.0)
else vec2(bc, bs) * (ibmax)
else blur
irad = length(p_in)
iang = atan2(p_in.y, p_in.x)
is = sin(iang)
ic = cos(iang)
imin = min(riring, roring)
imax = max(riring, roring)
inside = if irad > imax || irad < imin
then if 1.0 == 1.0
then vec2(0.0, 0.0)
else vec2(ic, is) * (imax)
else p_in
rings = if unit_rnd_2 <= 0.5 then out_ring else in_ring
in_out = if unit_rnd_3 <= 0.5 then inside else csplit
total = if unit_rnd_4 <= 0.5 then rings else in_out
in
total * weight
]]>
</string>
</transform_def>
</user_transforms>

14
log_pi.xml

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<user_transforms>
<transform_def name="log_pi">
<!-- Crystalize added a pi rescale -->
<node name="input_params">
<real name="log_pi" >1</real>
<real name="log_pi_base" >10</real>
<real name="log_pi_base" >1</real>
</node>
<node name="internal_params">
@ -14,15 +14,17 @@
<string name="winter_init_function">
<![CDATA[
log_pi_init_result(log_pi * (quartpi() / 2.5), log_pi * 0.5 / log(log_pi_base))
log_pi_init_result(log_pi * invpi(), log_pi_base)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
vec2(
scale * log(dot(p_in, p_in)),
weight * atan2(p_in.y, p_in.x))
let
z = complex(p_in.x, p_in.y)
result = weight * log(z)
in
vec2(result.re * scale, result.im)
]]>
</string>
</transform_def>

42
md.disc.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="md_disc">
<node name="input_params">
<real name="md_disc">1</real>
<real name="md_disc_mat_double_switch" minval="0"maxval=".001">0</real>
<real name="md_disc_rotate">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="switch" />
<real name="rotate" />
</node>
<string name="winter_init_function">
<![CDATA[
md_disc_init_result(md_disc, md_disc_mat_double_switch, md_disc_rotate * quartpi())
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = atan2(p_in.y, p_in.x) * invpi()
a = if r > 0.0
then pi() - pi() / (length(p_in))
else pi() / (length(p_in))
mdisc = vec2(cos(a), if switch <= 0
then sin(a)
else cos(a))
in
mat2x2(cos(rotate), -sin(rotate),
sin(rotate), cos(rotate)) *
(mat2x2(cos(a), -sin(a),
sin(a), cos(a)) * mdisc) * (weight * r) * if switch <= 0
then 1.0
else 0.7
]]>
</string>
</transform_def>
</user_transforms>

31
powerh.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="powerh">
<node name="input_params">
<real name="powerh">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
powerh_init_result(powerh)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = exp(p_in.y) * weight
a = atan2(p_in.x, p_in.y)
powh = vec2(cos(a), sin(a)) * r
in
vec2(if unit_rnd_0 < 0.5 then powh.x else -powh.x, if unit_rnd_0 < 0.5 then -powh.y else powh.y)
]]>
</string>
</transform_def>
</user_transforms>
Loading…
Cancel
Save