Skip to content

Commit 5d4089d

Browse files
committed
careful random
1 parent 7120aed commit 5d4089d

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

examples/WOVNS/random_grid.rb

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,39 @@ def setup
1212
sketch_title 'Random Grid'
1313
@web = COULEURS.zip(web_to_color_array(PALETTE)).to_h
1414
no_stroke
15-
shapeOne = createShape(ELLIPSE, 0, 0, 20, 20)
16-
shapeOne.setFill(web[:pinking])
17-
shapeTwo = createShape(GROUP)
18-
one = createShape(ELLIPSE, 42, 42, 20, 20)
19-
one.setFill(web[:pinking])
20-
two = createShape(ELLIPSE, 21, 21, 20, 20)
21-
one.setFill(web[:yolk])
22-
shapeTwo.addChild(one)
23-
shapeTwo.addChild(two)
24-
shapeThree = createShape(GROUP)
25-
base = createShape(ELLIPSE, 0, 0, 20, 20)
26-
base.setFill(web[:pinking])
27-
three = createShape(ELLIPSE, 21, 21, 20, 20)
28-
three.setFill(web[:pinking])
29-
four = createShape(ELLIPSE, 42, 42, 20, 20)
30-
four.setFill(web[:yolk])
31-
shapeThree.addChild(base)
32-
shapeThree.addChild(three)
33-
shapeThree.addChild(four)
34-
shapeFour = createShape(GROUP)
35-
five = createShape(ELLIPSE, 0, 0, 20, 20)
36-
five.setFill(web[:pinking])
37-
six = createShape(ELLIPSE, 21, 21, 20, 20)
38-
six.setFill(web[:pinking])
39-
seven = createShape(ELLIPSE, 42, 42, 20, 20)
40-
seven.setFill(web[:pinking])
41-
eight = createShape(ELLIPSE, 63, 63, 20, 20)
42-
eight.setFill(web[:yolk])
43-
shapeFour.addChild(five)
44-
shapeFour.addChild(six)
45-
shapeFour.addChild(seven)
46-
shapeFour.addChild(eight)
47-
@shapes = [shapeOne, shapeTwo, shapeThree, shapeFour]
15+
shape_one = create_shape(ELLIPSE, 0, 0, 20, 20)
16+
shape_one.set_fill(web[:pinking])
17+
shape_two = create_shape(GROUP)
18+
one = create_shape(ELLIPSE, 42, 42, 20, 20)
19+
one.set_fill(web[:pinking])
20+
two = create_shape(ELLIPSE, 21, 21, 20, 20)
21+
one.set_fill(web[:yolk])
22+
shape_two.add_child(one)
23+
shape_two.add_child(two)
24+
shape_three = create_shape(GROUP)
25+
base = create_shape(ELLIPSE, 0, 0, 20, 20)
26+
base.set_fill(web[:pinking])
27+
three = create_shape(ELLIPSE, 21, 21, 20, 20)
28+
three.set_fill(web[:pinking])
29+
four = create_shape(ELLIPSE, 42, 42, 20, 20)
30+
four.set_fill(web[:yolk])
31+
shape_three.add_child(base)
32+
shape_three.add_child(three)
33+
shape_three.add_child(four)
34+
shape_four = create_shape(GROUP)
35+
five = create_shape(ELLIPSE, 0, 0, 20, 20)
36+
five.set_fill(web[:pinking])
37+
six = create_shape(ELLIPSE, 21, 21, 20, 20)
38+
six.set_fill(web[:pinking])
39+
seven = create_shape(ELLIPSE, 42, 42, 20, 20)
40+
seven.set_fill(web[:pinking])
41+
eight = create_shape(ELLIPSE, 63, 63, 20, 20)
42+
eight.set_fill(web[:yolk])
43+
shape_four.add_child(five)
44+
shape_four.add_child(six)
45+
shape_four.add_child(seven)
46+
shape_four.add_child(eight)
47+
@shapes = [shape_one, shape_two, shape_three, shape_four]
4848
end
4949

5050
def draw

0 commit comments

Comments
 (0)