File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ def setup
20
20
background 0
21
21
sketch_title 'Arc Tesselation'
22
22
# create a java primitive array of signed int
23
- # @cols = from_web_array (PALETTE)
24
- @group = ColorGroup . from_web_array ( PALETTE . to_java ( :string )
23
+ # @cols = web_to_color_array (PALETTE)
24
+ @group = ColorGroup . from_web_array ( PALETTE . to_java ( :string ) )
25
25
@cols = group . colors
26
26
stroke_weight 1.5
27
27
stroke_cap SQUARE
@@ -31,6 +31,7 @@ def setup
31
31
32
32
def draw
33
33
arc_pattern
34
+ no_loop
34
35
end
35
36
36
37
def sep_index ( idx , length )
@@ -62,16 +63,17 @@ def arc_pattern
62
63
end
63
64
pop_matrix
64
65
end
65
- no_loop
66
66
end
67
67
68
68
def mouse_pressed
69
+ loop
69
70
group . shuffle! if coloured
70
71
@cols = group . colors
71
- puts group . ruby_code # prints out current web colors as ruby code
72
- loop
72
+ puts group . ruby_string # prints out current web colors as an array of String
73
73
end
74
74
75
+
76
+
75
77
def key_typed
76
78
case key
77
79
when 'c' , 'C'
Original file line number Diff line number Diff line change 1
- # frozen_string_literal: true
2
-
3
1
require 'picrate'
4
2
5
3
# After an openprocessing sketch by C.Andrews
@@ -10,7 +8,7 @@ class RecursivePentagons < Processing::App
10
8
def setup
11
9
sketch_title 'Recursive Pentagons'
12
10
@strut_factor = 0.2
13
- @renderer = GfxRender . new self # so we can send Vec2D :to_vertex
11
+ @renderer = GfxRender . new g # so we can send Vec2D :to_vertex
14
12
group = ColorGroup . from_web_array ( PALETTE . to_java ( :string ) )
15
13
@cols = group . colors
16
14
no_loop
You can’t perform that action at this time.
0 commit comments