Browse Source

using from parameter as a default 'self'

master
Inderjit Gill 5 months 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 @@
(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
(define a (col/e0 from: colour)
angle (+ {2.58 (gen/stray from: 2.58 by: 0.6)} (* a math/PI)))
(line from: [(* {2.000 (gen/stray from: 2.000 by: 0.6)} (math/cos angle: angle))
(* {8.000 (gen/stray from: 8.000 by: 0.6)} (math/sin angle: angle))]
to: [(* {-7.000 (gen/stray from: -7.000 by: 0.6)} (math/cos angle: angle))
(* {6.000 (gen/stray from: 6.000 by: 0.6)} (math/sin angle: angle))]
(line from: [(* {2.000 (gen/stray from: 2.000 by: 0.6)} (math/cos from: angle))
(* {8.000 (gen/stray from: 8.000 by: 0.6)} (math/sin from: angle))]
to: [(* {-7.000 (gen/stray from: -7.000 by: 0.6)} (math/cos from: angle))
(* {6.000 (gen/stray from: 6.000 by: 0.6)} (math/sin from: angle))]
width: (- {8.700 (gen/stray from: 8.700 by: 0.6)} a)
brush: brush/d
brush-subtype: 1
@@ -100,10 +100,10 @@
(define
b (col/e2 from: colour)
angle (+ {3.30 (gen/stray from: 3.30 by: 0.6)} (* b math/PI)))
(line from: [(* {11.000 (gen/stray from: 11.000 by: 0.6)} (math/cos angle: angle))
(* {9.000 (gen/stray from: 9.000 by: 0.6)} (math/sin angle: angle))]
to: [(* {-3.000 (gen/stray from: -3.000 by: 0.6)} (math/cos angle: angle))
(* {-9.000 (gen/stray from: -9.000 by: 0.6)} (math/sin angle: angle))]
(line from: [(* {11.000 (gen/stray from: 11.000 by: 0.6)} (math/cos from: angle))
(* {9.000 (gen/stray from: 9.000 by: 0.6)} (math/sin from: angle))]
to: [(* {-3.000 (gen/stray from: -3.000 by: 0.6)} (math/cos from: angle))
(* {-9.000 (gen/stray from: -9.000 by: 0.6)} (math/sin from: angle))]
width: (- {0.900 (gen/stray from: 0.900 by: 0.6)} b)
brush: brush/d
brush-subtype: 1

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

@@ -689,7 +689,7 @@ fn nth_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn vector_length_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Vector, Var::Bool(false))],
vec![(Keyword::From, Var::Bool(false))],
// stack offset
1,
))
@@ -701,7 +701,7 @@ fn vector_length_execute(vm: &mut Vm) -> Result<Option<Var>> {

// require a 'vector' argument
if !is_arg_given(default_mask, vector_offset) {
error!("vector/length requires vector parameter");
error!("vector/length requires from parameter");
return Err(Error::Native);
}

@@ -710,7 +710,7 @@ fn vector_length_execute(vm: &mut Vm) -> Result<Option<Var>> {
Var::Vector(vs) => Some(Var::Int(vs.len() as i32)),
Var::V2D(_, _) => Some(Var::Int(2)),
_ => {
error!("vector/length only accepts Vector or V2D in 'vector' parameter");
error!("vector/length only accepts Vector or V2D in 'from' parameter");
return Err(Error::Native);
}
};
@@ -1543,7 +1543,7 @@ fn col_convert_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
// input arguments
vec![
(Keyword::Format, Var::Bool(false)),
(Keyword::Colour, Var::Colour(Default::default())),
(Keyword::From, Var::Colour(Default::default())),
],
// stack offset
1,
@@ -1712,7 +1712,7 @@ fn col_lab_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn col_complementary_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Colour, Var::Colour(Default::default()))],
vec![(Keyword::From, Var::Colour(Default::default()))],
// stack offset
1,
))
@@ -1727,7 +1727,7 @@ fn col_complementary_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn col_split_complementary_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Colour, Var::Colour(Default::default()))],
vec![(Keyword::From, Var::Colour(Default::default()))],
// stack offset
1,
))
@@ -1746,7 +1746,7 @@ fn col_split_complementary_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn col_analagous_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Colour, Var::Colour(Default::default()))],
vec![(Keyword::From, Var::Colour(Default::default()))],
// stack offset
1,
))
@@ -1765,7 +1765,7 @@ fn col_analagous_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn col_triad_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Colour, Var::Colour(Default::default()))],
vec![(Keyword::From, Var::Colour(Default::default()))],
// stack offset
1,
))
@@ -1785,7 +1785,7 @@ fn common_colour_value_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![
(Keyword::Colour, Var::Colour(Default::default())),
(Keyword::From, Var::Colour(Default::default())),
(Keyword::Value, Var::Float(0.0)),
],
// stack offset
@@ -2032,7 +2032,7 @@ fn math_clamp_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![
(Keyword::Value, Var::Float(0.0)),
(Keyword::From, Var::Float(0.0)),
(Keyword::Min, Var::Float(0.0)),
(Keyword::Max, Var::Float(0.0)),
],
@@ -2063,7 +2063,7 @@ fn math_clamp_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn math_radians_degrees_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Angle, Var::Float(0.0))],
vec![(Keyword::From, Var::Float(0.0))],
// stack offset
1,
))
@@ -2080,7 +2080,7 @@ fn math_radians_degrees_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn math_cos_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Angle, Var::Float(0.0))],
vec![(Keyword::From, Var::Float(0.0))],
// stack offset
1,
))
@@ -2097,7 +2097,7 @@ fn math_cos_execute(vm: &mut Vm) -> Result<Option<Var>> {
fn math_sin_parameter_info() -> Result<(Vec<(Keyword, Var)>, i32)> {
Ok((
// input arguments
vec![(Keyword::Angle, Var::Float(0.0))],
vec![(Keyword::From, Var::Float(0.0))],
// stack offset
1,
))
@@ -3608,40 +3608,40 @@ mod tests {

#[test]
fn test_vector_length() {
is_int("(define v []) (++ v 100) (vector/length vector: v)", 1);
is_int("(define v [1]) (++ v 100) (vector/length vector: v)", 2);
is_int("(define v [1 2]) (++ v 100) (vector/length vector: v)", 3);
is_int("(define v [1 2 3]) (++ v 100) (vector/length vector: v)", 4);
is_int("(define v []) (++ v 100) (vector/length from: v)", 1);
is_int("(define v [1]) (++ v 100) (vector/length from: v)", 2);
is_int("(define v [1 2]) (++ v 100) (vector/length from: v)", 3);
is_int("(define v [1 2 3]) (++ v 100) (vector/length from: v)", 4);
is_int(
"(define v [1 2 3 4]) (++ v 100) (vector/length vector: v)",
"(define v [1 2 3 4]) (++ v 100) (vector/length from: v)",
5,
);
is_int(
"(define v []) (++ v 4) (++ v 3) (++ v 2) (++ v 1) (++ v 0) (vector/length vector: v)",
"(define v []) (++ v 4) (++ v 3) (++ v 2) (++ v 1) (++ v 0) (vector/length from: v)",
5,
);
is_int(
"(define v [1 2]) (++ v 98) (++ v 99) (++ v 100) (vector/length vector: v)",
"(define v [1 2]) (++ v 98) (++ v 99) (++ v 100) (vector/length from: v)",
5,
);
}

#[test]
fn test_math() {
is_float("(math/clamp value: 3 min: 2 max: 5)", 3.0);
is_float("(math/clamp value: 1 min: 2 max: 5)", 2.0);
is_float("(math/clamp value: 8 min: 2 max: 5)", 5.0);
is_float("(math/clamp from: 3 min: 2 max: 5)", 3.0);
is_float("(math/clamp from: 1 min: 2 max: 5)", 2.0);
is_float("(math/clamp from: 8 min: 2 max: 5)", 5.0);

is_float("(math/radians->degrees angle: 0.3)", 17.188734);
is_float("(math/radians->degrees from: 0.3)", 17.188734);

is_float("(math/cos angle: 0.7)", 0.7648422);
is_float("(math/sin angle: 0.9)", 0.7833269);
is_float("(math/cos from: 0.7)", 0.7648422);
is_float("(math/sin from: 0.9)", 0.7833269);
}
#[test]
fn dev_new_args() {
is_float("(math/clamp value: 3 min: 2 max: 5)", 3.0);
is_float("(math/clamp value: 1 min: 2 max: 5)", 2.0);
is_float("(math/clamp value: 8 min: 2 max: 5)", 5.0);
is_float("(math/clamp from: 3 min: 2 max: 5)", 3.0);
is_float("(math/clamp from: 1 min: 2 max: 5)", 2.0);
is_float("(math/clamp from: 8 min: 2 max: 5)", 5.0);
}

}

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

@@ -176,7 +176,7 @@ n | 0 | 0 based index

Parameter | Default | Description
--- | --- | ---
value | NULL |
from | NULL |

## probe

@@ -354,7 +354,7 @@ Parameter | Default | Description
Parameter | Default | Description
--- | --- | ---
| format | RGB | |
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |

## col/rgb

@@ -408,7 +408,7 @@ returns the complimentary colour

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |

## col/split-complementary

@@ -416,7 +416,7 @@ returns a vector of 2 colours

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |

## col/analagous

@@ -424,7 +424,7 @@ returns a vector of 2 colours

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |

## col/triad

@@ -432,20 +432,20 @@ returns a vector of 2 colours

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |

## col/darken

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |
| value | 0 | 0..100 |

## col/lighten

Parameter | Default | Description
--- | --- | ---
| colour | RGB(0 0 0 1) | |
| from | RGB(0 0 0 1) | |
| value | 0 | 0..100 |

## col/e0
@@ -551,7 +551,7 @@ Parameter | Default | Description

Parameter | Default | Description
--- | --- | ---
| value | 0 | |
| from | 0 | |
| min | 0 | |
| max | 1 | |

@@ -559,19 +559,19 @@ Parameter | Default | Description

Parameter | Default | Description
--- | --- | ---
| angle | 0 | |
| from | 0 | |

## math/cos

Parameter | Default | Description
--- | --- | ---
| angle | 0 | |
| from | 0 | |

## math/sin

Parameter | Default | Description
--- | --- | ---
| angle | 0 | |
| from | 0 | |

# Prng Functions


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

@@ -1,4 +1,5 @@
[
{"id":76,"name":"scratchpad","image":"img/seni/blank.png"},
{"id":75,"name":"1918-dev-bitmap","image":"img/seni/blank.png"},
{"id":74,"name":"sketch/1924-hand-submission","image":"img/seni/1924-hand-submission.png"},
{"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 @@
(loop (i from: 0 to: passes)
(define [rr rx ry] (prng/values num: 3 from: rng))
(on-matrix-stack
(rotate angle: (math/radians->degrees angle: (* rr 0.02 volatility)))
(rotate angle: (math/radians->degrees from: (* rr 0.02 volatility)))
(rect position: [(* rx 5 volatility) (* ry 5 volatility)]
width: width
height: height

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

@@ -63,7 +63,7 @@
rng (prng/build min: -1 max: 1 seed: seed)

half-alpha (/ (col/alpha from: colour) 2)
lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
value: half-alpha))

; horizontal strips

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

@@ -26,7 +26,7 @@
vec1: [{500 (gen/int min:0 max: canvas/width)}
{800 (gen/int min:0 max: canvas/height)}]
vec2: [x-pos y-pos])
volatility (math/clamp value: (/ (- (/ canvas/width 2)
volatility (math/clamp from: (/ (- (/ canvas/width 2)
distance-from-centre)
{12 (gen/int min:5 max: 50)})
min: 0
@@ -72,7 +72,7 @@
rng (prng/build min: -1 max: 1 seed: seed)

half-alpha (/ (col/alpha from: colour) 2)
lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
value: half-alpha))

; horizontal strips

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

@@ -14,7 +14,7 @@
(fn (petal-1 angle: 0
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
(on-matrix-stack
(rotate angle: (math/radians->degrees angle: angle))
(rotate angle: (math/radians->degrees from: angle))
(bezier-bulging tessellation: 20
line-width: {50 (gen/int min: 10 max: 200)}
colour: colour
@@ -26,7 +26,7 @@
(fn (petal-2 angle: 0
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
(on-matrix-stack
(rotate angle: (math/radians->degrees angle: angle))
(rotate angle: (math/radians->degrees from: angle))
(bezier-bulging tessellation: 20
line-width: {50 (gen/int min: 10 max: 200)}
colour: colour
@@ -63,7 +63,7 @@
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0)
sc: 1.0)
(circ-1 petals: petals colour: colour sc: sc)
(rotate angle: (math/radians->degrees angle: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
(rotate angle: (math/radians->degrees from: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
(circ-2 petals: petals colour: colour sc: sc))

(fn (flower colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 0.5)
@@ -73,7 +73,7 @@
(on-matrix-stack
(translate vector: [posx posy])
(scale scalar: sc)
(define [c2 c3] (col/analagous colour: colour))
(define [c2 c3] (col/analagous from: colour))
(layered-petals petals: {23 (gen/int min: 1 max: 50)} colour: colour sc: {0.6 (gen/scalar min: 0.1 max: 0.9)})
(layered-petals petals: {19 (gen/int min: 1 max: 50)} colour: c3 sc: {0.5 (gen/scalar min: 0.1 max: 0.9)})
(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 @@
colour (col/value from: make-colour
t: (focal/value from: focalpoint position: position)))
(draw-tile position: [(+ px 5) (- py 5)]
colour: (col/set-e2 from: (col/convert colour: colour
colour: (col/set-e2 from: (col/convert from: colour
format: LAB)
value: 50))
(draw-tile position: position

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

@@ -35,7 +35,7 @@
;; outer ring
(circle-slice tessellation: 20
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {30 (gen/int min: 20 max: 60)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -46,7 +46,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {20 (gen/int min: 10 max: 40)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -57,7 +57,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {10 (gen/int min: 5 max: 20)} (prng/value from: srng)))
angle-start: 0
angle-end: 360
@@ -76,8 +76,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (col/value from: make-colour t: (focal/value from: focalpoint position: position)))
(interesting-circle position: position
radius: seed-radius

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

@@ -25,7 +25,7 @@
;; outer ring
(circle-slice tessellation: 30
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {411 (gen/stray-int from: 411 by: 10)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -36,7 +36,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {24 (gen/stray-int from: 24 by: 10)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -47,7 +47,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {140 (gen/stray-int from: 140 by: 10)} (prng/value from: srng)))
angle-start: 0
angle-end: 360

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

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

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

@@ -28,10 +28,10 @@
{-11 (gen/scalar min: -12 max: -10)}]))

(fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -39,10 +39,10 @@

(fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
(define th {2.3 (gen/scalar min: 0 max: 6)})
(line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
(* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
(* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
(line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
(* (y from: from) (math/sin from: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
(* (y from: to) (math/sin from: (+ th (* a math/PI))))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -44,9 +44,9 @@
{-7 (gen/scalar min: -15 max: 15)}]))

(fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
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 @@
{10 (gen/scalar min: -15 max: 15)}]))

(fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
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 @@
{-3 (gen/scalar min: -15 max: 15)}]))

(fn (per-pixel a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
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 @@
(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
(define a (col/e0 from: colour)
angle (+ {2.58 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {2 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {8 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-7 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {2 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {8 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-7 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {8.7 (gen/scalar min: 0.1 max: 15)} a)
brush: brush/d
brush-subtype: 1
@@ -30,10 +30,10 @@
(define
b (col/e2 from: colour)
angle (+ {3.30 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {11 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {9 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-3 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-9 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {11 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {9 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-3 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-9 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {0.9 (gen/scalar min: 0.1 max: 15)} b)
brush: brush/d
brush-subtype: 1

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

@@ -1,9 +1,9 @@
(define bar [])

;;(debug/print value: bar)
;;(debug/print value: (vector/length vector: bar))
;;(debug/print value: (vector/length from: bar))

(++ bar 54)

;;(debug/print value: bar)
;;(debug/print value: (vector/length vector: bar))
;;(debug/print value: (vector/length from: bar))

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

@@ -0,0 +1,75 @@
(meta linear-colour-space: 1)

(define
scalefactor {1.7 (gen/scalar min: 0.5 max: 3)}
hex-size {21 (gen/int min: 10 max: 100)}

background {(col/rgb r: 0.93 g: 0.32 b: 0.92 alpha: 0.83) (gen/col)}
colour-a {(col/rgb r: 0.63 g: 0.45 b: 0.98 alpha: 0.02) (gen/col)}
colour-b {(col/rgb r: 0.01 g: 0.96 b: 0.86 alpha: 0.59) (gen/col)}

focalpoint (focal/build-point position: [{480 (gen/int max: canvas/width)}
{595 (gen/int max: canvas/height)}]
distance: {864 (gen/int min: 200 max: canvas/width)})

centre [(/ canvas/width 2) (/ canvas/height 2)])


(fn (hexagon position: centre
colour: black
size: 100)
(circle colour: colour
radius: (* size 0.95)
position: position
tessellation: 6))

(fn (hex-grid from: [0 0]
to: [canvas/width canvas/height]
colour: red
size: 30)
(define
[fx fy] from
[tx ty] to
height (* size 2)
vert (* height 0.75)
width (* (/ (sqrt 3) 2) height))
(loop (y from: fy
to: (+ ty vert vert)
inc: (+ vert vert))
(loop (x from: fx
to: (+ tx width)
inc: width)
(hexagon size: size
colour: (col/set-alpha from: colour
value: (focal/value from: focalpoint position: [x y]))
position: [x y])))

(loop (y from: (+ fy vert)
to: (+ ty vert vert)
inc: (+ vert vert))
(loop (x from: (+ fx (/ width 2))
to: (+ tx width)
inc: width)
(hexagon size: size
colour: (col/set-alpha from: colour
value: (focal/value from: focalpoint position: [x y]))
position: [x y]))))

(rect position: centre
width: canvas/width
height: canvas/height
colour: background)

(translate vector: centre)
(rotate angle: {201 (gen/scalar max: 360)})
(scale scalar: scalefactor)

(hex-grid from: [-700 -700]
to: [700 700]
size: hex-size
colour: colour-a)

(hex-grid from: [-500 -500]
to: centre
size: hex-size
colour: colour-b)

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

@@ -12,27 +12,27 @@
left-rgb {(col/rgb r: 0.9 g: 1.0 b: 0 alpha: 1) (gen/col alpha: 1)}
right-rgb {(col/rgb r: 0.1 g: 0.0 b: 1 alpha: 1) (gen/col alpha: 1)}

left-hsluv (col/convert colour: left-rgb format: HSLuv)
right-hsluv (col/convert colour: right-rgb format: HSLuv)
left-hsluv (col/convert from: left-rgb format: HSLuv)
right-hsluv (col/convert from: right-rgb format: HSLuv)
interp-hsluv-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsluv) (col/e0 from: right-hsluv)])
interp-hsluv-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsluv) (col/e1 from: right-hsluv)])
interp-hsluv-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsluv) (col/e2 from: right-hsluv)])

left-hsl (col/convert colour: left-rgb format: HSL)
right-hsl (col/convert colour: right-rgb format: HSL)
left-hsl (col/convert from: left-rgb format: HSL)
right-hsl (col/convert from: right-rgb format: HSL)
interp-hsl-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsl) (col/e0 from: right-hsl)])
interp-hsl-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsl) (col/e1 from: right-hsl)])
interp-hsl-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsl) (col/e2 from: right-hsl)])

left-hsv (col/convert colour: left-rgb format: HSV)
right-hsv (col/convert colour: right-rgb format: HSV)
left-hsv (col/convert from: left-rgb format: HSV)
right-hsv (col/convert from: right-rgb format: HSV)
interp-hsv-h (interp/build from: [left-x right-x] to: [(col/e0 from: left-hsv) (col/e0 from: right-hsv)])
interp-hsv-s (interp/build from: [left-x right-x] to: [(col/e1 from: left-hsv) (col/e1 from: right-hsv)])
interp-hsv-v (interp/build from: [left-x right-x] to: [(col/e2 from: left-hsv) (col/e2 from: right-hsv)])


left-lab (col/convert colour: left-rgb format: LAB)
right-lab (col/convert colour: right-rgb format: LAB)
left-lab (col/convert from: left-rgb format: LAB)
right-lab (col/convert from: right-rgb format: LAB)
interp-lab-l (interp/build from: [left-x right-x] to: [(col/e2 from: left-lab) (col/e2 from: right-lab)])
interp-lab-a (interp/build from: [left-x right-x] to: [(col/e1 from: left-lab) (col/e1 from: right-lab)])
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 @@

(fn (box-stroke x1: 0 y1: 0 x2: 100 y2: 100 colour: red)
(loop (x from: x1 to: x2 inc: 50)
(brush-line colour: (col/lighten colour: colour
(brush-line colour: (col/lighten from: colour
value: (* (rng) 0.5))
width: 60
from: [x y1]
@@ -66,7 +66,7 @@
brush-type: "brushC"
brush-subtype: (rng)))
(loop (y from: y1 to: y2 inc: 50)
(brush-line colour: (col/lighten colour: colour
(brush-line colour: (col/lighten from: colour
value: (* (rng) 0.5))
width: 60
from: [x1 y]
@@ -76,7 +76,7 @@


(fn (boxy x1: 0 y1: 0 x2: 100 y2: 100 colour: red)
(define complementary (col/complementary colour: colour))
(define complementary (col/complementary from: colour))
(box-stroke x1: x1
y1: y1
x2: x2

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

@@ -23,7 +23,7 @@
;; outer ring
(circle-slice tessellation: 20
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {30 (gen/int min: 20 max: 60)} (srng)))
angle-start: 0
angle-end: 320
@@ -34,7 +34,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {20 (gen/int min: 10 max: 40)} (srng)))
angle-start: 0
angle-end: 320
@@ -45,7 +45,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {10 (gen/int min: 5 max: 20)} (srng)))
angle-start: 0
angle-end: 360
@@ -60,8 +60,8 @@
(fn (tentacle position: [0 0]
angle: 0)
(define [x y] position
cosa (math/cos angle: angle)
sina (math/sin angle: angle)
cosa (math/cos from: angle)
sina (math/sin from: angle)
min-pos-rad 28
max-pos-rad 300
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 @@
(triad-b triad-c) ({col/analagous (gen/select from: ['col/analagous
'col/split-complementary
'col/triad])}
colour: main-col))
from: main-col))
(rect position: [500 500]
width: 1000
height: 1000

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

@@ -40,7 +40,7 @@
;; outer ring
(circle-slice tessellation: 30
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {30 (gen/int min: 20 max: 60)} (srng)))
angle-start: 0
angle-end: 320
@@ -51,7 +51,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {20 (gen/int min: 10 max: 40)} (srng)))
angle-start: 0
angle-end: 320
@@ -62,7 +62,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
delta: (* {10 (gen/int min: 5 max: 20)} (srng)))
angle-start: 0
angle-end: 360
@@ -80,8 +80,8 @@
(loop (i to: seeds)
(define theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (make-colour t: (focalpoint position: position)))
(interesting-circle position: position
radius: seed-radius

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

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

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

@@ -64,7 +64,7 @@
rng (prng/build min: -1 max: 1 seed: seed)

half-alpha (/ (col/alpha from: colour) 2)
lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
value: half-alpha))

; horizontal strips

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

@@ -27,7 +27,7 @@
vec1: [{500 (gen/int min:0 max: canvas/width)}
{800 (gen/int min:0 max: canvas/height)}]
vec2: [x-pos y-pos])
volatility (math/clamp value: (/ (- (/ canvas/width 2)
volatility (math/clamp from: (/ (- (/ canvas/width 2)
distance-from-centre)
{12 (gen/int min:5 max: 50)})
min: 0
@@ -73,7 +73,7 @@
rng (prng/build min: -1 max: 1 seed: seed)

half-alpha (/ (col/alpha from: colour) 2)
lab-colour (col/set-alpha from: (col/convert format: LAB colour: colour)
lab-colour (col/set-alpha from: (col/convert format: LAB from: colour)
value: half-alpha))

; horizontal strips

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

@@ -15,7 +15,7 @@
(fn (petal-1 angle: 0
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
(on-matrix-stack
(rotate angle: (math/radians->degrees angle: angle))
(rotate angle: (math/radians->degrees from: angle))
(bezier-bulging tessellation: 20
line-width: {50 (gen/int min: 10 max: 200)}
colour: colour
@@ -27,7 +27,7 @@
(fn (petal-2 angle: 0
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0))
(on-matrix-stack
(rotate angle: (math/radians->degrees angle: angle))
(rotate angle: (math/radians->degrees from: angle))
(bezier-bulging tessellation: 20
line-width: {50 (gen/int min: 10 max: 200)}
colour: colour
@@ -64,7 +64,7 @@
colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 1.0)
sc: 1.0)
(circ-1 petals: petals colour: colour sc: sc)
(rotate angle: (math/radians->degrees angle: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
(rotate angle: (math/radians->degrees from: {0.1 (gen/scalar min: 0.01 max: 0.4)}))
(circ-2 petals: petals colour: colour sc: sc))

(fn (flower colour: (col/rgb r: 0.0 g: 1.0 b: 0.0 alpha: 0.5)
@@ -74,7 +74,7 @@
(on-matrix-stack
(translate vector: [posx posy])
(scale scalar: sc)
(define [c2 c3] (col/analagous colour: colour))
(define [c2 c3] (col/analagous from: colour))
(layered-petals petals: {23 (gen/int min: 1 max: 50)} colour: colour sc: {0.6 (gen/scalar min: 0.1 max: 0.9)})
(layered-petals petals: {19 (gen/int min: 1 max: 50)} colour: c3 sc: {0.5 (gen/scalar min: 0.1 max: 0.9)})
(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 @@
(loop (i to: passes)
(define [rr xr yr] (prng/values num: 3 from: rng))
(on-matrix-stack
(rotate angle: (radians->degrees angle: (* rr 0.02 volatility)))
(rotate angle: (math/radians->degrees from: (* rr 0.02 volatility)))
(rect position: [(* xr 5 volatility) (* yr 5 volatility)]
width: width
height: height

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

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

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

@@ -36,7 +36,7 @@
;; outer ring
(circle-slice tessellation: 20
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {30 (gen/int min: 20 max: 60)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -47,7 +47,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {20 (gen/int min: 10 max: 40)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -58,7 +58,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {10 (gen/int min: 5 max: 20)} (prng/value from: srng)))
angle-start: 0
angle-end: 360
@@ -77,8 +77,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (col/value from: make-colour t: (focal/value from: focalpoint position: position)))
(interesting-circle position: position
radius: seed-radius

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

@@ -26,7 +26,7 @@
;; outer ring
(circle-slice tessellation: 30
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {411 (gen/int min: 20 max: 600)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -37,7 +37,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {24 (gen/int min: 10 max: 400)} (prng/value from: srng)))
angle-start: 0
angle-end: 320
@@ -48,7 +48,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {140 (gen/int min: 5 max: 200)} (prng/value from: srng)))
angle-start: 0
angle-end: 360

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

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

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

@@ -23,7 +23,7 @@
(circle tessellation: 30
position: (vector/multiply vector: position
scalar: {1.010 (gen/scalar min: 1 max: 1.05)})
colour: (col/darken colour: colour value: {20 (gen/int min: 0 max: 40)})
colour: (col/darken from: colour value: {20 (gen/int min: 0 max: 40)})
radius: (* {1 (gen/scalar min: 1 max: 1.1)} radius)))


@@ -68,7 +68,7 @@
;; outer ring
(circle-slice tessellation: 20
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {30 (gen/int min: 20 max: 60)} (srng)))
angle-start: 0
angle-end: 320
@@ -79,7 +79,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {20 (gen/int min: 10 max: 40)} (srng)))
angle-start: 0
angle-end: 320
@@ -90,7 +90,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {10 (gen/int min: 5 max: 20)} (srng)))
angle-start: 0
angle-end: 360
@@ -108,8 +108,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (make-colour t: (focalpoint position: position)))
(background-circle position: position
radius: seed-radius
@@ -123,8 +123,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (make-colour t: (focalpoint position: position)))
(shadow-circle position: position
radius: seed-radius
@@ -138,8 +138,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (make-colour t: (focalpoint position: position)))
(interesting-circle position: position
radius: seed-radius

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

@@ -82,7 +82,7 @@
;; outer ring
(circle-slice tessellation: 30
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {145 (gen/int min: 20 max: 600)} (srng)))
angle-start: 0
angle-end: 320
@@ -93,7 +93,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {35 (gen/int min: 10 max: 400)} (srng)))
angle-start: 0
angle-end: 320
@@ -104,7 +104,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {60 (gen/int min: 5 max: 200)} (srng)))
angle-start: 0
angle-end: 360
@@ -147,8 +147,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (col/set-alpha from: (col-fn-1 t: (focalpoint position: position))
value: 0.4))
;; don't render some of the offscreen circles

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

@@ -82,7 +82,7 @@
;; outer ring
(circle-slice tessellation: 30
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {85 (gen/int min: 20 max: 600)} (srng)))
angle-start: 0
angle-end: 320
@@ -93,7 +93,7 @@
;; inner ring
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {54 (gen/int min: 10 max: 400)} (srng)))
angle-start: 0
angle-end: 320
@@ -104,7 +104,7 @@
;; centre fill
(circle-slice tessellation: 10
position: [0 0]
colour: (col/lighten colour: colour
colour: (col/lighten from: colour
value: (* {66 (gen/int min: 5 max: 200)} (srng)))
angle-start: 0
angle-end: 360
@@ -147,8 +147,8 @@
(define
theta (/ (* i math/TAU) phi)
r (* scale-factor (sqrt i))
position [(* r (math/cos angle: theta))
(* r (math/sin angle: theta))]
position [(* r (math/cos from: theta))
(* r (math/sin from: theta))]
colour (col/set-alpha from: (col-fn-1 t: (focalpoint position: position))
value: 0.4))
;; don't render some of the offscreen circles

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

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

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

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


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

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


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

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

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

@@ -16,10 +16,10 @@
(define r (col/e0 from: colour)
angle (+ {3.38 (gen/scalar min: 0 max: 8)} (* r math/PI)))
(if (> r 0)
(line from: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-13 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-12 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {0 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-13 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-12 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {0 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {5.1 (gen/scalar min: 0.1 max: 8)} r)
brush: {brush/f (gen/select from: brush/*)}
brush-subtype: {8 (gen/int min: 0 max: 10)}
@@ -29,10 +29,10 @@
(define b (col/e2 from: colour)
angle (+ {1.39 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(if (> b 0)
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {3 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {10 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {3 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {10 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {2.0 (gen/scalar min: 0.1 max: 3)} b)
brush: {brush/e (gen/select from: brush/*)}
brush-subtype: {0 (gen/int min: 0 max: 10)}

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

@@ -22,10 +22,10 @@
(define
a (col/e0 from: colour)
angle (+ {6.13 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {14 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {10 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-13 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {14 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {10 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-13 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {11.6 (gen/scalar min: 0.1 max: 15)} a)
brush: {brush/f (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
(define
b (col/e2 from: colour)
angle (+ {2.65 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {2 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {9 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
to: [(* {-1 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {-7 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
(line from: [(* {2 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {9 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
to: [(* {-1 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {-7 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
width: (- {2.3 (gen/scalar min: 1 max: 3)} b)
brush: {brush/g (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -22,10 +22,10 @@
(define
a (col/e0 from: colour)
angle (+ {0.93 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {4 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-11 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {4 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-11 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {0.7 (gen/scalar min: 0.1 max: 15)} a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
(define
b (col/e2 from: colour)
angle (+ {0.92 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-6 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {6 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
to: [(* {0 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {-2 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
(line from: [(* {-6 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {6 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
to: [(* {0 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {-2 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
width: (- {1.3 (gen/scalar min: 1 max: 3)} b)
brush: {brush/b (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -22,10 +22,10 @@
(define
a (col/e0 from: colour)
angle (+ {6.18 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {7 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {10 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-8 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {7 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {10 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-8 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {11.5 (gen/scalar min: 0.1 max: 15)} a)
brush: {brush/flat (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
(define
b (col/e2 from: colour)
angle (+ {2.25 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-10 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {4 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
to: [(* {-9 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {8 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
(line from: [(* {-10 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {4 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
to: [(* {-9 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {8 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
width: (- {1.1 (gen/scalar min: 1 max: 3)} b)
brush: {brush/b (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -22,10 +22,10 @@
(define
a (col/e0 from: colour)
angle (+ {0.37 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {6 (gen/scalar min: 5 max: 10)} (math/cos angle: angle))
(* {13 (gen/scalar min: 10 max: 15)} (math/sin angle: angle))]
to: [(* {-5 (gen/scalar min: -10 max: 0)} (math/cos angle: angle))
(* {-6 (gen/scalar min: -10 max: 0)} (math/sin angle: angle))]
(line from: [(* {6 (gen/scalar min: 5 max: 10)} (math/cos from: angle))
(* {13 (gen/scalar min: 10 max: 15)} (math/sin from: angle))]
to: [(* {-5 (gen/scalar min: -10 max: 0)} (math/cos from: angle))
(* {-6 (gen/scalar min: -10 max: 0)} (math/sin from: angle))]
width: (- {1.9 (gen/scalar min: 0.1 max: 3)} a)
brush: {brush/g (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
(define
b (col/e2 from: colour)
angle (+ {6.12 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-2 (gen/scalar min: -5 max: 2)} (math/cos angle: angle))
(* {11 (gen/scalar min: 7 max: 15)} (math/sin angle: angle))]
to: [(* {14 (gen/scalar min: 10 max: 15)} (math/cos angle: angle))
(* {4 (gen/scalar min: 0 max: 5)} (math/sin angle: angle))]
(line from: [(* {-2 (gen/scalar min: -5 max: 2)} (math/cos from: angle))
(* {11 (gen/scalar min: 7 max: 15)} (math/sin from: angle))]
to: [(* {14 (gen/scalar min: 10 max: 15)} (math/cos from: angle))
(* {4 (gen/scalar min: 0 max: 5)} (math/sin from: angle))]
width: (- {3.2 (gen/scalar min: 2.1 max: 5)} b)
brush: {brush/b (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -29,10 +29,10 @@
{-11 (gen/scalar min: -12 max: -10)}]))

(fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -40,10 +40,10 @@

(fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
(define th {2.3 (gen/scalar min: 0 max: 6)})
(line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
(* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
(* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
(line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
(* (y from: from) (math/sin from: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
(* (y from: to) (math/sin from: (+ th (* a math/PI))))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -31,10 +31,10 @@
{-11 (gen/scalar min: -13 max: -8)}]))

(fn (per-pixel-1 a: 0 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -42,10 +42,10 @@

(fn (per-pixel-2 a: 0 width: 0 from: [0 0] to: [0 0])
(define th {0 (gen/scalar min: 0 max: 6)})
(line from: [(* (x from: from) (math/cos angle: (+ th (* a math/PI))))
(* (y from: from) (math/sin angle: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos angle: (+ th (* a math/PI))))
(* (y from: to) (math/sin angle: (+ th (* a math/PI))))]
(line from: [(* (x from: from) (math/cos from: (+ th (* a math/PI))))
(* (y from: from) (math/sin from: (+ th (* a math/PI))))]
to: [(* (x from: to) (math/cos from: (+ th (* a math/PI))))
(* (y from: to) (math/sin from: (+ th (* a math/PI))))]
width: (- width a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -22,10 +22,10 @@
(define
a (col/e0 from: colour)
angle (+ {7.83 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {11 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-6 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {5 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {11 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-6 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {5 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {7.7 (gen/scalar min: 0.1 max: 15)} a)
brush: {brush/c (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)
@@ -35,10 +35,10 @@
(define
b (col/e2 from: colour)
angle (+ {5.69 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-2 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {4 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
to: [(* {1 (gen/scalar min: -10 max: 10)} (math/cos angle: angle))
(* {3 (gen/scalar min: -10 max: 10)} (math/sin angle: angle))]
(line from: [(* {-2 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {4 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
to: [(* {1 (gen/scalar min: -10 max: 10)} (math/cos from: angle))
(* {3 (gen/scalar min: -10 max: 10)} (math/sin from: angle))]
width: (- {3.0 (gen/scalar min: 1 max: 3)} b)
brush: {brush/b (gen/select from: brush/*)}
brush-subtype: (prng/value from: rng)

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

@@ -18,10 +18,10 @@
(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
(define a (col/e0 from: colour)
angle (+ {1.65 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {8 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-5 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-1 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {8 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-5 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-9 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-1 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {5.6 (gen/scalar min: 0.1 max: 15)} a)
brush: brush/d
brush-subtype: 1
@@ -31,10 +31,10 @@
(define
b (col/e2 from: colour)
angle (+ {6.07 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-2 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-6 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-2 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-6 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {4 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {2.3 (gen/scalar min: 0.1 max: 15)} b)
brush: brush/d
brush-subtype: 1

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

@@ -18,10 +18,10 @@
(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
(define a (col/e0 from: colour)
angle (+ {1.06 (gen/scalar min: 0 max: 8)} (* a math/PI)))
(line from: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {7 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {7 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-13 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {11.1 (gen/scalar min: 0.1 max: 15)} a)
brush: brush/d
brush-subtype: 1
@@ -31,10 +31,10 @@
(define
b (col/e2 from: colour)
angle (+ {1.16 (gen/scalar min: 0 max: 8)} (* b math/PI)))
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {-2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
to: [(* {-8 (gen/scalar min: -15 max: 15)} (math/cos angle: angle))
(* {2 (gen/scalar min: -15 max: 15)} (math/sin angle: angle))]
(line from: [(* {-1 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {-2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
to: [(* {-8 (gen/scalar min: -15 max: 15)} (math/cos from: angle))
(* {2 (gen/scalar min: -15 max: 15)} (math/sin from: angle))]
width: (- {4.6 (gen/scalar min: 0.1 max: 15)} b)
brush: brush/d
brush-subtype: 1

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

@@ -42,7 +42,7 @@
(fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))
@@ -55,7 +55,7 @@
(fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))

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

@@ -42,7 +42,7 @@
(fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))
@@ -55,7 +55,7 @@
(fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))

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

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

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

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

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

@@ -49,19 +49,19 @@
{-3 (gen/scalar min: -15 max: 15)}]))

(fn (per-pixel a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (+ 0 (- width a))
brush: brush/b
colour: (col/rgb r: a g: a b: a alpha: alpha)))

(fn (per-pixel-rng a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
(line from: [(* (prng/value from: rng) (x from: from) (math/cos angle: (* a math/PI)))
(* (prng/value from: rng) (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (prng/value from: rng) (x from: to) (math/cos angle: (* a math/PI)))
(* (prng/value from: rng) (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (prng/value from: rng) (x from: from) (math/cos from: (* a math/PI)))
(* (prng/value from: rng) (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (prng/value from: rng) (x from: to) (math/cos from: (* a math/PI)))
(* (prng/value from: rng) (y from: to) (math/sin from: (* a math/PI)))]
width: (+ 0 (- width a))
brush: brush/b
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 @@
{4 (gen/scalar min: -15 max: 15)}]))

(fn (per-pixel a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
(line from: [(* (x from: from) (math/cos angle: (* a math/PI)))
(* (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (x from: to) (math/cos angle: (* a math/PI)))
(* (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (x from: from) (math/cos from: (* a math/PI)))
(* (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (x from: to) (math/cos from: (* a math/PI)))
(* (y from: to) (math/sin from: (* a math/PI)))]
width: (+ 0 (- width a))
brush: brush/b
colour: (col/rgb r: a g: a b: a alpha: alpha)))

(fn (per-pixel-rng a: 0 alpha: 1 width: 0 from: [0 0] to: [0 0])
(line from: [(* (prng/value from: rng) (x from: from) (math/cos angle: (* a math/PI)))
(* (prng/value from: rng) (y from: from) (math/sin angle: (* a math/PI)))]
to: [(* (prng/value from: rng) (x from: to) (math/cos angle: (* a math/PI)))
(* (prng/value from: rng) (y from: to) (math/sin angle: (* a math/PI)))]
(line from: [(* (prng/value from: rng) (x from: from) (math/cos from: (* a math/PI)))
(* (prng/value from: rng) (y from: from) (math/sin from: (* a math/PI)))]
to: [(* (prng/value from: rng) (x from: to) (math/cos from: (* a math/PI)))
(* (prng/value from: rng) (y from: to) (math/sin from: (* a math/PI)))]
width: (+ 0 (- width a))
brush: brush/b
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 @@

[col1 col2 col3 col4 col5] (col/palette index: {0 (gen/scalar min: 0 max: 200)})

hslcol1 (col/convert colour: col1 format: HSLuv)
hslcol2 (col/convert colour: col2 format: HSLuv)
hslcol3 (col/convert colour: col3 format: HSLuv)
hslcol4 (col/convert colour: col4 format: HSLuv)
hslcol5 (col/convert colour: col5 format: HSLuv)
hslcol1 (col/convert from: col1 format: HSLuv)
hslcol2 (col/convert from: col2 format: HSLuv)
hslcol3 (col/convert from: col3 format: HSLuv)
hslcol4 (col/convert from: col4 format: HSLuv)
hslcol5 (col/convert from: col5 format: HSLuv)
hslrng (prng/build seed: 42
min: -10
max: 10)
@@ -51,7 +51,7 @@
(fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))
@@ -64,7 +64,7 @@
(fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
(define col (col/set-alpha value: strength
from: (col/set-e1 value: (* 100 strength)
from: (col/convert format: HSLuv colour: colour))))
from: (col/convert format: HSLuv from: colour))))
(on-matrix-stack
(translate vector: [x y])
(rotate angle: (prng/value from: ra))

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

@@ -14,10 +14,10 @@
(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
(define a (col/e0 from: colour)
angle (+ {6.37 (gen/stray from: 6.37 by: 2.00)} (* a math/PI)))
(line from: [(* {7.00 (gen/stray from: 7.00 by: 2.00)} (math/cos angle))
(* {12.00 (gen/stray from: 12.00 by: 2.00)} (math/sin angle))]
to: [(* {4.00 (gen/stray from: 4.00 by: 2.00)} (math/cos angle))
(* {-13.00 (gen/stray from: -13.00 by: 2.00)} (math/sin angle))]
(line from: [(* {7.00 (gen/stray from: 7.00 by: 2.00)} (math/cos from: angle))
(* {12.00 (gen/stray from: 12.00 by: 2.00)} (math/sin from: angle))]
to: [(* {4.00 (gen/stray from: 4.00 by: 2.00)} (math/cos from: angle))
(* {-13.00 (gen/stray from: -13.00 by: 2.00)} (math/sin from: angle))]
width: (- {12.50 (gen/stray from: 12.50 by: 2.00)} a)
brush: brush/d
brush-subtype: 1
@@ -27,10 +27,10 @@
(define
b (col/e2 from: colour)
angle (+ {6.82 (gen/stray from: 6.82 by: 2)} (* b math/PI)))
(line from: [(* {14.00 (gen/stray from: 14.00 by: 2.00)} (math/cos angle))
(* {8.00 (gen/stray from: 8.00 by: 2.00)} (math/sin angle))]
to: [(* {10.00 (gen/stray from: 10.00 by: 2.00)} (math/cos angle))
(* {1.00 (gen/stray from: 1.00 by: 2.00)} (math/sin angle))]
(line from: [(* {14.00 (gen/stray from: 14.00 by: 2.00)} (math/cos from: angle))
(* {8.00 (gen/stray from: 8.00 by: 2.00)} (math/sin from: angle))]
to: [(* {10.00 (gen/stray from: 10.00 by: 2.00)} (math/cos from: angle))
(* {1.00 (gen/stray from: 1.00 by: 2.00)} (math/sin from: angle))]
width: (- {2.40 (gen/stray from: 2.40 by: 2.00)} b)
brush: brush/d
brush-subtype: 1

Loading…
Cancel
Save