Browse Source

using from parameter as a default 'self'

Inderjit Gill 1 month ago
parent
commit
21f5574ac9
58 changed files with 366 additions and 290 deletions
  1. 8
    8
      client/www/sketch.html
  2. 29
    29
      core/src/native.rs
  3. 12
    12
      core/src/seni_language.rs
  4. 1
    0
      server/static/gallery.json
  5. 1
    1
      server/static/seni/14ef-blur-grid.seni
  6. 1
    1
      server/static/seni/14eg-marker-grid.seni
  7. 2
    2
      server/static/seni/14eh-chaotic-grid.seni
  8. 4
    4
      server/static/seni/151c-flower.seni
  9. 1
    1
      server/static/seni/157e-tile-shadow.seni
  10. 5
    5
      server/static/seni/1585-seeds.seni
  11. 3
    3
      server/static/seni/163a-scale-green.seni
  12. 1
    1
      server/static/seni/1669-zero.seni
  13. 8
    8
      server/static/seni/1918-dev-bitmap.seni
  14. 4
    4
      server/static/seni/1918-einstein-2.seni
  15. 4
    4
      server/static/seni/1918-einstein-3.seni
  16. 4
    4
      server/static/seni/1918-einstein.seni
  17. 8
    8
      server/static/seni/1918-skull.seni
  18. 2
    2
      server/static/seni/local/bug-append.seni
  19. 75
    0
      server/static/seni/scratchpad.seni
  20. 8
    8
      server/static/seni/sketch/0000-hsluv-comparison.seni
  21. 3
    3
      server/static/seni/sketch/0000-teststroke.seni
  22. 5
    5
      server/static/seni/sketch/1000-bezier-tangent.seni
  23. 1
    1
      server/static/seni/sketch/1000-octagon-square-pattern.seni
  24. 5
    5
      server/static/seni/sketch/1000-temp.seni
  25. 1
    1
      server/static/seni/sketch/14ef-blur-grid.seni
  26. 1
    1
      server/static/seni/sketch/14eg-marker-grid.seni
  27. 2
    2
      server/static/seni/sketch/14eh-chaotic-grid.seni
  28. 4
    4
      server/static/seni/sketch/151c-flower.seni
  29. 1
    1
      server/static/seni/sketch/1531-four-squares.seni
  30. 1
    1
      server/static/seni/sketch/157e-tile-shadow.seni
  31. 5
    5
      server/static/seni/sketch/1585-seeds.seni
  32. 3
    3
      server/static/seni/sketch/163a-scale-green.seni
  33. 1
    1
      server/static/seni/sketch/1644-shadows.seni
  34. 10
    10
      server/static/seni/sketch/164b-seeds.seni
  35. 5
    5
      server/static/seni/sketch/164f-ridge.seni
  36. 5
    5
      server/static/seni/sketch/164f-vhs.seni
  37. 1
    1
      server/static/seni/sketch/1669-zero.seni
  38. 2
    2
      server/static/seni/sketch/1843-fields-b.seni
  39. 2
    2
      server/static/seni/sketch/1843-fields-c.seni
  40. 4
    4
      server/static/seni/sketch/1919-skull.seni
  41. 8
    8
      server/static/seni/sketch/1921-yellow-skull-helmet.seni
  42. 8
    8
      server/static/seni/sketch/1922-hand.seni
  43. 8
    8
      server/static/seni/sketch/1922-pencil-skull.seni
  44. 8
    8
      server/static/seni/sketch/1922-skull-bootleg.seni
  45. 8
    8
      server/static/seni/sketch/1922-skull-face.seni
  46. 8
    8
      server/static/seni/sketch/1922-skull-needle.seni
  47. 8
    8
      server/static/seni/sketch/1922-skull-weed.seni
  48. 8
    8
      server/static/seni/sketch/1922-skull.seni
  49. 8
    8
      server/static/seni/sketch/1923-skull-vhs.seni
  50. 8
    8
      server/static/seni/sketch/1923-skull.seni
  51. 2
    2
      server/static/seni/sketch/1924-bitmap-value-wip3.seni
  52. 2
    2
      server/static/seni/sketch/1924-hand-submission.seni
  53. 4
    4
      server/static/seni/sketch/1924-skull-shelleyes.seni
  54. 4
    4
      server/static/seni/sketch/1924-skull-shelleyes2.seni
  55. 8
    8
      server/static/seni/sketch/1925-einstein.seni
  56. 8
    8
      server/static/seni/sketch/1925-einstein2.seni
  57. 7
    7
      server/static/seni/sketch/1926-hand-palette.seni
  58. 8
    8
      server/static/seni/sketch/1926-skull-face.seni

+ 8
- 8
client/www/sketch.html View File

@@ -87,10 +87,10 @@
87 87
 (fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
88 88
   (define a (col/e0 from: colour)
89 89
     angle (+ {2.58 (gen/stray from: 2.58 by: 0.6)} (* a math/PI)))
90
-  (line from: [(* {2.000 (gen/stray from: 2.000 by: 0.6)} (math/cos angle: angle))
91
-               (* {8.000 (gen/stray from: 8.000 by: 0.6)} (math/sin angle: angle))]
92
-        to: [(* {-7.000 (gen/stray from: -7.000 by: 0.6)} (math/cos angle: angle))
93
-             (* {6.000 (gen/stray from: 6.000 by: 0.6)} (math/sin angle: angle))]
90
+  (line from: [(* {2.000 (gen/stray from: 2.000 by: 0.6)} (math/cos from: angle))
91
+               (* {8.000 (gen/stray from: 8.000 by: 0.6)} (math/sin from: angle))]
92
+        to: [(* {-7.000 (gen/stray from: -7.000 by: 0.6)} (math/cos from: angle))
93
+             (* {6.000 (gen/stray from: 6.000 by: 0.6)} (math/sin from: angle))]
94 94
         width: (- {8.700 (gen/stray from: 8.700 by: 0.6)} a)
95 95
         brush: brush/d
96 96
         brush-subtype: 1
@@ -100,10 +100,10 @@
100 100
   (define
101 101
     b (col/e2 from: colour)
102 102
     angle (+ {3.30 (gen/stray from: 3.30 by: 0.6)} (* b math/PI)))
103
-  (line from: [(* {11.000 (gen/stray from: 11.000 by: 0.6)} (math/cos angle: angle))
104
-               (* {9.000 (gen/stray from: 9.000 by: 0.6)} (math/sin angle: angle))]
105
-        to: [(* {-3.000 (gen/stray from: -3.000 by: 0.6)} (math/cos angle: angle))
106
-             (* {-9.000 (gen/stray from: -9.000 by: 0.6)} (math/sin angle: angle))]
103
+  (line from: [(* {11.000 (gen/stray from: 11.000 by: 0.6)} (math/cos from: angle))
104
+               (* {9.000 (gen/stray from: 9.000 by: 0.6)} (math/sin from: angle))]
105
+        to: [(* {-3.000 (gen/stray from: -3.000 by: 0.6)} (math/cos from: angle))
106
+             (* {-9.000 (gen/stray from: -9.000 by: 0.6)} (math/sin from: angle))]
107 107
         width: (- {0.900 (gen/stray from: 0.900 by: 0.6)} b)
108 108
         brush: brush/d
109 109
         brush-subtype: 1

+ 29
- 29
core/src/native.rs View File

@@ -689,7 +689,7 @@ fn nth_execute(vm: &mut Vm) -> Result<Option<Var>> {
689 689
 fn vector_length_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
690 690
     Ok((
691 691
         // input arguments
692
-        vec![(Keyword::Vector, Var::Bool(false))],
692
+        vec![(Keyword::From, Var::Bool(false))],
693 693
         // stack offset
694 694
         1,
695 695
     ))
@@ -701,7 +701,7 @@ fn vector_length_execute(vm: &mut Vm) -> Result<Option<Var>> {
701 701
 
702 702
     // require a 'vector' argument
703 703
     if !is_arg_given(default_mask, vector_offset) {
704
-        error!("vector/length requires vector parameter");
704
+        error!("vector/length requires from parameter");
705 705
         return Err(Error::Native);
706 706
     }
707 707
 
@@ -710,7 +710,7 @@ fn vector_length_execute(vm: &mut Vm) -> Result<Option<Var>> {
710 710
         Var::Vector(vs) => Some(Var::Int(vs.len() as i32)),
711 711
         Var::V2D(_, _) => Some(Var::Int(2)),
712 712
         _ => {
713
-            error!("vector/length only accepts Vector or V2D in 'vector' parameter");
713
+            error!("vector/length only accepts Vector or V2D in 'from' parameter");
714 714
             return Err(Error::Native);
715 715
         }
716 716
     };
@@ -1543,7 +1543,7 @@ fn col_convert_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1543 1543
         // input arguments
1544 1544
         vec![
1545 1545
             (Keyword::Format, Var::Bool(false)),
1546
-            (Keyword::Colour, Var::Colour(Default::default())),
1546
+            (Keyword::From, Var::Colour(Default::default())),
1547 1547
         ],
1548 1548
         // stack offset
1549 1549
         1,
@@ -1712,7 +1712,7 @@ fn col_lab_execute(vm: &mut Vm) -> Result<Option<Var>> {
1712 1712
 fn col_complementary_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1713 1713
     Ok((
1714 1714
         // input arguments
1715
-        vec![(Keyword::Colour, Var::Colour(Default::default()))],
1715
+        vec![(Keyword::From, Var::Colour(Default::default()))],
1716 1716
         // stack offset
1717 1717
         1,
1718 1718
     ))
@@ -1727,7 +1727,7 @@ fn col_complementary_execute(vm: &mut Vm) -> Result<Option<Var>> {
1727 1727
 fn col_split_complementary_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1728 1728
     Ok((
1729 1729
         // input arguments
1730
-        vec![(Keyword::Colour, Var::Colour(Default::default()))],
1730
+        vec![(Keyword::From, Var::Colour(Default::default()))],
1731 1731
         // stack offset
1732 1732
         1,
1733 1733
     ))
@@ -1746,7 +1746,7 @@ fn col_split_complementary_execute(vm: &mut Vm) -> Result<Option<Var>> {
1746 1746
 fn col_analagous_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1747 1747
     Ok((
1748 1748
         // input arguments
1749
-        vec![(Keyword::Colour, Var::Colour(Default::default()))],
1749
+        vec![(Keyword::From, Var::Colour(Default::default()))],
1750 1750
         // stack offset
1751 1751
         1,
1752 1752
     ))
@@ -1765,7 +1765,7 @@ fn col_analagous_execute(vm: &mut Vm) -> Result<Option<Var>> {
1765 1765
 fn col_triad_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1766 1766
     Ok((
1767 1767
         // input arguments
1768
-        vec![(Keyword::Colour, Var::Colour(Default::default()))],
1768
+        vec![(Keyword::From, Var::Colour(Default::default()))],
1769 1769
         // stack offset
1770 1770
         1,
1771 1771
     ))
@@ -1785,7 +1785,7 @@ fn common_colour_value_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
1785 1785
     Ok((
1786 1786
         // input arguments
1787 1787
         vec![
1788
-            (Keyword::Colour, Var::Colour(Default::default())),
1788
+            (Keyword::From, Var::Colour(Default::default())),
1789 1789
             (Keyword::Value, Var::Float(0.0)),
1790 1790
         ],
1791 1791
         // stack offset
@@ -2032,7 +2032,7 @@ fn math_clamp_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
2032 2032
     Ok((
2033 2033
         // input arguments
2034 2034
         vec![
2035
-            (Keyword::Value, Var::Float(0.0)),
2035
+            (Keyword::From, Var::Float(0.0)),
2036 2036
             (Keyword::Min, Var::Float(0.0)),
2037 2037
             (Keyword::Max, Var::Float(0.0)),
2038 2038
         ],
@@ -2063,7 +2063,7 @@ fn math_clamp_execute(vm: &mut Vm) -> Result<Option<Var>> {
2063 2063
 fn math_radians_degrees_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
2064 2064
     Ok((
2065 2065
         // input arguments
2066
-        vec![(Keyword::Angle, Var::Float(0.0))],
2066
+        vec![(Keyword::From, Var::Float(0.0))],
2067 2067
         // stack offset
2068 2068
         1,
2069 2069
     ))
@@ -2080,7 +2080,7 @@ fn math_radians_degrees_execute(vm: &mut Vm) -> Result<Option<Var>> {
2080 2080
 fn math_cos_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
2081 2081
     Ok((
2082 2082
         // input arguments
2083
-        vec![(Keyword::Angle, Var::Float(0.0))],
2083
+        vec![(Keyword::From, Var::Float(0.0))],
2084 2084
         // stack offset
2085 2085
         1,
2086 2086
     ))
@@ -2097,7 +2097,7 @@ fn math_cos_execute(vm: &mut Vm) -> Result<Option<Var>> {
2097 2097
 fn math_sin_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
2098 2098
     Ok((
2099 2099
         // input arguments
2100
-        vec![(Keyword::Angle, Var::Float(0.0))],
2100
+        vec![(Keyword::From, Var::Float(0.0))],
2101 2101
         // stack offset
2102 2102
         1,
2103 2103
     ))
@@ -3608,40 +3608,40 @@ mod tests {
3608 3608
 
3609 3609
     #[test]
3610 3610
     fn test_vector_length() {
3611
-        is_int("(define v []) (++ v 100) (vector/length vector: v)", 1);
3612
-        is_int("(define v [1]) (++ v 100) (vector/length vector: v)", 2);
3613
-        is_int("(define v [1 2]) (++ v 100) (vector/length vector: v)", 3);
3614
-        is_int("(define v [1 2 3]) (++ v 100) (vector/length vector: v)", 4);
3611
+        is_int("(define v []) (++ v 100) (vector/length from: v)", 1);
3612
+        is_int("(define v [1]) (++ v 100) (vector/length from: v)", 2);
3613
+        is_int("(define v [1 2]) (++ v 100) (vector/length from: v)", 3);
3614
+        is_int("(define v [1 2 3]) (++ v 100) (vector/length from: v)", 4);
3615 3615
         is_int(
3616
-            "(define v [1 2 3 4]) (++ v 100) (vector/length vector: v)",
3616
+            "(define v [1 2 3 4]) (++ v 100) (vector/length from: v)",
3617 3617
             5,
3618 3618
         );
3619 3619
         is_int(
3620
-            "(define v []) (++ v 4) (++ v 3) (++ v 2) (++ v 1) (++ v 0) (vector/length vector: v)",
3620
+            "(define v []) (++ v 4) (++ v 3) (++ v 2) (++ v 1) (++ v 0) (vector/length from: v)",
3621 3621
             5,
3622 3622
         );
3623 3623
         is_int(
3624
-            "(define v [1 2]) (++ v 98) (++ v 99) (++ v 100) (vector/length vector: v)",
3624
+            "(define v [1 2]) (++ v 98) (++ v 99) (++ v 100) (vector/length from: v)",
3625 3625
             5,
3626 3626
         );
3627 3627
     }
3628 3628
 
3629 3629
     #[test]
3630 3630
     fn test_math() {
3631
-        is_float("(math/clamp value: 3 min: 2 max: 5)", 3.0);
3632
-        is_float("(math/clamp value: 1 min: 2 max: 5)", 2.0);
3633
-        is_float("(math/clamp value: 8 min: 2 max: 5)", 5.0);
3631
+        is_float("(math/clamp from: 3 min: 2 max: 5)", 3.0);
3632
+        is_float("(math/clamp from: 1 min: 2 max: 5)", 2.0);
3633
+        is_float("(math/clamp from: 8 min: 2 max: 5)", 5.0);
3634 3634
 
3635
-        is_float("(math/radians->degrees angle: 0.3)", 17.188734);
3635
+        is_float("(math/radians->degrees from: 0.3)", 17.188734);
3636 3636
 
3637
-        is_float("(math/cos angle: 0.7)", 0.7648422);
3638
-        is_float("(math/sin angle: 0.9)", 0.7833269);
3637
+        is_float("(math/cos from: 0.7)", 0.7648422);
3638
+        is_float("(math/sin from: 0.9)", 0.7833269);
3639 3639
     }
3640 3640
     #[test]
3641 3641
     fn dev_new_args() {
3642
-        is_float("(math/clamp value: 3 min: 2 max: 5)", 3.0);
3643
-        is_float("(math/clamp value: 1 min: 2 max: 5)", 2.0);
3644
-        is_float("(math/clamp value: 8 min: 2 max: 5)", 5.0);
3642
+        is_float("(math/clamp from: 3 min: 2 max: 5)", 3.0);
3643
+        is_float("(math/clamp from: 1 min: 2 max: 5)", 2.0);
3644
+        is_float("(math/clamp from: 8 min: 2 max: 5)", 5.0);
3645 3645
     }
3646 3646
 
3647 3647
 }

+ 12
- 12
core/src/seni_language.rs View File

@@ -176,7 +176,7 @@ n | 0 | 0 based index
176 176
 
177 177
 Parameter | Default | Description
178 178
 --- | --- | ---
179
-value | NULL |
179
+from | NULL |
180 180
 
181 181
 ## probe
182 182
 
@@ -354,7 +354,7 @@ Parameter | Default | Description
354 354
 Parameter | Default | Description
355 355
 --- | --- | ---
356 356
     | format    | RGB          |             |
357
-    | colour    | RGB(0 0 0 1) |             |
357
+    | from      | RGB(0 0 0 1) |             |
358 358
 
359 359
 ## col/rgb
360 360
 
@@ -408,7 +408,7 @@ returns the complimentary colour
408 408
 
409 409
 Parameter | Default | Description
410 410
 --- | --- | ---
411
-    | colour    | RGB(0 0 0 1) |             |
411
+    | from    | RGB(0 0 0 1) |             |
412 412
 
413 413
 ## col/split-complementary
414 414
 
@@ -416,7 +416,7 @@ returns a vector of 2 colours
416 416
 
417 417
 Parameter | Default | Description
418 418
 --- | --- | ---
419
-    | colour    | RGB(0 0 0 1) |             |
419
+    | from    | RGB(0 0 0 1) |             |
420 420
 
421 421
 ## col/analagous
422 422
 
@@ -424,7 +424,7 @@ returns a vector of 2 colours
424 424
 
425 425
 Parameter | Default | Description
426 426
 --- | --- | ---
427
-    | colour    | RGB(0 0 0 1) |             |
427
+    | from    | RGB(0 0 0 1) |             |
428 428
 
429 429
 ## col/triad
430 430
 
@@ -432,20 +432,20 @@ returns a vector of 2 colours
432 432
 
433 433
 Parameter | Default | Description
434 434
 --- | --- | ---
435
-    | colour    | RGB(0 0 0 1) |             |
435
+    | from    | RGB(0 0 0 1) |             |
436 436
 
437 437
 ## col/darken
438 438
 
439 439
 Parameter | Default | Description
440 440
 --- | --- | ---
441
-    | colour    | RGB(0 0 0 1) |             |
441
+    | from    | RGB(0 0 0 1) |             |
442 442
     | value     | 0            |      0..100 |
443 443
 
444 444
 ## col/lighten
445 445
 
446 446
 Parameter | Default | Description
447 447
 --- | --- | ---
448
-    | colour    | RGB(0 0 0 1) |             |
448
+    | from    | RGB(0 0 0 1) |             |
449 449
     | value     | 0            |      0..100 |
450 450
 
451 451
 ## col/e0
@@ -551,7 +551,7 @@ Parameter | Default | Description
551 551
 
552 552
 Parameter | Default | Description
553 553
 --- | --- | ---
554
-    | value     |       0 |             |
554
+    | from      |       0 |             |
555 555
     | min       |       0 |             |
556 556
     | max       |       1 |             |
557 557
 
@@ -559,19 +559,19 @@ Parameter | Default | Description
559 559
 
560 560
 Parameter | Default | Description
561 561
 --- | --- | ---
562
-    | angle     | 0       |             |
562
+    | from     | 0       |             |
563 563
 
564 564
 ## math/cos
565 565
 
566 566
 Parameter | Default | Description
567 567
 --- | --- | ---
568
-    | angle     | 0       |             |
568
+    | from     | 0       |             |
569 569
 
570 570
 ## math/sin
571 571
 
572 572
 Parameter | Default | Description
573 573
 --- | --- | ---
574
-    | angle     | 0       |             |
574
+    | from     | 0       |             |
575 575
 
576 576
 # Prng Functions
577 577
 

+ 1
- 0
server/static/gallery.json View File

@@ -1,4 +1,5 @@
1 1
 [
2
+  {"id":76,"name":"scratchpad","image":"img/seni/blank.png"},
2 3
   {"id":75,"name":"1918-dev-bitmap","image":"img/seni/blank.png"},
3 4
   {"id":74,"name":"sketch/1924-hand-submission","image":"img/seni/1924-hand-submission.png"},
4 5
   {"id":73,"name":"sketch/1923-skull-vhs","image":"img/seni/1923-skull-vhs.png"},

+ 1
- 1
server/static/seni/14ef-blur-grid.seni View File

@@ -45,7 +45,7 @@
45 45
      (loop (i from: 0 to: passes)
46 46
            (define [rr rx ry] (prng/values num: 3 from: rng))
47 47
            (on-matrix-stack
48
-            (rotate angle: (math/radians->degrees angle: (* rr 0.02 volatility)))
48
+            (rotate angle: (math/radians->degrees from: (* rr 0.02 volatility)))
49 49
             (rect position: [(* rx 5 volatility) (* ry 5 volatility)]
50 50
                   width: width
51 51
                   height: height

+ 1
- 1
server/static/seni/14eg-marker-grid.seni View File

@@ -63,7 +63,7 @@
63 63
       rng (prng/build min: -1 max: 1 seed: seed)
64 64
 
65 65
       half-alpha (/ (col/alpha from: colour) 2)
66
-      lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
66
+      lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
67 67
                                 value: half-alpha))
68 68
 
69 69
     ; horizontal strips

+ 2
- 2
server/static/seni/14eh-chaotic-grid.seni View File

@@ -26,7 +26,7 @@
26 26
                             vec1: [{500 (gen/int min:0 max: canvas/width)}
27 27
                                    {800 (gen/int min:0 max: canvas/height)}]
28 28
                             vec2: [x-pos y-pos])
29
-      volatility (math/clamp value: (/ (- (/ canvas/width 2)
29
+      volatility (math/clamp from: (/ (- (/ canvas/width 2)
30 30
                                           distance-from-centre)
31 31
                                        {12 (gen/int min:5 max: 50)})
32 32
                              min: 0
@@ -72,7 +72,7 @@
72 72
       rng (prng/build min: -1 max: 1 seed: seed)
73 73
 
74 74
       half-alpha (/ (col/alpha from: colour) 2)
75
-      lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
75
+      lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
76 76
                                 value: half-alpha))
77 77
 
78 78
     ; horizontal strips

+ 4
- 4
server/static/seni/151c-flower.seni View File

@@ -14,7 +14,7 @@
14 14
 (fn (petal-1 angle: 0
15 15
              colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
16 16
   (on-matrix-stack
17
-    (rotate angle: (math/radians->degrees angle: angle))
17
+    (rotate angle: (math/radians->degrees from: angle))
18 18
     (bezier-bulging tessellation: 20
19 19
                     line-width: {50 (gen/int min: 10 max: 200)}
20 20
                     colour: colour
@@ -26,7 +26,7 @@
26 26
 (fn (petal-2 angle: 0
27 27
              colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
28 28
   (on-matrix-stack
29
-    (rotate angle: (math/radians->degrees angle: angle))
29
+    (rotate angle: (math/radians->degrees from: angle))
30 30
     (bezier-bulging tessellation: 20
31 31
                     line-width: {50 (gen/int min: 10 max: 200)}
32 32
                     colour: colour
@@ -63,7 +63,7 @@
63 63
                     colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0)
64 64
                     sc: 1.0)
65 65
   (circ-1 petals: petals colour: colour sc: sc)
66
-  (rotate angle: (math/radians->degrees angle: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
66
+  (rotate angle: (math/radians->degrees from: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
67 67
   (circ-2 petals: petals colour: colour sc: sc))
68 68
 
69 69
 (fn (flower colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 0.5)
@@ -73,7 +73,7 @@
73 73
   (on-matrix-stack
74 74
     (translate vector: [posx posy])
75 75
     (scale scalar: sc)
76
-    (define [c2 c3] (col/analagous colour: colour))
76
+    (define [c2 c3] (col/analagous from: colour))
77 77
     (layered-petals petals: {23 (gen/int min: 1 max: 50)} colour: colour sc: {0.6 (gen/scalar min: 0.1 max: 0.9)})
78 78
     (layered-petals petals: {19 (gen/int min: 1 max: 50)} colour: c3 sc: {0.5 (gen/scalar min: 0.1 max: 0.9)})
79 79
     (layered-petals petals: {17 (gen/int min: 1 max: 50)} colour: c2 sc: {0.3 (gen/scalar min: 0.1 max: 0.9)})))

+ 1
- 1
server/static/seni/157e-tile-shadow.seni View File

@@ -13,7 +13,7 @@
13 13
       colour (col/value from: make-colour
14 14
                         t: (focal/value from: focalpoint position: position)))
15 15
     (draw-tile position: [(+ px 5) (- py 5)]
16
-               colour: (col/set-e2 from: (col/convert colour: colour
16
+               colour: (col/set-e2 from: (col/convert from: colour
17 17
                                                        format: LAB)
18 18
                                   value: 50))
19 19
     (draw-tile position: position

+ 5
- 5
server/static/seni/1585-seeds.seni View File

@@ -35,7 +35,7 @@
35 35
         ;; outer ring
36 36
         (circle-slice tessellation: 20
37 37
                       position: [0 0]
38
-                      colour: (col/lighten colour: colour
38
+                      colour: (col/lighten from: colour
39 39
                                            value: (* {30 (gen/int min: 20 max: 60)} (prng/value from: srng)))
40 40
                       angle-start: 0
41 41
                       angle-end: 320
@@ -46,7 +46,7 @@
46 46
         ;; inner ring
47 47
         (circle-slice tessellation: 10
48 48
                       position: [0 0]
49
-                      colour: (col/lighten colour: colour
49
+                      colour: (col/lighten from: colour
50 50
                                            value: (* {20 (gen/int min: 10 max: 40)} (prng/value from: srng)))
51 51
                       angle-start: 0
52 52
                       angle-end: 320
@@ -57,7 +57,7 @@
57 57
     ;; centre fill
58 58
     (circle-slice tessellation: 10
59 59
                   position: [0 0]
60
-                  colour: (col/lighten colour: colour
60
+                  colour: (col/lighten from: colour
61 61
                                        value: (* {10 (gen/int min: 5 max: 20)} (prng/value from: srng)))
62 62
                   angle-start: 0
63 63
                   angle-end: 360
@@ -76,8 +76,8 @@
76 76
     (define
77 77
       theta (/ (* i math/TAU) phi)
78 78
       r (* scale-factor (sqrt i))
79
-      position [(* r (math/cos angle: theta))
80
-                (* r (math/sin angle: theta))]
79
+      position [(* r (math/cos from: theta))
80
+                (* r (math/sin from: theta))]
81 81
       colour (col/value from: make-colour t: (focal/value from: focalpoint position: position)))
82 82
     (interesting-circle position: position
83 83
                         radius: seed-radius

+ 3
- 3
server/static/seni/163a-scale-green.seni View File

@@ -25,7 +25,7 @@
25 25
         ;; outer ring
26 26
         (circle-slice tessellation: 30
27 27
                       position: [0 0]
28
-                      colour: (col/lighten colour: colour
28
+                      colour: (col/lighten from: colour
29 29
                                            value: (* {411 (gen/stray-int from: 411 by: 10)} (prng/value from: srng)))
30 30
                       angle-start: 0
31 31
                       angle-end: 320
@@ -36,7 +36,7 @@
36 36
         ;; inner ring
37 37
         (circle-slice tessellation: 10
38 38
                       position: [0 0]
39
-                      colour: (col/lighten colour: colour
39
+                      colour: (col/lighten from: colour
40 40
                                            value: (* {24 (gen/stray-int from: 24 by: 10)} (prng/value from: srng)))
41 41
                       angle-start: 0
42 42
                       angle-end: 320
@@ -47,7 +47,7 @@
47 47
     ;; centre fill
48 48
     (circle-slice tessellation: 10
49 49
                   position: [0 0]
50
-                  colour: (col/lighten colour: colour
50
+                  colour: (col/lighten from: colour
51 51
                                        value: (* {140 (gen/stray-int from: 140 by: 10)} (prng/value from: srng)))
52 52
                   angle-start: 0
53 53
                   angle-end: 360

+ 1
- 1
server/static/seni/1669-zero.seni View File

@@ -83,7 +83,7 @@
83 83
 ;;     [x y colour radius] obj
84 84
 ;;     offset {1.03 (gen/scalar min: 1 max: 2)})
85 85
 ;;   (circle position: [(* x offset) (* y offset)]
86
-;;           colour: (col/set-alpha from: (col/darken colour: colour
86
+;;           colour: (col/set-alpha from: (col/darken from: colour
87 87
 ;;                                                      value: {27 (gen/int min: 0 max: 100)})
88 88
 ;;                                  value: {0.236 (gen/scalar max: 0.5)})
89 89
 ;;           radius: radius

+ 8
- 8
server/static/seni/1918-dev-bitmap.seni View File

@@ -28,10 +28,10 @@
28 28
                     {-11 (gen/scalar min: -12 max: -10)}]))
29 29
 
30 30
 (fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
31
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
32
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
33
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
34
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
31
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
32
+               (* (y from: from) (math/sin from: (* a math/PI)))]
33
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
34
+             (* (y from: to) (math/sin from: (* a math/PI)))]
35 35
         width: (- width a)
36 36
         brush: {brush/c (gen/select from: brush/*)}
37 37
         brush-subtype: (prng/value from: rng)
@@ -39,10 +39,10 @@
39 39
 
40 40
 (fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
41 41
   (define th {2.3 (gen/scalar min: 0 max: 6)})
42
-  (line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
43
-               (* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
44
-        to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
45
-             (* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
42
+  (line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
43
+               (* (y from: from) (math/sin from: (+ th (* a math/PI))))]
44
+        to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
45
+             (* (y from: to) (math/sin from: (+ th (* a math/PI))))]
46 46
         width: (- width a)
47 47
         brush: {brush/c (gen/select from: brush/*)}
48 48
         brush-subtype: (prng/value from: rng)

+ 4
- 4
server/static/seni/1918-einstein-2.seni View File

@@ -44,9 +44,9 @@
44 44
                   {-7 (gen/scalar min: -15 max: 15)}]))
45 45
 
46 46
 (fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
47
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
48
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
49
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
50
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
47
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
48
+               (* (y from: from) (math/sin from: (* a math/PI)))]
49
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
50
+             (* (y from: to) (math/sin from: (* a math/PI)))]
51 51
         width: (- width a)
52 52
         colour: (col/rgb r: a g: a b: a alpha: 0.2)))

+ 4
- 4
server/static/seni/1918-einstein-3.seni View File

@@ -44,9 +44,9 @@
44 44
                   {10 (gen/scalar min: -15 max: 15)}]))
45 45
 
46 46
 (fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
47
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
48
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
49
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
50
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
47
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
48
+               (* (y from: from) (math/sin from: (* a math/PI)))]
49
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
50
+             (* (y from: to) (math/sin from: (* a math/PI)))]
51 51
         width: (- width a)
52 52
         colour: (col/rgb r: a g: a b: a alpha: 0.2)))

+ 4
- 4
server/static/seni/1918-einstein.seni View File

@@ -44,9 +44,9 @@
44 44
                   {-3 (gen/scalar min: -15 max: 15)}]))
45 45
 
46 46
 (fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
47
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
48
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
49
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
50
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
47
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
48
+               (* (y from: from) (math/sin from: (* a math/PI)))]
49
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
50
+             (* (y from: to) (math/sin from: (* a math/PI)))]
51 51
         width: (- width a)
52 52
         colour: (col/rgb r: a g: a b: a alpha: 0.2)))

+ 8
- 8
server/static/seni/1918-skull.seni View File

@@ -17,10 +17,10 @@
17 17
 (fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
18 18
   (define a (col/e0 from: colour)
19 19
     angle (+ {2.58 (gen/scalar min: 0 max: 8)} (* a math/PI)))
20
-  (line from: [(* {2 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
21
-               (* {8 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
22
-        to: [(* {-7 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
23
-             (* {6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
20
+  (line from: [(* {2 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
21
+               (* {8 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
22
+        to: [(* {-7 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
23
+             (* {6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
24 24
         width: (- {8.7 (gen/scalar min: 0.1 max: 15)} a)
25 25
         brush: brush/d
26 26
         brush-subtype: 1
@@ -30,10 +30,10 @@
30 30
   (define
31 31
     b (col/e2 from: colour)
32 32
     angle (+ {3.30 (gen/scalar min: 0 max: 8)} (* b math/PI)))
33
-  (line from: [(* {11 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
34
-               (* {9 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
35
-        to: [(* {-3 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
36
-             (* {-9 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
33
+  (line from: [(* {11 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
34
+               (* {9 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
35
+        to: [(* {-3 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
36
+             (* {-9 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
37 37
         width: (- {0.9 (gen/scalar min: 0.1 max: 15)} b)
38 38
         brush: brush/d
39 39
         brush-subtype: 1

+ 2
- 2
server/static/seni/local/bug-append.seni View File

@@ -1,9 +1,9 @@
1 1
 (define bar [])
2 2
 
3 3
 ;;(debug/print value: bar)
4
-;;(debug/print value: (vector/length vector: bar))
4
+;;(debug/print value: (vector/length from: bar))
5 5
 
6 6
 (++ bar 54)
7 7
 
8 8
 ;;(debug/print value: bar)
9
-;;(debug/print value: (vector/length vector: bar))
9
+;;(debug/print value: (vector/length from: bar))

+ 75
- 0
server/static/seni/scratchpad.seni View File

@@ -0,0 +1,75 @@
1
+(meta linear-colour-space: 1)
2
+
3
+(define
4
+  scalefactor {1.7 (gen/scalar min: 0.5 max: 3)}
5
+  hex-size {21 (gen/int min: 10 max: 100)}
6
+
7
+  background {(col/rgb r: 0.93 g: 0.32 b: 0.92 alpha: 0.83) (gen/col)}
8
+  colour-a {(col/rgb r: 0.63 g: 0.45 b: 0.98 alpha: 0.02) (gen/col)}
9
+  colour-b {(col/rgb r: 0.01 g: 0.96 b: 0.86 alpha: 0.59) (gen/col)}
10
+
11
+  focalpoint (focal/build-point position: [{480 (gen/int max: canvas/width)}
12
+                                           {595 (gen/int max: canvas/height)}]
13
+                                distance: {864 (gen/int min: 200 max: canvas/width)})
14
+
15
+  centre [(/ canvas/width 2) (/ canvas/height 2)])
16
+
17
+
18
+(fn (hexagon position: centre
19
+             colour: black
20
+             size: 100)
21
+  (circle colour: colour
22
+          radius: (* size 0.95)
23
+          position: position
24
+          tessellation: 6))
25
+
26
+(fn (hex-grid from: [0 0]
27
+              to: [canvas/width canvas/height]
28
+              colour: red
29
+              size: 30)
30
+  (define
31
+    [fx fy] from
32
+    [tx ty] to
33
+    height (* size 2)
34
+    vert (* height 0.75)
35
+    width (* (/ (sqrt 3) 2) height))
36
+  (loop (y from: fy
37
+           to: (+ ty vert vert)
38
+           inc: (+ vert vert))
39
+        (loop (x from: fx
40
+                 to: (+ tx width)
41
+                 inc: width)
42
+              (hexagon size: size
43
+                       colour: (col/set-alpha from: colour
44
+                                              value: (focal/value from: focalpoint position: [x y]))
45
+                       position: [x y])))
46
+
47
+  (loop (y from: (+ fy vert)
48
+           to: (+ ty vert vert)
49
+           inc: (+ vert vert))
50
+        (loop (x from: (+ fx (/ width 2))
51
+                 to: (+ tx width)
52
+                 inc: width)
53
+              (hexagon size: size
54
+                       colour: (col/set-alpha from: colour
55
+                                              value: (focal/value from: focalpoint position: [x y]))
56
+                       position: [x y]))))
57
+
58
+(rect position: centre
59
+      width: canvas/width
60
+      height: canvas/height
61
+      colour: background)
62
+
63
+(translate vector: centre)
64
+(rotate angle: {201 (gen/scalar max: 360)})
65
+(scale scalar: scalefactor)
66
+
67
+(hex-grid from: [-700 -700]
68
+          to: [700 700]
69
+          size: hex-size
70
+          colour: colour-a)
71
+
72
+(hex-grid from: [-500 -500]
73
+          to: centre
74
+          size: hex-size
75
+          colour: colour-b)

+ 8
- 8
server/static/seni/sketch/0000-hsluv-comparison.seni View File

@@ -12,27 +12,27 @@
12 12
   left-rgb {(col/rgb r: 0.9 g: 1.0 b: 0 alpha: 1) (gen/col alpha: 1)}
13 13
   right-rgb {(col/rgb r: 0.1 g: 0.0 b: 1 alpha: 1) (gen/col alpha: 1)}
14 14
 
15
-  left-hsluv (col/convert colour: left-rgb format: HSLuv)
16
-  right-hsluv (col/convert colour: right-rgb format: HSLuv)
15
+  left-hsluv (col/convert from: left-rgb format: HSLuv)
16
+  right-hsluv (col/convert from: right-rgb format: HSLuv)
17 17
   interp-hsluv-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsluv) (col/e0 from: right-hsluv)])
18 18
   interp-hsluv-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsluv) (col/e1 from: right-hsluv)])
19 19
   interp-hsluv-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsluv) (col/e2 from: right-hsluv)])
20 20
 
21
-  left-hsl (col/convert colour: left-rgb format: HSL)
22
-  right-hsl (col/convert colour: right-rgb format: HSL)
21
+  left-hsl (col/convert from: left-rgb format: HSL)
22
+  right-hsl (col/convert from: right-rgb format: HSL)
23 23
   interp-hsl-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsl) (col/e0 from: right-hsl)])
24 24
   interp-hsl-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsl) (col/e1 from: right-hsl)])
25 25
   interp-hsl-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsl) (col/e2 from: right-hsl)])
26 26
 
27
-  left-hsv (col/convert colour: left-rgb format: HSV)
28
-  right-hsv (col/convert colour: right-rgb format: HSV)
27
+  left-hsv (col/convert from: left-rgb format: HSV)
28
+  right-hsv (col/convert from: right-rgb format: HSV)
29 29
   interp-hsv-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsv) (col/e0 from: right-hsv)])
30 30
   interp-hsv-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsv) (col/e1 from: right-hsv)])
31 31
   interp-hsv-v (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsv) (col/e2 from: right-hsv)])
32 32
 
33 33
 
34
-  left-lab (col/convert colour: left-rgb format: LAB)
35
-  right-lab (col/convert colour: right-rgb format: LAB)
34
+  left-lab (col/convert from: left-rgb format: LAB)
35
+  right-lab (col/convert from: right-rgb format: LAB)
36 36
   interp-lab-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-lab) (col/e2 from: right-lab)])
37 37
   interp-lab-a (interp/build from: [left-x right-x] to: [(col/e1 from: left-lab) (col/e1 from: right-lab)])
38 38
   interp-lab-b (interp/build from: [left-x right-x] to: [(col/e2 from: left-lab) (col/e2 from: right-lab)]))

+ 3
- 3
server/static/seni/sketch/0000-teststroke.seni View File

@@ -58,7 +58,7 @@
58 58
 
59 59
 (fn (box-stroke x1: 0 y1: 0 x2: 100 y2: 100 colour: red)
60 60
   (loop (x from: x1 to: x2 inc: 50)
61
-    (brush-line colour: (col/lighten colour: colour
61
+    (brush-line colour: (col/lighten from: colour
62 62
                                      value: (* (rng) 0.5))
63 63
                 width: 60
64 64
                 from: [x y1]
@@ -66,7 +66,7 @@
66 66
                 brush-type: "brushC"
67 67
                 brush-subtype: (rng)))
68 68
   (loop (y from: y1 to: y2 inc: 50)
69
-    (brush-line colour: (col/lighten colour: colour
69
+    (brush-line colour: (col/lighten from: colour
70 70
                                      value: (* (rng) 0.5))
71 71
                 width: 60
72 72
                 from: [x1 y]
@@ -76,7 +76,7 @@
76 76
 
77 77
 
78 78
 (fn (boxy x1: 0 y1: 0 x2: 100 y2: 100 colour: red)
79
-  (define complementary (col/complementary colour: colour))
79
+    (define complementary (col/complementary from: colour))
80 80
   (box-stroke x1: x1
81 81
               y1: y1
82 82
               x2: x2

+ 5
- 5
server/static/seni/sketch/1000-bezier-tangent.seni View File

@@ -23,7 +23,7 @@
23 23
           ;; outer ring
24 24
           (circle-slice tessellation: 20
25 25
                         position: [0 0]
26
-                        colour: (col/lighten colour: colour
26
+                        colour: (col/lighten from: colour
27 27
                                              delta: (* {30 (gen/int min: 20 max: 60)} (srng)))
28 28
                         angle-start: 0
29 29
                         angle-end: 320
@@ -34,7 +34,7 @@
34 34
           ;; inner ring
35 35
           (circle-slice tessellation: 10
36 36
                         position: [0 0]
37
-                        colour: (col/lighten colour: colour
37
+                        colour: (col/lighten from: colour
38 38
                                              delta: (* {20 (gen/int min: 10 max: 40)} (srng)))
39 39
                         angle-start: 0
40 40
                         angle-end: 320
@@ -45,7 +45,7 @@
45 45
    ;; centre fill
46 46
    (circle-slice tessellation: 10
47 47
                  position: [0 0]
48
-                 colour: (col/lighten colour: colour
48
+                 colour: (col/lighten from: colour
49 49
                                       delta: (* {10 (gen/int min: 5 max: 20)} (srng)))
50 50
                  angle-start: 0
51 51
                  angle-end: 360
@@ -60,8 +60,8 @@
60 60
 (fn (tentacle position: [0 0]
61 61
                   angle: 0)
62 62
   (define [x y] position
63
-          cosa (math/cos angle: angle)
64
-          sina (math/sin angle: angle)
63
+          cosa (math/cos from: angle)
64
+          sina (math/sin from: angle)
65 65
           min-pos-rad 28
66 66
           max-pos-rad 300
67 67
           rem (interp/fn from: [min-pos-rad max-pos-rad]

+ 1
- 1
server/static/seni/sketch/1000-octagon-square-pattern.seni View File

@@ -42,7 +42,7 @@
42 42
     (triad-b triad-c) ({col/analagous (gen/select from: ['col/analagous
43 43
                                                      'col/split-complementary
44 44
                                                      'col/triad])}
45
-                                  colour: main-col))
45
+                       from: main-col))
46 46
   (rect position: [500 500]
47 47
         width: 1000
48 48
         height: 1000

+ 5
- 5
server/static/seni/sketch/1000-temp.seni View File

@@ -40,7 +40,7 @@
40 40
         ;; outer ring
41 41
         (circle-slice tessellation: 30
42 42
                       position: [0 0]
43
-                    colour: (col/lighten colour: colour
43
+                    colour: (col/lighten from: colour
44 44
                                          delta: (* {30 (gen/int min: 20 max: 60)} (srng)))
45 45
                     angle-start: 0
46 46
                     angle-end: 320
@@ -51,7 +51,7 @@
51 51
         ;; inner ring
52 52
         (circle-slice tessellation: 10
53 53
                       position: [0 0]
54
-                    colour: (col/lighten colour: colour
54
+                    colour: (col/lighten from: colour
55 55
                                          delta: (* {20 (gen/int min: 10 max: 40)} (srng)))
56 56
                     angle-start: 0
57 57
                     angle-end: 320
@@ -62,7 +62,7 @@
62 62
     ;; centre fill
63 63
     (circle-slice tessellation: 10
64 64
                   position: [0 0]
65
-                colour: (col/lighten colour: colour
65
+                colour: (col/lighten from: colour
66 66
                                      delta: (* {10 (gen/int min: 5 max: 20)} (srng)))
67 67
                 angle-start: 0
68 68
                 angle-end: 360
@@ -80,8 +80,8 @@
80 80
   (loop (i to: seeds)
81 81
     (define theta (/ (* i math/TAU) phi)
82 82
                  r (* scale-factor (sqrt i))
83
-                 position [(* r (math/cos angle: theta))
84
-                              (* r (math/sin angle: theta))]
83
+                 position [(* r (math/cos from: theta))
84
+                              (* r (math/sin from: theta))]
85 85
                  colour (make-colour t: (focalpoint position: position)))
86 86
     (interesting-circle position: position
87 87
                         radius: seed-radius

+ 1
- 1
server/static/seni/sketch/14ef-blur-grid.seni View File

@@ -46,7 +46,7 @@
46 46
      (loop (i from: 0 to: passes)
47 47
            (define [rr rx ry] (prng/values num: 3 from: rng))
48 48
            (on-matrix-stack
49
-            (rotate angle: (math/radians->degrees angle: (* rr 0.02 volatility)))
49
+            (rotate angle: (math/radians->degrees from: (* rr 0.02 volatility)))
50 50
             (rect position: [(* rx 5 volatility) (* ry 5 volatility)]
51 51
                   width: width
52 52
                   height: height

+ 1
- 1
server/static/seni/sketch/14eg-marker-grid.seni View File

@@ -64,7 +64,7 @@
64 64
       rng (prng/build min: -1 max: 1 seed: seed)
65 65
 
66 66
       half-alpha (/ (col/alpha from: colour) 2)
67
-      lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
67
+      lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
68 68
                                 value: half-alpha))
69 69
 
70 70
     ; horizontal strips

+ 2
- 2
server/static/seni/sketch/14eh-chaotic-grid.seni View File

@@ -27,7 +27,7 @@
27 27
                             vec1: [{500 (gen/int min:0 max: canvas/width)}
28 28
                                    {800 (gen/int min:0 max: canvas/height)}]
29 29
                             vec2: [x-pos y-pos])
30
-      volatility (math/clamp value: (/ (- (/ canvas/width 2)
30
+      volatility (math/clamp from: (/ (- (/ canvas/width 2)
31 31
                                           distance-from-centre)
32 32
                                        {12 (gen/int min:5 max: 50)})
33 33
                              min: 0
@@ -73,7 +73,7 @@
73 73
       rng (prng/build min: -1 max: 1 seed: seed)
74 74
 
75 75
       half-alpha (/ (col/alpha from: colour) 2)
76
-      lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
76
+      lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
77 77
                                 value: half-alpha))
78 78
 
79 79
     ; horizontal strips

+ 4
- 4
server/static/seni/sketch/151c-flower.seni View File

@@ -15,7 +15,7 @@
15 15
 (fn (petal-1 angle: 0
16 16
              colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
17 17
   (on-matrix-stack
18
-    (rotate angle: (math/radians->degrees angle: angle))
18
+    (rotate angle: (math/radians->degrees from: angle))
19 19
     (bezier-bulging tessellation: 20
20 20
                     line-width: {50 (gen/int min: 10 max: 200)}
21 21
                     colour: colour
@@ -27,7 +27,7 @@
27 27
 (fn (petal-2 angle: 0
28 28
              colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
29 29
   (on-matrix-stack
30
-    (rotate angle: (math/radians->degrees angle: angle))
30
+    (rotate angle: (math/radians->degrees from: angle))
31 31
     (bezier-bulging tessellation: 20
32 32
                     line-width: {50 (gen/int min: 10 max: 200)}
33 33
                     colour: colour
@@ -64,7 +64,7 @@
64 64
                     colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0)
65 65
                     sc: 1.0)
66 66
   (circ-1 petals: petals colour: colour sc: sc)
67
-  (rotate angle: (math/radians->degrees angle: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
67
+  (rotate angle: (math/radians->degrees from: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
68 68
   (circ-2 petals: petals colour: colour sc: sc))
69 69
 
70 70
 (fn (flower colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 0.5)
@@ -74,7 +74,7 @@
74 74
   (on-matrix-stack
75 75
     (translate vector: [posx posy])
76 76
     (scale scalar: sc)
77
-    (define [c2 c3] (col/analagous colour: colour))
77
+    (define [c2 c3] (col/analagous from: colour))
78 78
     (layered-petals petals: {23 (gen/int min: 1 max: 50)} colour: colour sc: {0.6 (gen/scalar min: 0.1 max: 0.9)})
79 79
     (layered-petals petals: {19 (gen/int min: 1 max: 50)} colour: c3 sc: {0.5 (gen/scalar min: 0.1 max: 0.9)})
80 80
     (layered-petals petals: {17 (gen/int min: 1 max: 50)} colour: c2 sc: {0.3 (gen/scalar min: 0.1 max: 0.9)})))

+ 1
- 1
server/static/seni/sketch/1531-four-squares.seni View File

@@ -63,7 +63,7 @@
63 63
     (loop (i to: passes)
64 64
       (define [rr xr yr] (prng/values num: 3 from: rng))
65 65
       (on-matrix-stack
66
-        (rotate angle: (radians->degrees angle: (* rr 0.02 volatility)))
66
+       (rotate angle: (math/radians->degrees from: (* rr 0.02 volatility)))
67 67
         (rect position: [(* xr 5 volatility) (* yr 5 volatility)]
68 68
               width: width
69 69
               height: height

+ 1
- 1
server/static/seni/sketch/157e-tile-shadow.seni View File

@@ -14,7 +14,7 @@
14 14
       colour (col/value from: make-colour
15 15
                         t: (focal/value from: focalpoint position: position)))
16 16
     (draw-tile position: [(+ px 5) (- py 5)]
17
-               colour: (col/set-e2 from: (col/convert colour: colour
17
+               colour: (col/set-e2 from: (col/convert from: colour
18 18
                                                        format: LAB)
19 19
                                   value: 50))
20 20
     (draw-tile position: position

+ 5
- 5
server/static/seni/sketch/1585-seeds.seni View File

@@ -36,7 +36,7 @@
36 36
         ;; outer ring
37 37
         (circle-slice tessellation: 20
38 38
                       position: [0 0]
39
-                      colour: (col/lighten colour: colour
39
+                      colour: (col/lighten from: colour
40 40
                                            value: (* {30 (gen/int min: 20 max: 60)} (prng/value from: srng)))
41 41
                       angle-start: 0
42 42
                       angle-end: 320
@@ -47,7 +47,7 @@
47 47
         ;; inner ring
48 48
         (circle-slice tessellation: 10
49 49
                       position: [0 0]
50
-                      colour: (col/lighten colour: colour
50
+                      colour: (col/lighten from: colour
51 51
                                            value: (* {20 (gen/int min: 10 max: 40)} (prng/value from: srng)))
52 52
                       angle-start: 0
53 53
                       angle-end: 320
@@ -58,7 +58,7 @@
58 58
     ;; centre fill
59 59
     (circle-slice tessellation: 10
60 60
                   position: [0 0]
61
-                  colour: (col/lighten colour: colour
61
+                  colour: (col/lighten from: colour
62 62
                                        value: (* {10 (gen/int min: 5 max: 20)} (prng/value from: srng)))
63 63
                   angle-start: 0
64 64
                   angle-end: 360
@@ -77,8 +77,8 @@
77 77
     (define
78 78
       theta (/ (* i math/TAU) phi)
79 79
       r (* scale-factor (sqrt i))
80
-      position [(* r (math/cos angle: theta))
81
-                (* r (math/sin angle: theta))]
80
+      position [(* r (math/cos from: theta))
81
+                (* r (math/sin from: theta))]
82 82
       colour (col/value from: make-colour t: (focal/value from: focalpoint position: position)))
83 83
     (interesting-circle position: position
84 84
                         radius: seed-radius

+ 3
- 3
server/static/seni/sketch/163a-scale-green.seni View File

@@ -26,7 +26,7 @@
26 26
         ;; outer ring
27 27
         (circle-slice tessellation: 30
28 28
                       position: [0 0]
29
-                      colour: (col/lighten colour: colour
29
+                      colour: (col/lighten from: colour
30 30
                                            value: (* {411 (gen/int min: 20 max: 600)} (prng/value from: srng)))
31 31
                       angle-start: 0
32 32
                       angle-end: 320
@@ -37,7 +37,7 @@
37 37
         ;; inner ring
38 38
         (circle-slice tessellation: 10
39 39
                       position: [0 0]
40
-                      colour: (col/lighten colour: colour
40
+                      colour: (col/lighten from: colour
41 41
                                            value: (* {24 (gen/int min: 10 max: 400)} (prng/value from: srng)))
42 42
                       angle-start: 0
43 43
                       angle-end: 320
@@ -48,7 +48,7 @@
48 48
     ;; centre fill
49 49
     (circle-slice tessellation: 10
50 50
                   position: [0 0]
51
-                  colour: (col/lighten colour: colour
51
+                  colour: (col/lighten from: colour
52 52
                                        value: (* {140 (gen/int min: 5 max: 200)} (prng/value from: srng)))
53 53
                   angle-start: 0
54 54
                   angle-end: 360

+ 1
- 1
server/static/seni/sketch/1644-shadows.seni View File

@@ -50,7 +50,7 @@
50 50
   (define
51 51
     shadow-mult {1.030 (gen/scalar min: 1 max: 1.05)}
52 52
     pos (vector/multiply vector: position scalar: shadow-mult)
53
-    col: (col/set-alpha from: (col/darken colour: colour
53
+    col: (col/set-alpha from: (col/darken from: colour
54 54
                                             value: {46 (gen/int min: 0 max: 100)})
55 55
                         value: {0.849 (gen/scalar min: 0.2 max: 1)}))
56 56
   (draw-shape position: pos

+ 10
- 10
server/static/seni/sketch/164b-seeds.seni View File

@@ -23,7 +23,7 @@
23 23
   (circle tessellation: 30
24 24
           position: (vector/multiply vector: position
25 25
                                      scalar: {1.010 (gen/scalar min: 1 max: 1.05)})
26
-          colour: (col/darken colour: colour value: {20 (gen/int min: 0 max: 40)})
26
+          colour: (col/darken from: colour value: {20 (gen/int min: 0 max: 40)})
27 27
           radius: (* {1 (gen/scalar min: 1 max: 1.1)} radius)))
28 28
 
29 29
 
@@ -68,7 +68,7 @@
68 68
         ;; outer ring
69 69
         (circle-slice tessellation: 20
70 70
                       position: [0 0]
71
-                      colour: (col/lighten colour: colour
71
+                      colour: (col/lighten from: colour
72 72
                                            value: (* {30 (gen/int min: 20 max: 60)} (srng)))
73 73
                       angle-start: 0
74 74
                       angle-end: 320
@@ -79,7 +79,7 @@
79 79
         ;; inner ring
80 80
         (circle-slice tessellation: 10
81 81
                       position: [0 0]
82
-                      colour: (col/lighten colour: colour
82
+                      colour: (col/lighten from: colour
83 83
                                            value: (* {20 (gen/int min: 10 max: 40)} (srng)))
84 84
                       angle-start: 0
85 85
                       angle-end: 320
@@ -90,7 +90,7 @@
90 90
     ;; centre fill
91 91
     (circle-slice tessellation: 10
92 92
                   position: [0 0]
93
-                  colour: (col/lighten colour: colour
93
+                  colour: (col/lighten from: colour
94 94
                                        value: (* {10 (gen/int min: 5 max: 20)} (srng)))
95 95
                   angle-start: 0
96 96
                   angle-end: 360
@@ -108,8 +108,8 @@
108 108
     (define
109 109
       theta (/ (* i math/TAU) phi)
110 110
       r (* scale-factor (sqrt i))
111
-      position [(* r (math/cos angle: theta))
112
-                (* r (math/sin angle: theta))]
111
+      position [(* r (math/cos from: theta))
112
+                (* r (math/sin from: theta))]
113 113
       colour (make-colour t: (focalpoint position: position)))
114 114
     (background-circle position: position
115 115
                        radius: seed-radius
@@ -123,8 +123,8 @@
123 123
     (define
124 124
       theta (/ (* i math/TAU) phi)
125 125
       r (* scale-factor (sqrt i))
126
-      position [(* r (math/cos angle: theta))
127
-                (* r (math/sin angle: theta))]
126
+      position [(* r (math/cos from: theta))
127
+                (* r (math/sin from: theta))]
128 128
       colour (make-colour t: (focalpoint position: position)))
129 129
     (shadow-circle position: position
130 130
                        radius: seed-radius
@@ -138,8 +138,8 @@
138 138
     (define
139 139
       theta (/ (* i math/TAU) phi)
140 140
       r (* scale-factor (sqrt i))
141
-      position [(* r (math/cos angle: theta))
142
-                (* r (math/sin angle: theta))]
141
+      position [(* r (math/cos from: theta))
142
+                (* r (math/sin from: theta))]
143 143
       colour (make-colour t: (focalpoint position: position)))
144 144
     (interesting-circle position: position
145 145
                         radius: seed-radius

+ 5
- 5
server/static/seni/sketch/164f-ridge.seni View File

@@ -82,7 +82,7 @@
82 82
         ;; outer ring
83 83
         (circle-slice tessellation: 30
84 84
                       position: [0 0]
85
-                      colour: (col/lighten colour: colour
85
+                      colour: (col/lighten from: colour
86 86
                                            value: (* {145 (gen/int min: 20 max: 600)} (srng)))
87 87
                       angle-start: 0
88 88
                       angle-end: 320
@@ -93,7 +93,7 @@
93 93
         ;; inner ring
94 94
         (circle-slice tessellation: 10
95 95
                       position: [0 0]
96
-                      colour: (col/lighten colour: colour
96
+                      colour: (col/lighten from: colour
97 97
                                            value: (* {35 (gen/int min: 10 max: 400)} (srng)))
98 98
                       angle-start: 0
99 99
                       angle-end: 320
@@ -104,7 +104,7 @@
104 104
     ;; centre fill
105 105
     (circle-slice tessellation: 10
106 106
                   position: [0 0]
107
-                  colour: (col/lighten colour: colour
107
+                  colour: (col/lighten from: colour
108 108
                                        value: (* {60 (gen/int min: 5 max: 200)} (srng)))
109 109
                   angle-start: 0
110 110
                   angle-end: 360
@@ -147,8 +147,8 @@
147 147
       (define
148 148
         theta (/ (* i math/TAU) phi)
149 149
         r (* scale-factor (sqrt i))
150
-        position [(* r (math/cos angle: theta))
151
-                  (* r (math/sin angle: theta))]
150
+        position [(* r (math/cos from: theta))
151
+                  (* r (math/sin from: theta))]
152 152
         colour (col/set-alpha from: (col-fn-1 t: (focalpoint position: position))
153 153
                               value: 0.4))
154 154
       ;; don't render some of the offscreen circles

+ 5
- 5
server/static/seni/sketch/164f-vhs.seni View File

@@ -82,7 +82,7 @@
82 82
         ;; outer ring
83 83
         (circle-slice tessellation: 30
84 84
                       position: [0 0]
85
-                      colour: (col/lighten colour: colour
85
+                      colour: (col/lighten from: colour
86 86
                                            value: (* {85 (gen/int min: 20 max: 600)} (srng)))
87 87
                       angle-start: 0
88 88
                       angle-end: 320
@@ -93,7 +93,7 @@
93 93
         ;; inner ring
94 94
         (circle-slice tessellation: 10
95 95
                       position: [0 0]
96
-                      colour: (col/lighten colour: colour
96
+                      colour: (col/lighten from: colour
97 97
                                            value: (* {54 (gen/int min: 10 max: 400)} (srng)))
98 98
                       angle-start: 0
99 99
                       angle-end: 320
@@ -104,7 +104,7 @@
104 104
     ;; centre fill
105 105
     (circle-slice tessellation: 10
106 106
                   position: [0 0]
107
-                  colour: (col/lighten colour: colour
107
+                  colour: (col/lighten from: colour
108 108
                                        value: (* {66 (gen/int min: 5 max: 200)} (srng)))
109 109
                   angle-start: 0
110 110
                   angle-end: 360
@@ -147,8 +147,8 @@
147 147
       (define
148 148
         theta (/ (* i math/TAU) phi)
149 149
         r (* scale-factor (sqrt i))
150
-        position [(* r (math/cos angle: theta))
151
-                  (* r (math/sin angle: theta))]
150
+        position [(* r (math/cos from: theta))
151
+                  (* r (math/sin from: theta))]
152 152
         colour (col/set-alpha from: (col-fn-1 t: (focalpoint position: position))
153 153
                               value: 0.4))
154 154
       ;; don't render some of the offscreen circles

+ 1
- 1
server/static/seni/sketch/1669-zero.seni View File

@@ -42,7 +42,7 @@
42 42
     [x y colour radius] obj
43 43
     offset {1.116 (gen/scalar min: 1 max: 2)})
44 44
   (circle position: [(* x offset) (* y offset)]
45
-          colour: (col/set-alpha from: (col/darken colour: colour
45
+          colour: (col/set-alpha from: (col/darken from: colour
46 46
                                                      value: {27 (gen/int min: 0 max: 100)})
47 47
                                  value: {0.236 (gen/scalar max: 0.5)})
48 48
           radius: radius

+ 2
- 2
server/static/seni/sketch/1843-fields-b.seni View File

@@ -15,8 +15,8 @@
15 15
   col-s {90 (gen/scalar min: 0 max: 100)}
16 16
   col-l {90 (gen/scalar min: 0 max: 100)}
17 17
   bg-col (col/hsluv h: col-h
18
-                    s: (math/clamp value: (- col-s 50) min: 0 max: 100)
19
-                    l: (math/clamp value: (- col-l 10) min: 0 max: 100)
18
+                    s: (math/clamp from: (- col-s 50) min: 0 max: 100)
19
+                    l: (math/clamp from: (- col-l 10) min: 0 max: 100)
20 20
                     alpha: 1.0)
21 21
   main-col (col/hsluv h: col-h s: col-s l: col-l alpha: 1.0))
22 22
 

+ 2
- 2
server/static/seni/sketch/1843-fields-c.seni View File

@@ -17,8 +17,8 @@
17 17
   col-s {31 (gen/scalar min: 0 max: 100)}
18 18
   col-l {64 (gen/scalar min: 0 max: 100)}
19 19
   bg-col (col/hsluv h: col-h
20
-                    s: (math/clamp value: (- col-s 50) min: 0 max: 100)
21
-                    l: (math/clamp value: (- col-l 10) min: 0 max: 100)
20
+                    s: (math/clamp from: (- col-s 50) min: 0 max: 100)
21
+                    l: (math/clamp from: (- col-l 10) min: 0 max: 100)
22 22
                     alpha: 0.2)
23 23
   main-col (col/hsluv h: col-h s: col-s l: col-l alpha: 1.0))
24 24
 

+ 4
- 4
server/static/seni/sketch/1919-skull.seni View File

@@ -12,10 +12,10 @@
12 12
     a (col/e0 from: colour)
13 13
     angle (* a math/PI))
14 14
   (if (> a {0.7 (gen/scalar min: 0.1 max: 0.9)})
15
-      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
16
-                   (* {-1 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
17
-            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
18
-                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
15
+      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
16
+                   (* {-1 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
17
+            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
18
+                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
19 19
             width: (- {3.8 (gen/scalar min: 0.1 max: 15)} a)
20 20
             colour: (col/rgb r: a g: 0 b: 0 alpha: 0.2)
21 21
             brush: brush/a

+ 8
- 8
server/static/seni/sketch/1921-yellow-skull-helmet.seni View File

@@ -16,10 +16,10 @@
16 16
   (define r (col/e0 from: colour)
17 17
     angle (+ {3.38 (gen/scalar min: 0 max: 8)} (* r math/PI)))
18 18
   (if (> r 0)
19
-      (line from: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
20
-                   (* {-13 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
21
-            to: [(* {-12 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
22
-                 (* {0 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
19
+      (line from: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
20
+                   (* {-13 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
21
+            to: [(* {-12 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
22
+                 (* {0 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
23 23
             width: (- {5.1 (gen/scalar min: 0.1 max: 8)} r)
24 24
             brush: {brush/f (gen/select from: brush/*)}
25 25
             brush-subtype: {8 (gen/int min: 0 max: 10)}
@@ -29,10 +29,10 @@
29 29
   (define b (col/e2 from: colour)
30 30
     angle (+ {1.39 (gen/scalar min: 0 max: 8)} (* b math/PI)))
31 31
   (if (> b 0)
32
-      (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
33
-                   (* {3 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
34
-            to: [(* {10 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
35
-                 (* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
32
+      (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
33
+                   (* {3 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
34
+            to: [(* {10 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
35
+                 (* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
36 36
             width: (- {2.0 (gen/scalar min: 0.1 max: 3)} b)
37 37
             brush: {brush/e (gen/select from: brush/*)}
38 38
             brush-subtype: {0 (gen/int min: 0 max: 10)}

+ 8
- 8
server/static/seni/sketch/1922-hand.seni View File

@@ -22,10 +22,10 @@
22 22
   (define
23 23
     a (col/e0 from: colour)
24 24
     angle (+ {6.13 (gen/scalar min: 0 max: 8)} (* a math/PI)))
25
-  (line from: [(* {14 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
26
-               (* {10 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
27
-        to: [(* {9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
28
-             (* {-13 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
25
+  (line from: [(* {14 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
26
+               (* {10 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
27
+        to: [(* {9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
28
+             (* {-13 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
29 29
         width: (- {11.6 (gen/scalar min: 0.1 max: 15)} a)
30 30
         brush: {brush/f (gen/select from: brush/*)}
31 31
         brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
35 35
   (define
36 36
     b (col/e2 from: colour)
37 37
     angle (+ {2.65 (gen/scalar min: 0 max: 8)} (* b math/PI)))
38
-  (line from: [(* {2 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
39
-               (* {9 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
40
-        to: [(* {-1 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
41
-             (* {-7 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
38
+  (line from: [(* {2 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
39
+               (* {9 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
40
+        to: [(* {-1 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
41
+             (* {-7 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
42 42
         width: (- {2.3 (gen/scalar min: 1 max: 3)} b)
43 43
         brush: {brush/g (gen/select from: brush/*)}
44 44
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-pencil-skull.seni View File

@@ -22,10 +22,10 @@
22 22
   (define
23 23
     a (col/e0 from: colour)
24 24
     angle (+ {0.93 (gen/scalar min: 0 max: 8)} (* a math/PI)))
25
-  (line from: [(* {4 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
26
-               (* {6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
27
-        to: [(* {-11 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
28
-             (* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
25
+  (line from: [(* {4 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
26
+               (* {6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
27
+        to: [(* {-11 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
28
+             (* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
29 29
         width: (- {0.7 (gen/scalar min: 0.1 max: 15)} a)
30 30
         brush: {brush/c (gen/select from: brush/*)}
31 31
         brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
35 35
   (define
36 36
     b (col/e2 from: colour)
37 37
     angle (+ {0.92 (gen/scalar min: 0 max: 8)} (* b math/PI)))
38
-  (line from: [(* {-6 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
39
-               (* {6 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
40
-        to: [(* {0 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
41
-             (* {-2 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
38
+  (line from: [(* {-6 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
39
+               (* {6 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
40
+        to: [(* {0 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
41
+             (* {-2 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
42 42
         width: (- {1.3 (gen/scalar min: 1 max: 3)} b)
43 43
         brush: {brush/b (gen/select from: brush/*)}
44 44
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-skull-bootleg.seni View File

@@ -22,10 +22,10 @@
22 22
   (define
23 23
     a (col/e0 from: colour)
24 24
     angle (+ {6.18 (gen/scalar min: 0 max: 8)} (* a math/PI)))
25
-  (line from: [(* {7 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
26
-               (* {10 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
27
-        to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
28
-             (* {-8 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
25
+  (line from: [(* {7 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
26
+               (* {10 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
27
+        to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
28
+             (* {-8 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
29 29
         width: (- {11.5 (gen/scalar min: 0.1 max: 15)} a)
30 30
         brush: {brush/flat (gen/select from: brush/*)}
31 31
         brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
35 35
   (define
36 36
     b (col/e2 from: colour)
37 37
     angle (+ {2.25 (gen/scalar min: 0 max: 8)} (* b math/PI)))
38
-  (line from: [(* {-10 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
39
-               (* {4 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
40
-        to: [(* {-9 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
41
-             (* {8 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
38
+  (line from: [(* {-10 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
39
+               (* {4 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
40
+        to: [(* {-9 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
41
+             (* {8 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
42 42
         width: (- {1.1 (gen/scalar min: 1 max: 3)} b)
43 43
         brush: {brush/b (gen/select from: brush/*)}
44 44
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-skull-face.seni View File

@@ -22,10 +22,10 @@
22 22
   (define
23 23
     a (col/e0 from: colour)
24 24
     angle (+ {0.37 (gen/scalar min: 0 max: 8)} (* a math/PI)))
25
-  (line from: [(* {6 (gen/scalar min: 5 max: 10)} (math/cos angle: angle))
26
-               (* {13 (gen/scalar min: 10 max: 15)} (math/sin angle: angle))]
27
-        to: [(* {-5 (gen/scalar min: -10 max: 0)} (math/cos angle: angle))
28
-             (* {-6 (gen/scalar min: -10 max: 0)} (math/sin angle: angle))]
25
+  (line from: [(* {6 (gen/scalar min: 5 max: 10)} (math/cos from: angle))
26
+               (* {13 (gen/scalar min: 10 max: 15)} (math/sin from: angle))]
27
+        to: [(* {-5 (gen/scalar min: -10 max: 0)} (math/cos from: angle))
28
+             (* {-6 (gen/scalar min: -10 max: 0)} (math/sin from: angle))]
29 29
         width: (- {1.9 (gen/scalar min: 0.1 max: 3)} a)
30 30
         brush: {brush/g (gen/select from: brush/*)}
31 31
         brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
35 35
   (define
36 36
     b (col/e2 from: colour)
37 37
     angle (+ {6.12 (gen/scalar min: 0 max: 8)} (* b math/PI)))
38
-  (line from: [(* {-2 (gen/scalar min: -5 max: 2)} (math/cos angle: angle))
39
-               (* {11 (gen/scalar min: 7 max: 15)} (math/sin angle: angle))]
40
-        to: [(* {14 (gen/scalar min: 10 max: 15)} (math/cos angle: angle))
41
-             (* {4 (gen/scalar min: 0 max: 5)} (math/sin angle: angle))]
38
+  (line from: [(* {-2 (gen/scalar min: -5 max: 2)} (math/cos from: angle))
39
+               (* {11 (gen/scalar min: 7 max: 15)} (math/sin from: angle))]
40
+        to: [(* {14 (gen/scalar min: 10 max: 15)} (math/cos from: angle))
41
+             (* {4 (gen/scalar min: 0 max: 5)} (math/sin from: angle))]
42 42
         width: (- {3.2 (gen/scalar min: 2.1 max: 5)} b)
43 43
         brush: {brush/b (gen/select from: brush/*)}
44 44
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-skull-needle.seni View File

@@ -29,10 +29,10 @@
29 29
                     {-11 (gen/scalar min: -12 max: -10)}]))
30 30
 
31 31
 (fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
32
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
33
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
34
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
35
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
32
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
33
+               (* (y from: from) (math/sin from: (* a math/PI)))]
34
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
35
+             (* (y from: to) (math/sin from: (* a math/PI)))]
36 36
         width: (- width a)
37 37
         brush: {brush/c (gen/select from: brush/*)}
38 38
         brush-subtype: (prng/value from: rng)
@@ -40,10 +40,10 @@
40 40
 
41 41
 (fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
42 42
   (define th {2.3 (gen/scalar min: 0 max: 6)})
43
-  (line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
44
-               (* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
45
-        to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
46
-             (* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
43
+  (line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
44
+               (* (y from: from) (math/sin from: (+ th (* a math/PI))))]
45
+        to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
46
+             (* (y from: to) (math/sin from: (+ th (* a math/PI))))]
47 47
         width: (- width a)
48 48
         brush: {brush/c (gen/select from: brush/*)}
49 49
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-skull-weed.seni View File

@@ -31,10 +31,10 @@
31 31
                     {-11 (gen/scalar min: -13 max: -8)}]))
32 32
 
33 33
 (fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
34
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
35
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
36
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
37
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
34
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
35
+               (* (y from: from) (math/sin from: (* a math/PI)))]
36
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
37
+             (* (y from: to) (math/sin from: (* a math/PI)))]
38 38
         width: (- width a)
39 39
         brush: {brush/c (gen/select from: brush/*)}
40 40
         brush-subtype: (prng/value from: rng)
@@ -42,10 +42,10 @@
42 42
 
43 43
 (fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
44 44
   (define th {0 (gen/scalar min: 0 max: 6)})
45
-  (line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
46
-               (* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
47
-        to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
48
-             (* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
45
+  (line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
46
+               (* (y from: from) (math/sin from: (+ th (* a math/PI))))]
47
+        to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
48
+             (* (y from: to) (math/sin from: (+ th (* a math/PI))))]
49 49
         width: (- width a)
50 50
         brush: {brush/c (gen/select from: brush/*)}
51 51
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1922-skull.seni View File

@@ -22,10 +22,10 @@
22 22
   (define
23 23
     a (col/e0 from: colour)
24 24
     angle (+ {7.83 (gen/scalar min: 0 max: 8)} (* a math/PI)))
25
-  (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
26
-               (* {11 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
27
-        to: [(* {-6 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
28
-             (* {5 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
25
+  (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
26
+               (* {11 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
27
+        to: [(* {-6 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
28
+             (* {5 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
29 29
         width: (- {7.7 (gen/scalar min: 0.1 max: 15)} a)
30 30
         brush: {brush/c (gen/select from: brush/*)}
31 31
         brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
35 35
   (define
36 36
     b (col/e2 from: colour)
37 37
     angle (+ {5.69 (gen/scalar min: 0 max: 8)} (* b math/PI)))
38
-  (line from: [(* {-2 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
39
-               (* {4 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
40
-        to: [(* {1 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
41
-             (* {3 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
38
+  (line from: [(* {-2 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
39
+               (* {4 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
40
+        to: [(* {1 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
41
+             (* {3 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
42 42
         width: (- {3.0 (gen/scalar min: 1 max: 3)} b)
43 43
         brush: {brush/b (gen/select from: brush/*)}
44 44
         brush-subtype: (prng/value from: rng)

+ 8
- 8
server/static/seni/sketch/1923-skull-vhs.seni View File

@@ -18,10 +18,10 @@
18 18
 (fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
19 19
   (define a (col/e0 from: colour)
20 20
     angle (+ {1.65 (gen/scalar min: 0 max: 8)} (* a math/PI)))
21
-  (line from: [(* {8 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
22
-               (* {-5 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
23
-        to: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
24
-             (* {-1 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
21
+  (line from: [(* {8 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
22
+               (* {-5 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
23
+        to: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
24
+             (* {-1 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
25 25
         width: (- {5.6 (gen/scalar min: 0.1 max: 15)} a)
26 26
         brush: brush/d
27 27
         brush-subtype: 1
@@ -31,10 +31,10 @@
31 31
   (define
32 32
     b (col/e2 from: colour)
33 33
     angle (+ {6.07 (gen/scalar min: 0 max: 8)} (* b math/PI)))
34
-  (line from: [(* {-2 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
35
-               (* {-6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
36
-        to: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
37
-             (* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
34
+  (line from: [(* {-2 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
35
+               (* {-6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
36
+        to: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
37
+             (* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
38 38
         width: (- {2.3 (gen/scalar min: 0.1 max: 15)} b)
39 39
         brush: brush/d
40 40
         brush-subtype: 1

+ 8
- 8
server/static/seni/sketch/1923-skull.seni View File

@@ -18,10 +18,10 @@
18 18
 (fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
19 19
   (define a (col/e0 from: colour)
20 20
     angle (+ {1.06 (gen/scalar min: 0 max: 8)} (* a math/PI)))
21
-  (line from: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
22
-               (* {7 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
23
-        to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
24
-             (* {2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
21
+  (line from: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
22
+               (* {7 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
23
+        to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
24
+             (* {2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
25 25
         width: (- {11.1 (gen/scalar min: 0.1 max: 15)} a)
26 26
         brush: brush/d
27 27
         brush-subtype: 1
@@ -31,10 +31,10 @@
31 31
   (define
32 32
     b (col/e2 from: colour)
33 33
     angle (+ {1.16 (gen/scalar min: 0 max: 8)} (* b math/PI)))
34
-  (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
35
-               (* {-2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
36
-        to: [(* {-8 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
37
-             (* {2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
34
+  (line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
35
+               (* {-2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
36
+        to: [(* {-8 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
37
+             (* {2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
38 38
         width: (- {4.6 (gen/scalar min: 0.1 max: 15)} b)
39 39
         brush: brush/d
40 40
         brush-subtype: 1

+ 2
- 2
server/static/seni/sketch/1924-bitmap-value-wip3.seni View File

@@ -42,7 +42,7 @@
42 42
 (fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
43 43
   (define col (col/set-alpha value: strength
44 44
                           from: (col/set-e1 value: (* 100 strength)
45
-                                            from: (col/convert format: HSLuv colour: colour))))
45
+                                            from: (col/convert format: HSLuv from: colour))))
46 46
   (on-matrix-stack
47 47
     (translate vector: [x y])
48 48
     (rotate angle: (prng/value from: ra))
@@ -55,7 +55,7 @@
55 55
 (fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
56 56
   (define col (col/set-alpha value: strength
57 57
                           from: (col/set-e1 value: (* 100 strength)
58
-                                            from: (col/convert format: HSLuv colour: colour))))
58
+                                            from: (col/convert format: HSLuv from: colour))))
59 59
   (on-matrix-stack
60 60
     (translate vector: [x y])
61 61
     (rotate angle: (prng/value from: ra))

+ 2
- 2
server/static/seni/sketch/1924-hand-submission.seni View File

@@ -42,7 +42,7 @@
42 42
 (fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
43 43
   (define col (col/set-alpha value: strength
44 44
                           from: (col/set-e1 value: (* 100 strength)
45
-                                            from: (col/convert format: HSLuv colour: colour))))
45
+                                            from: (col/convert format: HSLuv from: colour))))
46 46
   (on-matrix-stack
47 47
     (translate vector: [x y])
48 48
     (rotate angle: (prng/value from: ra))
@@ -55,7 +55,7 @@
55 55
 (fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
56 56
   (define col (col/set-alpha value: strength
57 57
                           from: (col/set-e1 value: (* 100 strength)
58
-                                            from: (col/convert format: HSLuv colour: colour))))
58
+                                            from: (col/convert format: HSLuv from: colour))))
59 59
   (on-matrix-stack
60 60
     (translate vector: [x y])
61 61
     (rotate angle: (prng/value from: ra))

+ 4
- 4
server/static/seni/sketch/1924-skull-shelleyes.seni View File

@@ -59,10 +59,10 @@
59 59
     a (col/e0 from: colour)
60 60
     angle (* a math/PI))
61 61
   (if (< a {0.7 (gen/scalar min: 0.1 max: 0.9)})
62
-      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
63
-                   (* {-1 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
64
-            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
65
-                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
62
+      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
63
+                   (* {-1 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
64
+            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
65
+                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
66 66
             width: (- {3.8 (gen/scalar min: 0.1 max: 15)} a)
67 67
             colour: (col/rgb r: a g: 0 b: 0 alpha: 0.2)
68 68
             brush: brush/a

+ 4
- 4
server/static/seni/sketch/1924-skull-shelleyes2.seni View File

@@ -60,10 +60,10 @@
60 60
     a (col/e0 from: colour)
61 61
     angle (* a math/PI))
62 62
   (if (< a {0.7 (gen/scalar min: 0.1 max: 0.9)})
63
-      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
64
-                   (* {3 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
65
-            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos angle: angle))
66
-                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin angle: angle))]
63
+      (line from: [(* {4 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
64
+                   (* {3 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
65
+            to: [(* {-5 (gen/scalar min: -5 max: 5)} (math/cos from: angle))
66
+                 (* {-1 (gen/scalar min: -5 max: 5)} (math/sin from: angle))]
67 67
             width: (- {3.8 (gen/scalar min: 0.1 max: 15)} a)
68 68
             colour: (col/rgb r: a g: 0 b: 0 alpha: 0.2)
69 69
             brush: brush/a

+ 8
- 8
server/static/seni/sketch/1925-einstein.seni View File

@@ -49,19 +49,19 @@
49 49
                   {-3 (gen/scalar min: -15 max: 15)}]))
50 50
 
51 51
 (fn (per-pixel a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
52
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
53
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
54
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
55
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
52
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
53
+               (* (y from: from) (math/sin from: (* a math/PI)))]
54
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
55
+             (* (y from: to) (math/sin from: (* a math/PI)))]
56 56
         width: (+ 0 (- width a))
57 57
         brush: brush/b
58 58
         colour: (col/rgb r: a g: a b: a alpha: alpha)))
59 59
 
60 60
 (fn (per-pixel-rng a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
61
-  (line from: [(* (prng/value from: rng) (x from: from) (math/cos angle: (* a math/PI)))
62
-               (* (prng/value from: rng) (y from: from) (math/sin angle: (* a math/PI)))]
63
-        to: [(* (prng/value from: rng) (x from: to) (math/cos angle: (* a math/PI)))
64
-             (* (prng/value from: rng) (y from: to) (math/sin angle: (* a math/PI)))]
61
+  (line from: [(* (prng/value from: rng) (x from: from) (math/cos from: (* a math/PI)))
62
+               (* (prng/value from: rng) (y from: from) (math/sin from: (* a math/PI)))]
63
+        to: [(* (prng/value from: rng) (x from: to) (math/cos from: (* a math/PI)))
64
+             (* (prng/value from: rng) (y from: to) (math/sin from: (* a math/PI)))]
65 65
         width: (+ 0 (- width a))
66 66
         brush: brush/b
67 67
         colour: (col/rgb r: a g: a b: a alpha: alpha)))

+ 8
- 8
server/static/seni/sketch/1925-einstein2.seni View File

@@ -49,19 +49,19 @@
49 49
                   {4 (gen/scalar min: -15 max: 15)}]))
50 50
 
51 51
 (fn (per-pixel a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
52
-  (line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
53
-               (* (y from: from) (math/sin angle: (* a math/PI)))]
54
-        to: [(* (x from: to) (math/cos angle: (* a math/PI)))
55
-             (* (y from: to) (math/sin angle: (* a math/PI)))]
52
+  (line from: [(* (x from: from) (math/cos from: (* a math/PI)))
53
+               (* (y from: from) (math/sin from: (* a math/PI)))]
54
+        to: [(* (x from: to) (math/cos from: (* a math/PI)))
55
+             (* (y from: to) (math/sin from: (* a math/PI)))]
56 56
         width: (+ 0 (- width a))
57 57
         brush: brush/b
58 58
         colour: (col/rgb r: a g: a b: a alpha: alpha)))
59 59
 
60 60
 (fn (per-pixel-rng a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
61
-  (line from: [(* (prng/value from: rng) (x from: from) (math/cos angle: (* a math/PI)))
62
-               (* (prng/value from: rng) (y from: from) (math/sin angle: (* a math/PI)))]
63
-        to: [(* (prng/value from: rng) (x from: to) (math/cos angle: (* a math/PI)))
64
-             (* (prng/value from: rng) (y from: to) (math/sin angle: (* a math/PI)))]
61
+  (line from: [(* (prng/value from: rng) (x from: from) (math/cos from: (* a math/PI)))
62
+               (* (prng/value from: rng) (y from: from) (math/sin from: (* a math/PI)))]
63
+        to: [(* (prng/value from: rng) (x from: to) (math/cos from: (* a math/PI)))
64
+             (* (prng/value from: rng) (y from: to) (math/sin from: (* a math/PI)))]
65 65
         width: (+ 0 (- width a))
66 66
         brush: brush/b
67 67
         colour: (col/rgb r: a g: a b: a alpha: alpha)))

+ 7
- 7
server/static/seni/sketch/1926-hand-palette.seni View File

@@ -2,11 +2,11 @@
2 2
 
3 3
   [col1 col2 col3 col4 col5] (col/palette index: {0 (gen/scalar min: 0 max: 200)})
4 4
 
5
-  hslcol1 (col/convert colour: col1 format: HSLuv)
6
-  hslcol2 (col/convert colour: col2 format: HSLuv)
7
-  hslcol3 (col/convert colour: col3 format: HSLuv)
8
-  hslcol4 (col/convert colour: col4 format: HSLuv)
9
-  hslcol5 (col/convert colour: col5 format: HSLuv)
5
+  hslcol1 (col/convert from: col1 format: HSLuv)
6
+  hslcol2 (col/convert from: col2 format: HSLuv)
7
+  hslcol3 (col/convert from: col3 format: HSLuv)
8
+  hslcol4 (col/convert from: col4 format: HSLuv)
9
+  hslcol5 (col/convert from: col5 format: HSLuv)
10 10
   hslrng (prng/build seed: 42
11 11
                      min: -10
12 12
                      max: 10)
@@ -51,7 +51,7 @@
51 51
 (fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
52 52
   (define col (col/set-alpha value: strength
53 53
                           from: (col/set-e1 value: (* 100 strength)
54
-                                            from: (col/convert format: HSLuv colour: colour))))
54
+                                            from: (col/convert format: HSLuv from: colour))))
55 55
   (on-matrix-stack
56 56
     (translate vector: [x y])
57 57
     (rotate angle: (prng/value from: ra))
@@ -64,7 +64,7 @@
64 64
 (fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
65 65
   (define col (col/set-alpha value: strength
66 66
                           from: (col/set-e1 value: (* 100 strength)
67
-                                            from: (col/convert format: HSLuv colour: colour))))
67
+                                            from: (col/convert format: HSLuv from: colour))))
68 68
   (on-matrix-stack
69 69
     (translate vector: [x y])
70 70
     (rotate angle: (prng/value from: ra))

+ 8
- 8
server/static/seni/sketch/1926-skull-face.seni View File

@@ -14,10 +14,10 @@
14 14
 (fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
15 15
   (define a (col/e0 from: colour)
16 16
     angle (+ {6.37 (gen/stray from: 6.37 by: 2.00)} (* a math/PI)))
17
-  (line from: [(* {7.00 (gen/stray from: 7.00 by: 2.00)} (math/cos angle))
18
-               (* {12.00 (gen/stray from: 12.00 by: 2.00)} (math/sin angle))]
19
-        to: [(* {4.00 (gen/stray from: 4.00 by: 2.00)} (math/cos angle))
20
-             (* {-13.00 (gen/stray from: -13.00 by: 2.00)} (math/sin angle))]
17
+  (line from: [(* {7.00 (gen/stray from: 7.00 by: 2.00)} (math/cos from: angle))
18
+               (* {12.00 (gen/stray from: 12.00 by: 2.00)} (math/sin from: angle))]
19
+        to: [(* {4.00 (gen/stray from: 4.00 by: 2.00)} (math/cos from: angle))
20
+             (* {-13.00 (gen/stray from: -13.00 by: 2.00)} (math/sin from: angle))]
21 21
         width: (- {12.50 (gen/stray from: 12.50 by: 2.00)} a)
22 22
         brush: brush/d
23 23
         brush-subtype: 1
@@ -27,10 +27,10 @@
27 27
   (define
28 28
     b (col/e2 from: colour)
29 29
     angle (+ {6.82 (gen/stray from: 6.82 by: 2)} (* b math/PI)))
30
-  (line from: [(* {14.00 (gen/stray from: 14.00 by: 2.00)} (math/cos angle))
31
-               (* {8.00 (gen/stray from: 8.00 by: 2.00)} (math/sin angle))]
32
-        to: [(* {10.00 (gen/stray from: 10.00 by: 2.00)} (math/cos angle))
33
-             (* {1.00 (gen/stray from: 1.00 by: 2.00)} (math/sin angle))]
30
+  (line from: [(* {14.00 (gen/stray from: 14.00 by: 2.00)} (math/cos from: angle))
31
+               (* {8.00 (gen/stray from: 8.00 by: 2.00)} (math/sin from: angle))]
32
+        to: [(* {10.00 (gen/stray from: 10.00 by: 2.00)} (math/cos from: angle))
33
+             (* {1.00 (gen/stray from: 1.00 by: 2.00)} (math/sin from: angle))]
34 34
         width: (- {2.40 (gen/stray from: 2.40 by: 2.00)} b)
35 35
         brush: brush/d
36 36
         brush-subtype: 1

Loading…
Cancel
Save