mooncats 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 73a562781defbd28b7cd681aae41379de40fbf3704a5a97834ce530d71dda15f
4
+ data.tar.gz: 8abb18f6713ab38a9e68a84acff16ca3f3e71fb57edc93cb15f204b612c88804
5
+ SHA512:
6
+ metadata.gz: 34f9b2e6117b7a8fe4134dc20cbdb9541cbb97500e278853d76defeca1d48b6fa32d312de84ec557701ccf5835108e4bffbfc1b12bb27f71f031fb6aa6899c13
7
+ data.tar.gz: aef96b644a304e287ee44b7539ea2705b7c98c2d9a40cdb4c3ef76ff1b59b96ec380ee3b5ec22d0acf70ed760748fefdfcd554e3eb30ad1cdab79b66362322ec
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 / 2021-03-16
2
+
3
+ * Everything is new. First release
data/LICENSE.md ADDED
@@ -0,0 +1,116 @@
1
+ CC0 1.0 Universal
2
+
3
+ Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer
6
+ exclusive Copyright and Related Rights (defined below) upon the creator and
7
+ subsequent owner(s) (each and all, an "owner") of an original work of
8
+ authorship and/or a database (each, a "Work").
9
+
10
+ Certain owners wish to permanently relinquish those rights to a Work for the
11
+ purpose of contributing to a commons of creative, cultural and scientific
12
+ works ("Commons") that the public can reliably and without fear of later
13
+ claims of infringement build upon, modify, incorporate in other works, reuse
14
+ and redistribute as freely as possible in any form whatsoever and for any
15
+ purposes, including without limitation commercial purposes. These owners may
16
+ contribute to the Commons to promote the ideal of a free culture and the
17
+ further production of creative, cultural and scientific works, or to gain
18
+ reputation or greater distribution for their Work in part through the use and
19
+ efforts of others.
20
+
21
+ For these and/or other purposes and motivations, and without any expectation
22
+ of additional consideration or compensation, the person associating CC0 with a
23
+ Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25
+ and publicly distribute the Work under its terms, with knowledge of his or her
26
+ Copyright and Related Rights in the Work and the meaning and intended legal
27
+ effect of CC0 on those rights.
28
+
29
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
30
+ protected by copyright and related or neighboring rights ("Copyright and
31
+ Related Rights"). Copyright and Related Rights include, but are not limited
32
+ to, the following:
33
+
34
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
35
+ and translate a Work;
36
+
37
+ ii. moral rights retained by the original author(s) and/or performer(s);
38
+
39
+ iii. publicity and privacy rights pertaining to a person's image or likeness
40
+ depicted in a Work;
41
+
42
+ iv. rights protecting against unfair competition in regards to a Work,
43
+ subject to the limitations in paragraph 4(a), below;
44
+
45
+ v. rights protecting the extraction, dissemination, use and reuse of data in
46
+ a Work;
47
+
48
+ vi. database rights (such as those arising under Directive 96/9/EC of the
49
+ European Parliament and of the Council of 11 March 1996 on the legal
50
+ protection of databases, and under any national implementation thereof,
51
+ including any amended or successor version of such directive); and
52
+
53
+ vii. other similar, equivalent or corresponding rights throughout the world
54
+ based on applicable law or treaty, and any national implementations thereof.
55
+
56
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58
+ unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59
+ and Related Rights and associated claims and causes of action, whether now
60
+ known or unknown (including existing as well as future claims and causes of
61
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
62
+ duration provided by applicable law or treaty (including future time
63
+ extensions), (iii) in any current or future medium and for any number of
64
+ copies, and (iv) for any purpose whatsoever, including without limitation
65
+ commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66
+ the Waiver for the benefit of each member of the public at large and to the
67
+ detriment of Affirmer's heirs and successors, fully intending that such Waiver
68
+ shall not be subject to revocation, rescission, cancellation, termination, or
69
+ any other legal or equitable action to disrupt the quiet enjoyment of the Work
70
+ by the public as contemplated by Affirmer's express Statement of Purpose.
71
+
72
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
73
+ judged legally invalid or ineffective under applicable law, then the Waiver
74
+ shall be preserved to the maximum extent permitted taking into account
75
+ Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76
+ is so judged Affirmer hereby grants to each affected person a royalty-free,
77
+ non transferable, non sublicensable, non exclusive, irrevocable and
78
+ unconditional license to exercise Affirmer's Copyright and Related Rights in
79
+ the Work (i) in all territories worldwide, (ii) for the maximum duration
80
+ provided by applicable law or treaty (including future time extensions), (iii)
81
+ in any current or future medium and for any number of copies, and (iv) for any
82
+ purpose whatsoever, including without limitation commercial, advertising or
83
+ promotional purposes (the "License"). The License shall be deemed effective as
84
+ of the date CC0 was applied by Affirmer to the Work. Should any part of the
85
+ License for any reason be judged legally invalid or ineffective under
86
+ applicable law, such partial invalidity or ineffectiveness shall not
87
+ invalidate the remainder of the License, and in such case Affirmer hereby
88
+ affirms that he or she will not (i) exercise any of his or her remaining
89
+ Copyright and Related Rights in the Work or (ii) assert any associated claims
90
+ and causes of action with respect to the Work, in either case contrary to
91
+ Affirmer's express Statement of Purpose.
92
+
93
+ 4. Limitations and Disclaimers.
94
+
95
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
96
+ surrendered, licensed or otherwise affected by this document.
97
+
98
+ b. Affirmer offers the Work as-is and makes no representations or warranties
99
+ of any kind concerning the Work, express, implied, statutory or otherwise,
100
+ including without limitation warranties of title, merchantability, fitness
101
+ for a particular purpose, non infringement, or the absence of latent or
102
+ other defects, accuracy, or the present or absence of errors, whether or not
103
+ discoverable, all to the greatest extent permissible under applicable law.
104
+
105
+ c. Affirmer disclaims responsibility for clearing rights of other persons
106
+ that may apply to the Work or any use thereof, including without limitation
107
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
108
+ disclaims responsibility for obtaining any necessary consents, permissions
109
+ or other rights required for any use of the Work.
110
+
111
+ d. Affirmer understands and acknowledges that Creative Commons is not a
112
+ party to this document and has no duty or obligation with respect to this
113
+ CC0 or use of the Work.
114
+
115
+ For more information, please see
116
+ <http://creativecommons.org/publicdomain/zero/1.0/>
data/Manifest.txt ADDED
@@ -0,0 +1,10 @@
1
+ CHANGELOG.md
2
+ LICENSE.md
3
+ Manifest.txt
4
+ README.md
5
+ Rakefile
6
+ bin/mooncat
7
+ lib/mooncats.rb
8
+ lib/mooncats/designs.rb
9
+ lib/mooncats/image.rb
10
+ lib/mooncats/version.rb
data/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # Mooncats
2
+
3
+ mooncats - mint your own mooncat pixel art images off chain using any of the 128 True Official Genuine Mooncat™ md5-verified original designs; incl. 2x/4x/8x zoom for bigger sizes
4
+
5
+ * home :: [github.com/cryptocopycats/mooncats](https://github.com/cryptocopycats/mooncats)
6
+ * bugs :: [github.com/cryptocopycats/mooncats/issues](https://github.com/cryptocopycats/mooncats/issues)
7
+ * gem :: [rubygems.org/gems/mooncats](https://rubygems.org/gems/mooncats)
8
+ * rdoc :: [rubydoc.info/gems/mooncats](http://rubydoc.info/gems/mooncats)
9
+
10
+
11
+ New to Mooncats?
12
+ See the [**Awesome MoonCatRescue Bubble (Anno 2021) - Modern Crypto Pixel Art on the Blockchain** »](https://github.com/cryptocopycats/awesome-mooncatrescue-bubble)
13
+
14
+
15
+
16
+ ## Command Line
17
+
18
+ Use the `mooncat` command line tool. Try:
19
+
20
+ ```
21
+ $ mooncat -h
22
+ ```
23
+
24
+ resulting in:
25
+
26
+ ```
27
+ Usage: mooncat [options] IDs
28
+ Mint mooncats from original designs - for IDs use 5 byte hexstrings (e.g 0x004fc21270)
29
+
30
+ Options:
31
+ -z, --zoom=ZOOM Zoom factor x2, x4, x8, etc. (default: 1)
32
+ -d, --dir=DIR Output directory (default: .)
33
+ -h, --help Prints this help
34
+ ```
35
+
36
+
37
+ Now let's give it a try. Let's mint mooncats 0x00000800fa,
38
+ 0x0077c8278d, and 0xff5f000ca7:
39
+
40
+
41
+ ```
42
+ $ mooncat 0x00000800fa 0x0077c8278d 0xff5f000ca7
43
+ ```
44
+
45
+ printing:
46
+
47
+ ```
48
+ ==> (1/3) minting mooncat 0x00000800fa; writing to >./mooncat-00000800fa.png<...
49
+ design #0 (21x17)
50
+ ==> (2/3) minting mooncat 0x0077c8278d; writing to >./mooncat-0077c8278d.png<...
51
+ design #119 (20x21)
52
+ ==> (3/3) minting mooncat 0xff5f000ca7; writing to >./mooncat-ff5f000ca7.png<...
53
+ design #95 (20x21)
54
+ ```
55
+
56
+ And voila!
57
+
58
+ ![](i/mooncat-00000800fa.png)
59
+ ![](i/mooncat-0077c8278d.png)
60
+ ![](i/mooncat-ff5f000ca7.png)
61
+
62
+
63
+
64
+ **Bonus: Try the `-z/--zoom` factor x2, x4, x8, etc.**
65
+
66
+ Let's give it a try. Let's mint mooncat 0x00000800fa,
67
+ 0x0077c8278d, and 0xff5f000ca7 in 2x format:
68
+
69
+ ```
70
+ $ mooncat --zoom 2 0x00000800fa 0x0077c8278d 0xff5f000ca7
71
+ # -or-
72
+ $ mooncat -z2 00000800fa 0077c8278d ff5f000ca7
73
+ ```
74
+
75
+ printing:
76
+
77
+ ```
78
+ setting zoom to 2x
79
+ ==> (1/3) minting mooncat 0x00000800fa; writing to >./mooncat-00000800fa_x2.png<...
80
+ design #0 (21x17)
81
+ ==> (2/3) minting mooncat 0x0077c8278d; writing to >./mooncat-0077c8278d_x2.png<...
82
+ design #119 (20x21)
83
+ ==> (3/3) minting mooncat 0xff5f000ca7; writing to >./mooncat-ff5f000ca7_x2.png<...
84
+ design #95 (20x21)
85
+ ```
86
+
87
+ And voila!
88
+
89
+ ![](i/mooncat-00000800fa_x2.png)
90
+ ![](i/mooncat-0077c8278d_x2.png)
91
+ ![](i/mooncat-ff5f000ca7_x2.png)
92
+
93
+
94
+ And x4:
95
+
96
+ ![](i/mooncat-00000800fa_x4.png)
97
+ ![](i/mooncat-0077c8278d_x4.png)
98
+ ![](i/mooncat-ff5f000ca7_x4.png)
99
+
100
+
101
+ And x8:
102
+
103
+ ![](i/mooncat-00000800fa_x8.png)
104
+ ![](i/mooncat-0077c8278d_x8.png)
105
+ ![](i/mooncat-ff5f000ca7_x8.png)
106
+
107
+
108
+
109
+ And so on.
110
+
111
+
112
+ ## Usage in Your Scripts
113
+
114
+
115
+ Yes, you can mint mooncats in your own scripts
116
+ and much more.
117
+ See the
118
+ [**Programming Mooncats Step-by-Step Booklet / Guide »**](https://github.com/cryptopunksnotdead/programming-mooncats) - Upcoming
119
+
120
+
121
+
122
+ ## Install
123
+
124
+ Just install the gem:
125
+
126
+ $ gem install mooncats
127
+
128
+
129
+ ## License
130
+
131
+ The scripts are dedicated to the public domain.
132
+ Use it as you please with no restrictions whatsoever.
133
+
134
+
135
+ ## Questions? Comments?
136
+
137
+ Post them on the [mooncatrescue reddit](https://www.reddit.com/r/mooncatrescue). Thanks.
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ require 'hoe'
2
+ require './lib/mooncats/version.rb'
3
+
4
+ Hoe.spec 'mooncats' do
5
+
6
+ self.version = Mooncats::VERSION
7
+
8
+ self.summary = "mooncats - mint your own mooncat pixel art images off chain using any of the 128 True Official Genuine Mooncat™ md5-verified original designs; incl. 2x/4x/8x zoom for bigger sizes"
9
+ self.description = summary
10
+
11
+ self.urls = { home: 'https://github.com/cryptocopycats/mooncats' }
12
+
13
+ self.author = 'Gerald Bauer'
14
+ self.email = 'wwwmake@googlegroups.com'
15
+
16
+ # switch extension to .markdown for gihub formatting
17
+ self.readme_file = 'README.md'
18
+ self.history_file = 'CHANGELOG.md'
19
+
20
+ self.extra_deps = [
21
+ ['chunky_png'],
22
+ ['csvreader'],
23
+ ]
24
+
25
+ self.licenses = ['Public Domain']
26
+
27
+ self.spec_extras = {
28
+ required_ruby_version: '>= 2.3'
29
+ }
30
+
31
+ end
data/bin/mooncat ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ###################
4
+ # == DEV TIPS:
5
+ #
6
+ # For local testing run like:
7
+ #
8
+ # ruby -Ilib bin/mooncat
9
+ #
10
+ # Set the executable bit in Linux. Example:
11
+ #
12
+ # % chmod a+x bin/mooncat
13
+ #
14
+
15
+ require 'mooncats'
16
+
17
+ Mooncats.main
data/lib/mooncats.rb ADDED
@@ -0,0 +1,90 @@
1
+ ## 3rd party
2
+ require 'chunky_png'
3
+ require 'csvreader'
4
+
5
+
6
+ ## extra stdlibs
7
+ require 'fileutils'
8
+ require 'optparse'
9
+
10
+
11
+
12
+ ## our own code
13
+ require 'mooncats/version' # note: let version always go first
14
+ require 'mooncats/designs'
15
+ require 'mooncats/image'
16
+
17
+
18
+
19
+
20
+ module Mooncats
21
+ class Tool
22
+ def run( args )
23
+ opts = { zoom: 1,
24
+ outdir: '.',
25
+ }
26
+
27
+ parser = OptionParser.new do |cmd|
28
+ cmd.banner = "Usage: mooncat [options] IDs"
29
+
30
+ cmd.separator " Mint mooncats from original designs - for IDs use 5 byte hexstrings (e.g 0x004fc21270)"
31
+ cmd.separator ""
32
+ cmd.separator " Options:"
33
+
34
+ cmd.on("-z", "--zoom=ZOOM", "Zoom factor x2, x4, x8, etc. (default: #{opts[:zoom]})", Integer ) do |zoom|
35
+ opts[:zoom] = zoom
36
+ end
37
+
38
+ cmd.on("-d", "--dir=DIR", "Output directory (default: #{opts[:outdir]})", String ) do |outdir|
39
+ opts[:outdir] = outdir
40
+ end
41
+
42
+
43
+ cmd.on("-h", "--help", "Prints this help") do
44
+ puts cmd
45
+ exit
46
+ end
47
+ end
48
+
49
+ parser.parse!( args )
50
+
51
+ puts "opts:"
52
+ pp opts
53
+
54
+ puts " setting zoom to #{opts[:zoom]}x" if opts[:zoom] != 1
55
+
56
+ ## make sure outdir exits (default is current working dir e.g. .)
57
+ FileUtils.mkdir_p( opts[:outdir] ) unless Dir.exist?( opts[:outdir] )
58
+
59
+ args.each_with_index do |arg,index|
60
+ cat_id = arg.downcase
61
+ ## note: cut-off optionial 0x
62
+ cat_id = cat_id[2..-1] if cat_id.start_with?( '0x')
63
+
64
+ cat_name = "mooncat-#{cat_id}"
65
+
66
+ ## if zoom - add x2,x4 or such
67
+ cat_name << "_x#{opts[:zoom]}" if opts[:zoom] != 1
68
+
69
+ path = "#{opts[:outdir]}/#{cat_name}.png"
70
+ puts "==> (#{index+1}/#{args.size}) minting mooncat 0x#{cat_id}; writing to >#{path}<..."
71
+
72
+ Image.generate( cat_id, zoom: opts[:zoom] ).save( path )
73
+ end
74
+
75
+ puts "done"
76
+ end ## method run
77
+ end # class Tool
78
+
79
+
80
+ def self.main( args=ARGV )
81
+ Tool.new.run( args )
82
+ end
83
+ end ## module Mooncats
84
+
85
+
86
+ ### add some convenience shortcuts
87
+ MoonCats = Mooncats
88
+
89
+
90
+ puts Mooncats.banner # say hello
@@ -0,0 +1,386 @@
1
+ DESIGNS = [
2
+
3
+ ## 0
4
+ "00011111100000000.01113333310000000.13533333331110000.01333134331331000.00133333431333111.00133335331333351.00133333431331111.01333134331333111.13533333331313351.01113333313341111.00011111133344411.00000133333341151.00000133333313331.00000133333333311.00000133333333110.00000113333331100.00000011133311000.00011100131110000.00013111131000000.00011333311000000.00000111110000000",
5
+
6
+ ## 1
7
+ "00000000111100.00011111113110.01113333313310.13533333331310.01333134331510.00133333431110.00133335331510.00133333431310.01333134331310.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333311331.00001333313311.00001333333110.00001113331100.00000011111000",
8
+
9
+ ## 2
10
+ "0000000000111000000000.0001111110151000000000.0111333331331100000000.1353333333133111100000.0133313433133333111110.0013333343131134443311.0013333533131514444351.0013333343131314444110.0133313433133333333110.1353333333133333113310.1111333331333333133311.0001111111133333133351.0000000000111333333111.0000000000131111113100.0000000000013311331100.0000000000011133311000.0000000000000111110000",
11
+
12
+ ## 3
13
+ "000000001111111000111.000000013333333101151.000000135333333311331.000000113331343313311.000000001333334313310.000000001333353313111.000000001333334313351.000000013331343313311.000000135333333313110.000000113333333133100.111100001111111131100.133100001133333331110.131000011333333411510.131000113333334413310.133100133333334413111.113111133333344111151.013333133333333311331.011113133333333333311.000011113331111331110.000000011111000111000",
14
+
15
+ ## 4
16
+ "00011111100000000.01113232310000000.13533333331110000.01333134331321000.00123333431333111.00133335331333351.00123333431331111.01333134331333111.13533333331312351.01113232313341111.00011111133344411.00000133333341151.00000132333313331.00000123333333311.00000133233333110.00000112333331100.00000011132311000.00011100121110000.00013111131000000.00011323211000000.00000111110000000",
17
+
18
+ ## 5
19
+ "00000000111100.00011111113110.01113232312310.13533333331310.01333134331510.00123333431110.00133335331510.00123333431310.01333134331210.13533333331111.01113232311331.00011111131121.00011333334131.00013323334121.00013233133131.00011333311321.00001323313211.00001233333110.00001113231100.00000011111000",
20
+
21
+ ## 6
22
+ "0000000000111000000000.0001111110151000000000.0111323231331100000000.1353333333123111100000.0133313433132333111110.0012333343131134442311.0013333533131514444351.0012333343131314444110.0133313433133333333110.1353333333133333113310.1111323231332333133311.0001111111123323133351.0000000000111233333111.0000000000131111113100.0000000000012311321100.0000000000011123211000.0000000000000111110000",
23
+
24
+ ## 7
25
+ "000000001111111000111.000000013332323101151.000000135333333311331.000000113331343313211.000000001233334313310.000000001333353313111.000000001233334313351.000000013331343313211.000000135333333313110.000000113332323133100.111100001111111131100.133100001133333331110.121000011233333411510.131000113323334413310.122100132333334413111.113111133233344111151.012323133333333311331.011113133333333333311.000011113331111231110.000000011111000111000",
26
+
27
+ ## 8
28
+ "00011111100000000.01113333210000000.13532233331110000.01332134331331000.00133333431233111.00133335331223351.00133333431231111.01233134331333111.12533333331313351.01113322313241111.00011111122244411.00000133332241151.00000123333313331.00000122333223311.00000122233222110.00000112333321100.00000011133311000.00011100131110000.00012111131000000.00011223311000000.00000111110000000",
29
+
30
+ ## 9
31
+ "00000000111100.00011111112110.01113333212210.13532233331210.01332134331510.00133333431110.00133335331510.00133333431310.01233134331310.12533333331111.01113322311221.00011111131121.00011333334121.00013333224121.00013333123131.00011233311331.00001223313311.00001223333110.00001113331100.00000011111000",
32
+
33
+ ## 10
34
+ "0000000000111000000000.0001111110151000000000.0111333321331100000000.1353223333123111100000.0133213433122333111110.0013333343121134442211.0013333533121514444251.0013333343131314444110.0123313433133333333110.1253333333133333113310.1111332231333233133311.0001111111133322133351.0000000000111222223111.0000000000121111113100.0000000000012211331100.0000000000011133311000.0000000000000111110000",
35
+
36
+ ## 11
37
+ "000000001111111000111.000000013333332101151.000000135322333311331.000000113321343312311.000000001333334312210.000000001333353312111.000000001333334312351.000000012331343313311.000000125333333313110.000000112333223133100.111100001111111131100.122100001133333331110.121000011233333411510.121000112223334413310.122100122223334413111.113111122233344111151.013333123333223311331.011113133332222233311.000011113331111231110.000000011111000111000",
38
+
39
+ ## 12
40
+ "00011111100000000.01112222210000000.12522222221110000.01222124221331000.00122222421333111.00132225221333351.00133322421321111.01333134331222111.13533333331212251.01113333312241111.00011111132244411.00000133333241121.00000133333313331.00000133323333311.00000122222333110.00000112222331100.00000011123311000.00011100121110000.00013111121000000.00011333311000000.00000111110000000",
41
+
42
+ ## 13
43
+ "00000000111100.00011111113110.01112222213310.12522222221310.01222124221510.00122222421110.00132225221210.00133322421210.01333134331210.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333211331.00001322212211.00001322222110.00001112221100.00000011111000",
44
+
45
+ ## 14
46
+ "0000000000111000000000.0001111110151000000000.0111222221331100000000.1252222222133111100000.0122212422133333111110.0012222242131134442211.0013222522131514444251.0013332242131214444110.0133313433132223333110.1353333333133223113310.1111333331333333133311.0001111111133333122221.0000000000111333222111.0000000000131111112100.0000000000013311221100.0000000000011133211000.0000000000000111110000",
47
+
48
+ ## 15
49
+ "000000001111111000111.000000012222222101151.000000125222222211331.000000112221242213311.000000001222224213310.000000001322252213111.000000001333224212251.000000013331343312211.000000135333333312110.000000113333333122100.111100001111111121100.133100001133322221110.131000011333322411510.131000113333324413310.133100123333334413111.113111122333344111121.013222122333333311221.011112122333333322211.000011113331111331110.000000011111000111000",
50
+
51
+ ## 16
52
+ "00011111100000000.01113333310000000.13533333331110000.01334133331331000.00133333431333111.00133335331333351.00133333431331111.01334133331333111.13533333331313351.01113333313341111.00011111133344411.00000133333341151.00000133333313331.00000133333333311.00000133333333110.00000113333331100.00000011133311000.00011100131110000.00013111131000000.00011333311000000.00000111110000000",
53
+
54
+ ## 17
55
+ "00000000111100.00011111113110.01113333313310.13533333331310.01334133331510.00133333431110.00133335331510.00133333431310.01334133331310.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333311331.00001333313311.00001333333110.00001113331100.00000011111000",
56
+
57
+ ## 18
58
+ "0000000000111000000000.0001111110151000000000.0111333331331100000000.1353333333133111100000.0133413333133333111110.0013333343131134443311.0013333533131514444351.0013333343131314444110.0133413333133333333110.1353333333133333113310.1111333331333333133311.0001111111133333133351.0000000000111333333111.0000000000131111113100.0000000000013311331100.0000000000011133311000.0000000000000111110000",
59
+
60
+ ## 19
61
+ "000000001111111000111.000000013333333101151.000000135333333311331.000000113341333313311.000000001333334313310.000000001333353313111.000000001333334313351.000000013341333313311.000000135333333313110.000000113333333133100.111100001111111131100.133100001133333331110.131000011333333411510.131000113333334413310.133100133333334413111.113111133333344111151.013333133333333311331.011113133333333333311.000011113331111331110.000000011111000111000",
62
+
63
+ ## 20
64
+ "00011111100000000.01113232310000000.13533333331110000.01334133331321000.00123333431333111.00133335331333351.00123333431331111.01334133331333111.13533333331312351.01113232313341111.00011111133344411.00000133333341151.00000132333313331.00000123333333311.00000133233333110.00000112333331100.00000011132311000.00011100121110000.00013111131000000.00011323211000000.00000111110000000",
65
+
66
+ ## 21
67
+ "00000000111100.00011111113110.01113232312310.13533333331310.01334133331510.00123333431110.00133335331510.00123333431310.01334133331210.13533333331111.01113232311331.00011111131121.00011333334131.00013323334121.00013233133131.00011333311321.00001323313211.00001233333110.00001113231100.00000011111000",
68
+
69
+ ## 22
70
+ "0000000000111000000000.0001111110151000000000.0111323231331100000000.1353333333123111100000.0133413333132333111110.0012333343131134442311.0013333533131514444351.0012333343131314444110.0133413333133333333110.1353333333133333113310.1111323231332333133311.0001111111123323133351.0000000000111233333111.0000000000131111113100.0000000000012311321100.0000000000011123211000.0000000000000111110000",
71
+
72
+ ## 23
73
+ "000000001111111000111.000000013332323101151.000000135333333311331.000000113341333313211.000000001233334313310.000000001333353313111.000000001233334313351.000000013341333313211.000000135333333313110.000000113332323133100.111100001111111131100.133100001133333331110.121000011233333411510.131000113323334413310.122100132333334413111.113111133233344111151.012323133333333311331.011113133333333333311.000011113331111231110.000000011111000111000",
74
+
75
+ ## 24
76
+ "00011111100000000.01113333210000000.13532233331110000.01332133331331000.00133333431233111.00133335331223351.00133333431231111.01234133331333111.12533333331313351.01113322313241111.00011111122244411.00000133332241151.00000123333313331.00000122333223311.00000122233222110.00000112333321100.00000011133311000.00011100131110000.00012111131000000.00011223311000000.00000111110000000",
77
+
78
+ ## 25
79
+ "00000000111100.00011111112110.01113333212210.13532233331210.01332133331510.00133333431110.00133335331510.00133333431310.01234133331310.12533333331111.01113322311221.00011111131121.00011333334121.00013333224121.00013333123131.00011233311331.00001223313311.00001223333110.00001113331100.00000011111000",
80
+
81
+ ## 26
82
+ "0000000000111000000000.0001111110151000000000.0111333321331100000000.1353223333123111100000.0133213333122333111110.0013333343121134442211.0013333533121514444251.0013333343131314444110.0123413333133333333110.1253333333133333113310.1111332231333233133311.0001111111133322133351.0000000000111222223111.0000000000121111113100.0000000000012211331100.0000000000011133311000.0000000000000111110000",
83
+
84
+ ## 27
85
+ "000000001111111000111.000000013333332101151.000000135322333311331.000000113321333312311.000000001333334312210.000000001333353312111.000000001333334312351.000000012341333313311.000000125333333313110.000000112333223133100.111100001111111131100.122100001133333331110.121000011233333411510.121000112223334413310.122100122223334413111.113111122233344111151.013333123333223311331.011113133332222233311.000011113331111231110.000000011111000111000",
86
+
87
+ ## 28
88
+ "00011111100000000.01112222210000000.12522222221110000.01224122221331000.00122222421333111.00132225221333351.00133322421321111.01334133331222111.13533333331212251.01113333312241111.00011111132244411.00000133333241121.00000133333313331.00000133323333311.00000122222333110.00000112222331100.00000011123311000.00011100121110000.00013111121000000.00011333311000000.00000111110000000",
89
+
90
+ ## 29
91
+ "00000000111100.00011111113110.01112222213310.12522222221310.01224122221510.00122222421110.00132225221210.00133322421210.01334133331210.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333211331.00001322212211.00001322222110.00001112221100.00000011111000",
92
+
93
+ ## 30
94
+ "0000000000111000000000.0001111110151000000000.0111222221331100000000.1252222222133111100000.0122412222133333111110.0012222242131134442211.0013222522131514444251.0013332242131214444110.0133413333132223333110.1353333333133223113310.1111333331333333133311.0001111111133333122221.0000000000111333222111.0000000000131111112100.0000000000013311221100.0000000000011133211000.0000000000000111110000",
95
+
96
+ ## 31
97
+ "000000001111111000111.000000012222222101151.000000125222222211331.000000112241222213311.000000001222224213310.000000001322252213111.000000001333224212251.000000013341333312211.000000135333333312110.000000113333333122100.111100001111111121100.133100001133322221110.131000011333322411510.131000113333324413310.133100123333334413111.113111122333344111121.013222122333333311221.011112122333333322211.000011113331111331110.000000011111000111000",
98
+
99
+ ## 32
100
+ "00011111100000000.01113333310000000.13533333331110000.01333143331331000.00133333431333111.00133335331333351.00133333431331111.01333143331333111.13533333331313351.01113333313341111.00011111133344411.00000133333341151.00000133333313331.00000133333333311.00000133333333110.00000113333331100.00000011133311000.00011100131110000.00013111131000000.00011333311000000.00000111110000000",
101
+
102
+ ## 33
103
+ "00000000111100.00011111113110.01113333313310.13533333331310.01333143331510.00133333431110.00133335331510.00133333431310.01333143331310.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333311331.00001333313311.00001333333110.00001113331100.00000011111000",
104
+
105
+ ## 34
106
+ "0000000000111000000000.0001111110151000000000.0111333331331100000000.1353333333133111100000.0133314333133333111110.0013333343131134443311.0013333533131514444351.0013333343131314444110.0133314333133333333110.1353333333133333113310.1111333331333333133311.0001111111133333133351.0000000000111333333111.0000000000131111113100.0000000000013311331100.0000000000011133311000.0000000000000111110000",
107
+
108
+ ## 35
109
+ "000000001111111000111.000000013333333101151.000000135333333311331.000000113331433313311.000000001333334313310.000000001333353313111.000000001333334313351.000000013331433313311.000000135333333313110.000000113333333133100.111100001111111131100.133100001133333331110.131000011333333411510.131000113333334413310.133100133333334413111.113111133333344111151.013333133333333311331.011113133333333333311.000011113331111331110.000000011111000111000",
110
+
111
+ ## 36
112
+ "00011111100000000.01113232310000000.13533333331110000.01333143331321000.00123333431333111.00133335331333351.00123333431331111.01333143331333111.13533333331312351.01113232313341111.00011111133344411.00000133333341151.00000132333313331.00000123333333311.00000133233333110.00000112333331100.00000011132311000.00011100121110000.00013111131000000.00011323211000000.00000111110000000",
113
+
114
+ ## 37
115
+ "00000000111100.00011111113110.01113232312310.13533333331310.01333143331510.00123333431110.00133335331510.00123333431310.01333143331210.13533333331111.01113232311331.00011111131121.00011333334131.00013323334121.00013233133131.00011333311321.00001323313211.00001233333110.00001113231100.00000011111000",
116
+
117
+ ## 38
118
+ "0000000000111000000000.0001111110151000000000.0111323231331100000000.1353333333123111100000.0133314333132333111110.0012333343131134442311.0013333533131514444351.0012333343131314444110.0133314333133333333110.1353333333133333113310.1111323231332333133311.0001111111123323133351.0000000000111233333111.0000000000131111113100.0000000000012311321100.0000000000011123211000.0000000000000111110000",
119
+
120
+ ## 39
121
+ "000000001111111000111.000000013332323101151.000000135333333311331.000000113331433313211.000000001233334313310.000000001333353313111.000000001233334313351.000000013331433313211.000000135333333313110.000000113332323133100.111100001111111131100.133100001133333331110.121000011233333411510.131000113323334413310.122100132333334413111.113111133233344111151.012323133333333311331.011113133333333333311.000011113331111231110.000000011111000111000",
122
+
123
+ ## 40
124
+ "00011111100000000.01113333210000000.13532233331110000.01332143331331000.00133333431233111.00133335331223351.00133333431231111.01233143331333111.12533333331313351.01113322313241111.00011111122244411.00000133332241151.00000123333313331.00000122333223311.00000122233222110.00000112333321100.00000011133311000.00011100131110000.00012111131000000.00011223311000000.00000111110000000",
125
+
126
+ ## 41
127
+ "00000000111100.00011111112110.01113333212210.13532233331210.01332143331510.00133333431110.00133335331510.00133333431310.01233143331310.12533333331111.01113322311221.00011111131121.00011333334121.00013333224121.00013333123131.00011233311331.00001223313311.00001223333110.00001113331100.00000011111000",
128
+
129
+ ## 42
130
+ "0000000000111000000000.0001111110151000000000.0111333321331100000000.1353223333123111100000.0133214333122333111110.0013333343121134442211.0013333533121514444251.0013333343131314444110.0123314333133333333110.1253333333133333113310.1111332231333233133311.0001111111133322133351.0000000000111222223111.0000000000121111113100.0000000000012211331100.0000000000011133311000.0000000000000111110000",
131
+
132
+ ## 43
133
+ "000000001111111000111.000000013333332101151.000000135322333311331.000000113321433312311.000000001333334312210.000000001333353312111.000000001333334312351.000000012331433313311.000000125333333313110.000000112333223133100.111100001111111131100.122100001133333331110.121000011233333411510.121000112223334413310.122100122223334413111.113111122233344111151.013333123333223311331.011113133332222233311.000011113331111231110.000000011111000111000",
134
+
135
+ ## 44
136
+ "00011111100000000.01112222210000000.12522222221110000.01222142221331000.00122222421333111.00132225221333351.00133322421321111.01333143331222111.13533333331212251.01113333312241111.00011111132244411.00000133333241121.00000133333313331.00000133323333311.00000122222333110.00000112222331100.00000011123311000.00011100121110000.00013111121000000.00011333311000000.00000111110000000",
137
+
138
+ ## 45
139
+ "00000000111100.00011111113110.01112222213310.12522222221310.01222142221510.00122222421110.00132225221210.00133322421210.01333143331210.13533333331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333211331.00001322212211.00001322222110.00001112221100.00000011111000",
140
+
141
+ ## 46
142
+ "0000000000111000000000.0001111110151000000000.0111222221331100000000.1252222222133111100000.0122214222133333111110.0012222242131134442211.0013222522131514444251.0013332242131214444110.0133314333132223333110.1353333333133223113310.1111333331333333133311.0001111111133333122221.0000000000111333222111.0000000000131111112100.0000000000013311221100.0000000000011133211000.0000000000000111110000",
143
+
144
+ ## 47
145
+ "000000001111111000111.000000012222222101151.000000125222222211331.000000112221422213311.000000001222224213310.000000001322252213111.000000001333224212251.000000013331433312211.000000135333333312110.000000113333333122100.111100001111111121100.133100001133322221110.131000011333322411510.131000113333324413310.133100123333334413111.113111122333344111121.013222122333333311221.011112122333333322211.000011113331111331110.000000011111000111000",
146
+
147
+ ## 48
148
+ "00011111100000000.01113333310000000.13533334331110000.01333134331331000.00133333331333111.00133335331333351.00133333331331111.01333134331333111.13533334331313351.01113333313341111.00011111133344411.00000133333341151.00000133333313331.00000133333333311.00000133333333110.00000113333331100.00000011133311000.00011100131110000.00013111131000000.00011333311000000.00000111110000000",
149
+
150
+ ## 49
151
+ "00000000111100.00011111113110.01113333313310.13533334331310.01333134331510.00133333331110.00133335331510.00133333331310.01333134331310.13533334331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333311331.00001333313311.00001333333110.00001113331100.00000011111000",
152
+
153
+ ## 50
154
+ "0000000000111000000000.0001111110151000000000.0111333331331100000000.1353333433133111100000.0133313433133333111110.0013333333131134443311.0013333533131514444351.0013333333131314444110.0133313433133333333110.1353333433133333113310.1111333331333333133311.0001111111133333133351.0000000000111333333111.0000000000131111113100.0000000000013311331100.0000000000011133311000.0000000000000111110000",
155
+
156
+ ## 51
157
+ "000000001111111000111.000000013333333101151.000000135333343311331.000000113331343313311.000000001333333313310.000000001333353313111.000000001333333313351.000000013331343313311.000000135333343313110.000000113333333133100.111100001111111131100.133100001133333331110.131000011333333411510.131000113333334413310.133100133333334413111.113111133333344111151.013333133333333311331.011113133333333333311.000011113331111331110.000000011111000111000",
158
+
159
+ ## 52
160
+ "00011111100000000.01113232310000000.13533334331110000.01333134331321000.00123333331333111.00133335331333351.00123333331331111.01333134331333111.13533334331312351.01113232313341111.00011111133344411.00000133333341151.00000132333313331.00000123333333311.00000133233333110.00000112333331100.00000011132311000.00011100121110000.00013111131000000.00011323211000000.00000111110000000",
161
+
162
+ ## 53
163
+ "00000000111100.00011111113110.01113232312310.13533334331310.01333134331510.00123333331110.00133335331510.00123333331310.01333134331210.13533334331111.01113232311331.00011111131121.00011333334131.00013323334121.00013233133131.00011333311321.00001323313211.00001233333110.00001113231100.00000011111000",
164
+
165
+ ## 54
166
+ "0000000000111000000000.0001111110151000000000.0111323231331100000000.1353333433123111100000.0133313433132333111110.0012333333131134442311.0013333533131514444351.0012333333131314444110.0133313433133333333110.1353333433133333113310.1111323231332333133311.0001111111123323133351.0000000000111233333111.0000000000131111113100.0000000000012311321100.0000000000011123211000.0000000000000111110000",
167
+
168
+ ## 55
169
+ "000000001111111000111.000000013332323101151.000000135333343311331.000000113331343313211.000000001233333313310.000000001333353313111.000000001233333313351.000000013331343313211.000000135333343313110.000000113332323133100.111100001111111131100.133100001133333331110.121000011233333411510.131000113323334413310.122100132333334413111.113111133233344111151.012323133333333311331.011113133333333333311.000011113331111231110.000000011111000111000",
170
+
171
+ ## 56
172
+ "00011111100000000.01113333210000000.13532234331110000.01332134331331000.00133333331233111.00133335331223351.00133333331231111.01233134331333111.12533334331313351.01113322313241111.00011111122244411.00000133332241151.00000123333313331.00000122333223311.00000122233222110.00000112333321100.00000011133311000.00011100131110000.00012111131000000.00011223311000000.00000111110000000",
173
+
174
+ ## 57
175
+ "00000000111100.00011111112110.01113333212210.13532234331210.01332134331510.00133333331110.00133335331510.00133333331310.01233134331310.12533334331111.01113322311221.00011111131121.00011333334121.00013333224121.00013333123131.00011233311331.00001223313311.00001223333110.00001113331100.00000011111000",
176
+
177
+ ## 58
178
+ "0000000000111000000000.0001111110151000000000.0111333321331100000000.1353223433123111100000.0133213433122333111110.0013333333121134442211.0013333533121514444251.0013333333131314444110.0123313433133333333110.1253333433133333113310.1111332231333233133311.0001111111133322133351.0000000000111222223111.0000000000121111113100.0000000000012211331100.0000000000011133311000.0000000000000111110000",
179
+
180
+ ## 59
181
+ "000000001111111000111.000000013333332101151.000000135322343311331.000000113321343312311.000000001333333312210.000000001333353312111.000000001333333312351.000000012331343313311.000000125333343313110.000000112333223133100.111100001111111131100.122100001133333331110.121000011233333411510.121000112223334413310.122100122223334413111.113111122233344111151.013333123333223311331.011113133332222233311.000011113331111231110.000000011111000111000",
182
+
183
+ ## 60
184
+ "00011111100000000.01112222210000000.12522224221110000.01222124221331000.00122222221333111.00132225221333351.00133322221321111.01333134331222111.13533334331212251.01113333312241111.00011111132244411.00000133333241121.00000133333313331.00000133323333311.00000122222333110.00000112222331100.00000011123311000.00011100121110000.00013111121000000.00011333311000000.00000111110000000",
185
+
186
+ ## 61
187
+ "00000000111100.00011111113110.01112222213310.12522224221310.01222124221510.00122222221110.00132225221210.00133322221210.01333134331210.13533334331111.01113333311331.00011111131131.00011333334131.00013333334131.00013333133131.00011333211331.00001322212211.00001322222110.00001112221100.00000011111000",
188
+
189
+ ## 62
190
+ "0000000000111000000000.0001111110151000000000.0111222221331100000000.1252222422133111100000.0122212422133333111110.0012222222131134442211.0013222522131514444251.0013332222131214444110.0133313433132223333110.1353333433133223113310.1111333331333333133311.0001111111133333122221.0000000000111333222111.0000000000131111112100.0000000000013311221100.0000000000011133211000.0000000000000111110000",
191
+
192
+ ## 63
193
+ "000000001111111000111.000000012222222101151.000000125222242211331.000000112221242213311.000000001222222213310.000000001322252213111.000000001333222212251.000000013331343312211.000000135333343312110.000000113333333122100.111100001111111121100.133100001133322221110.131000011333322411510.131000113333324413310.133100123333334413111.113111122333344111121.013222122333333311221.011112122333333322211.000011113331111331110.000000011111000111000",
194
+
195
+ ## 64
196
+ "00000111110000000.00011333311000000.00013111131000000.00011100131110000.00000011133311000.00000113333331100.00000133333333110.00000133333333311.00000133333313331.00000133333341151.00011111133344411.01113333313341111.13533333331313351.01333134331333111.00133333431331111.00133335331333351.00133333431333111.01333134331331000.13533333331110000.01113333310000000.00011111100000000",
197
+
198
+ ## 65
199
+ "00000011111000.00001113331100.00001333333110.00001333313311.00011333311331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01333134331310.00133333431310.00133335331510.00133333431110.01333134331510.13533333331310.01113333313310.00011111113110.00000000111100",
200
+
201
+ ## 66
202
+ "0000000000000111110000.0000000000011133311000.0000000000013311331100.0000000000131111113100.0000000000111333333111.0001111111133333133351.1111333331333333133311.1353333333133333113310.0133313433133333333110.0013333343131314444110.0013333533131514444351.0013333343131134443311.0133313433133333111110.1353333333133111100000.0111333331331100000000.0001111110151000000000.0000000000111000000000",
203
+
204
+ ## 67
205
+ "000000011111000111000.000011113331111331110.011113133333333333311.013333133333333311331.113111133333344111151.133100133333334413111.131000113333334413310.131000011333333411510.133100001133333331110.111100001111111131100.000000113333333133100.000000135333333313110.000000013331343313311.000000001333334313351.000000001333353313111.000000001333334313310.000000113331343313311.000000135333333311331.000000013333333101151.000000001111111000111",
206
+
207
+ ## 68
208
+ "00000111110000000.00011323211000000.00013111131000000.00011100121110000.00000011132311000.00000112333331100.00000133233333110.00000123333333311.00000132333313331.00000133333341151.00011111133344411.01113232313341111.13533333331312351.01333134331333111.00123333431331111.00133335331333351.00123333431333111.01333134331321000.13533333331110000.01113232310000000.00011111100000000",
209
+
210
+ ## 69
211
+ "00000011111000.00001113231100.00001233333110.00001323313211.00011333311321.00013233133131.00013323334121.00011333334131.00011111131121.01113232311331.13533333331111.01333134331210.00123333431310.00133335331510.00123333431110.01333134331510.13533333331310.01113232312310.00011111113110.00000000111100",
212
+
213
+ ## 70
214
+ "0000000000000111110000.0000000000011123211000.0000000000012311321100.0000000000131111113100.0000000000111233333111.0001111111123323133351.1111323231332333133311.1353333333133333113310.0133313433133333333110.0012333343131314444110.0013333533131514444351.0012333343131134442311.0133313433132333111110.1353333333123111100000.0111323231331100000000.0001111110151000000000.0000000000111000000000",
215
+
216
+ ## 71
217
+ "000000011111000111000.000011113331111231110.011113133333333333311.012323133333333311331.113111133233344111151.122100132333334413111.131000113323334413310.121000011233333411510.133100001133333331110.111100001111111131100.000000113332323133100.000000135333333313110.000000013331343313211.000000001233334313351.000000001333353313111.000000001233334313310.000000113331343313211.000000135333333311331.000000013332323101151.000000001111111000111",
218
+
219
+ ## 72
220
+ "00000111110000000.00011223311000000.00012111131000000.00011100131110000.00000011133311000.00000112333321100.00000122233222110.00000122333223311.00000123333313331.00000133332241151.00011111122244411.01113322313241111.12533333331313351.01233134331333111.00133333431231111.00133335331223351.00133333431233111.01332134331331000.13532233331110000.01113333210000000.00011111100000000",
221
+
222
+ ## 73
223
+ "00000011111000.00001113331100.00001223333110.00001223313311.00011233311331.00013333123131.00013333224121.00011333334121.00011111131121.01113322311221.12533333331111.01233134331310.00133333431310.00133335331510.00133333431110.01332134331510.13532233331210.01113333212210.00011111112110.00000000111100",
224
+
225
+ ## 74
226
+ "0000000000000111110000.0000000000011133311000.0000000000012211331100.0000000000121111113100.0000000000111222223111.0001111111133322133351.1111332231333233133311.1253333333133333113310.0123313433133333333110.0013333343131314444110.0013333533121514444251.0013333343121134442211.0133213433122333111110.1353223333123111100000.0111333321331100000000.0001111110151000000000.0000000000111000000000",
227
+
228
+ ## 75
229
+ "000000011111000111000.000011113331111231110.011113133332222233311.013333123333223311331.113111122233344111151.122100122223334413111.121000112223334413310.121000011233333411510.122100001133333331110.111100001111111131100.000000112333223133100.000000125333333313110.000000012331343313311.000000001333334312351.000000001333353312111.000000001333334312210.000000113321343312311.000000135322333311331.000000013333332101151.000000001111111000111",
230
+
231
+ ## 76
232
+ "00000111110000000.00011333311000000.00013111121000000.00011100121110000.00000011123311000.00000112222331100.00000122222333110.00000133323333311.00000133333313331.00000133333241121.00011111132244411.01113333312241111.13533333331212251.01333134331222111.00133322421321111.00132225221333351.00122222421333111.01222124221331000.12522222221110000.01112222210000000.00011111100000000",
233
+
234
+ ## 77
235
+ "00000011111000.00001112221100.00001322222110.00001322212211.00011333211331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01333134331210.00133322421210.00132225221210.00122222421110.01222124221510.12522222221310.01112222213310.00011111113110.00000000111100",
236
+
237
+ ## 78
238
+ "0000000000000111110000.0000000000011133211000.0000000000013311221100.0000000000131111112100.0000000000111333222111.0001111111133333122221.1111333331333333133311.1353333333133223113310.0133313433132223333110.0013332242131214444110.0013222522131514444251.0012222242131134442211.0122212422133333111110.1252222222133111100000.0111222221331100000000.0001111110151000000000.0000000000111000000000",
239
+
240
+ ## 79
241
+ "000000011111000111000.000011113331111331110.011112122333333322211.013222122333333311221.113111122333344111121.133100123333334413111.131000113333324413310.131000011333322411510.133100001133322221110.111100001111111121100.000000113333333122100.000000135333333312110.000000013331343312211.000000001333224212251.000000001322252213111.000000001222224213310.000000112221242213311.000000125222222211331.000000012222222101151.000000001111111000111",
242
+
243
+ ## 80
244
+ "00000111110000000.00011333311000000.00013111131000000.00011100131110000.00000011133311000.00000113333331100.00000133333333110.00000133333333311.00000133333313331.00000133333341151.00011111133344411.01113333313341111.13533333331313351.01334133331333111.00133333431331111.00133335331333351.00133333431333111.01334133331331000.13533333331110000.01113333310000000.00011111100000000",
245
+
246
+ ## 81
247
+ "00000011111000.00001113331100.00001333333110.00001333313311.00011333311331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01334133331310.00133333431310.00133335331510.00133333431110.01334133331510.13533333331310.01113333313310.00011111113110.00000000111100",
248
+
249
+ ## 82
250
+ "0000000000000111110000.0000000000011133311000.0000000000013311331100.0000000000131111113100.0000000000111333333111.0001111111133333133351.1111333331333333133311.1353333333133333113310.0133413333133333333110.0013333343131314444110.0013333533131514444351.0013333343131134443311.0133413333133333111110.1353333333133111100000.0111333331331100000000.0001111110151000000000.0000000000111000000000",
251
+
252
+ ## 83
253
+ "000000011111000111000.000011113331111331110.011113133333333333311.013333133333333311331.113111133333344111151.133100133333334413111.131000113333334413310.131000011333333411510.133100001133333331110.111100001111111131100.000000113333333133100.000000135333333313110.000000013341333313311.000000001333334313351.000000001333353313111.000000001333334313310.000000113341333313311.000000135333333311331.000000013333333101151.000000001111111000111",
254
+
255
+ ## 84
256
+ "00000111110000000.00011323211000000.00013111131000000.00011100121110000.00000011132311000.00000112333331100.00000133233333110.00000123333333311.00000132333313331.00000133333341151.00011111133344411.01113232313341111.13533333331312351.01334133331333111.00123333431331111.00133335331333351.00123333431333111.01334133331321000.13533333331110000.01113232310000000.00011111100000000",
257
+
258
+ ## 85
259
+ "00000011111000.00001113231100.00001233333110.00001323313211.00011333311321.00013233133131.00013323334121.00011333334131.00011111131121.01113232311331.13533333331111.01334133331210.00123333431310.00133335331510.00123333431110.01334133331510.13533333331310.01113232312310.00011111113110.00000000111100",
260
+
261
+ ## 86
262
+ "0000000000000111110000.0000000000011123211000.0000000000012311321100.0000000000131111113100.0000000000111233333111.0001111111123323133351.1111323231332333133311.1353333333133333113310.0133413333133333333110.0012333343131314444110.0013333533131514444351.0012333343131134442311.0133413333132333111110.1353333333123111100000.0111323231331100000000.0001111110151000000000.0000000000111000000000",
263
+
264
+ ## 87
265
+ "000000011111000111000.000011113331111231110.011113133333333333311.012323133333333311331.113111133233344111151.122100132333334413111.131000113323334413310.121000011233333411510.133100001133333331110.111100001111111131100.000000113332323133100.000000135333333313110.000000013341333313211.000000001233334313351.000000001333353313111.000000001233334313310.000000113341333313211.000000135333333311331.000000013332323101151.000000001111111000111",
266
+
267
+ ## 88
268
+ "00000111110000000.00011223311000000.00012111131000000.00011100131110000.00000011133311000.00000112333321100.00000122233222110.00000122333223311.00000123333313331.00000133332241151.00011111122244411.01113322313241111.12533333331313351.01234133331333111.00133333431231111.00133335331223351.00133333431233111.01332133331331000.13532233331110000.01113333210000000.00011111100000000",
269
+
270
+ ## 89
271
+ "00000011111000.00001113331100.00001223333110.00001223313311.00011233311331.00013333123131.00013333224121.00011333334121.00011111131121.01113322311221.12533333331111.01234133331310.00133333431310.00133335331510.00133333431110.01332133331510.13532233331210.01113333212210.00011111112110.00000000111100",
272
+
273
+ ## 90
274
+ "0000000000000111110000.0000000000011133311000.0000000000012211331100.0000000000121111113100.0000000000111222223111.0001111111133322133351.1111332231333233133311.1253333333133333113310.0123413333133333333110.0013333343131314444110.0013333533121514444251.0013333343121134442211.0133213333122333111110.1353223333123111100000.0111333321331100000000.0001111110151000000000.0000000000111000000000",
275
+
276
+ ## 91
277
+ "000000011111000111000.000011113331111231110.011113133332222233311.013333123333223311331.113111122233344111151.122100122223334413111.121000112223334413310.121000011233333411510.122100001133333331110.111100001111111131100.000000112333223133100.000000125333333313110.000000012341333313311.000000001333334312351.000000001333353312111.000000001333334312210.000000113321333312311.000000135322333311331.000000013333332101151.000000001111111000111",
278
+
279
+ ## 92
280
+ "00000111110000000.00011333311000000.00013111121000000.00011100121110000.00000011123311000.00000112222331100.00000122222333110.00000133323333311.00000133333313331.00000133333241121.00011111132244411.01113333312241111.13533333331212251.01334133331222111.00133322421321111.00132225221333351.00122222421333111.01224122221331000.12522222221110000.01112222210000000.00011111100000000",
281
+
282
+ ## 93
283
+ "00000011111000.00001112221100.00001322222110.00001322212211.00011333211331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01334133331210.00133322421210.00132225221210.00122222421110.01224122221510.12522222221310.01112222213310.00011111113110.00000000111100",
284
+
285
+ ## 94
286
+ "0000000000000111110000.0000000000011133211000.0000000000013311221100.0000000000131111112100.0000000000111333222111.0001111111133333122221.1111333331333333133311.1353333333133223113310.0133413333132223333110.0013332242131214444110.0013222522131514444251.0012222242131134442211.0122412222133333111110.1252222222133111100000.0111222221331100000000.0001111110151000000000.0000000000111000000000",
287
+
288
+ ## 95
289
+ "000000011111000111000.000011113331111331110.011112122333333322211.013222122333333311221.113111122333344111121.133100123333334413111.131000113333324413310.131000011333322411510.133100001133322221110.111100001111111121100.000000113333333122100.000000135333333312110.000000013341333312211.000000001333224212251.000000001322252213111.000000001222224213310.000000112241222213311.000000125222222211331.000000012222222101151.000000001111111000111",
290
+
291
+ ## 96
292
+ "00000111110000000.00011333311000000.00013111131000000.00011100131110000.00000011133311000.00000113333331100.00000133333333110.00000133333333311.00000133333313331.00000133333341151.00011111133344411.01113333313341111.13533333331313351.01333143331333111.00133333431331111.00133335331333351.00133333431333111.01333143331331000.13533333331110000.01113333310000000.00011111100000000",
293
+
294
+ ## 97
295
+ "00000011111000.00001113331100.00001333333110.00001333313311.00011333311331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01333143331310.00133333431310.00133335331510.00133333431110.01333143331510.13533333331310.01113333313310.00011111113110.00000000111100",
296
+
297
+ ## 98
298
+ "0000000000000111110000.0000000000011133311000.0000000000013311331100.0000000000131111113100.0000000000111333333111.0001111111133333133351.1111333331333333133311.1353333333133333113310.0133314333133333333110.0013333343131314444110.0013333533131514444351.0013333343131134443311.0133314333133333111110.1353333333133111100000.0111333331331100000000.0001111110151000000000.0000000000111000000000",
299
+
300
+ ## 99
301
+ "000000011111000111000.000011113331111331110.011113133333333333311.013333133333333311331.113111133333344111151.133100133333334413111.131000113333334413310.131000011333333411510.133100001133333331110.111100001111111131100.000000113333333133100.000000135333333313110.000000013331433313311.000000001333334313351.000000001333353313111.000000001333334313310.000000113331433313311.000000135333333311331.000000013333333101151.000000001111111000111",
302
+
303
+ ## 100
304
+ "00000111110000000.00011323211000000.00013111131000000.00011100121110000.00000011132311000.00000112333331100.00000133233333110.00000123333333311.00000132333313331.00000133333341151.00011111133344411.01113232313341111.13533333331312351.01333143331333111.00123333431331111.00133335331333351.00123333431333111.01333143331321000.13533333331110000.01113232310000000.00011111100000000",
305
+
306
+ ## 101
307
+ "00000011111000.00001113231100.00001233333110.00001323313211.00011333311321.00013233133131.00013323334121.00011333334131.00011111131121.01113232311331.13533333331111.01333143331210.00123333431310.00133335331510.00123333431110.01333143331510.13533333331310.01113232312310.00011111113110.00000000111100",
308
+
309
+ ## 102
310
+ "0000000000000111110000.0000000000011123211000.0000000000012311321100.0000000000131111113100.0000000000111233333111.0001111111123323133351.1111323231332333133311.1353333333133333113310.0133314333133333333110.0012333343131314444110.0013333533131514444351.0012333343131134442311.0133314333132333111110.1353333333123111100000.0111323231331100000000.0001111110151000000000.0000000000111000000000",
311
+
312
+ ## 103
313
+ "000000011111000111000.000011113331111231110.011113133333333333311.012323133333333311331.113111133233344111151.122100132333334413111.131000113323334413310.121000011233333411510.133100001133333331110.111100001111111131100.000000113332323133100.000000135333333313110.000000013331433313211.000000001233334313351.000000001333353313111.000000001233334313310.000000113331433313211.000000135333333311331.000000013332323101151.000000001111111000111",
314
+
315
+ ## 104
316
+ "00000111110000000.00011223311000000.00012111131000000.00011100131110000.00000011133311000.00000112333321100.00000122233222110.00000122333223311.00000123333313331.00000133332241151.00011111122244411.01113322313241111.12533333331313351.01233143331333111.00133333431231111.00133335331223351.00133333431233111.01332143331331000.13532233331110000.01113333210000000.00011111100000000",
317
+
318
+ ## 105
319
+ "00000011111000.00001113331100.00001223333110.00001223313311.00011233311331.00013333123131.00013333224121.00011333334121.00011111131121.01113322311221.12533333331111.01233143331310.00133333431310.00133335331510.00133333431110.01332143331510.13532233331210.01113333212210.00011111112110.00000000111100",
320
+
321
+ ## 106
322
+ "0000000000000111110000.0000000000011133311000.0000000000012211331100.0000000000121111113100.0000000000111222223111.0001111111133322133351.1111332231333233133311.1253333333133333113310.0123314333133333333110.0013333343131314444110.0013333533121514444251.0013333343121134442211.0133214333122333111110.1353223333123111100000.0111333321331100000000.0001111110151000000000.0000000000111000000000",
323
+
324
+ ## 107
325
+ "000000011111000111000.000011113331111231110.011113133332222233311.013333123333223311331.113111122233344111151.122100122223334413111.121000112223334413310.121000011233333411510.122100001133333331110.111100001111111131100.000000112333223133100.000000125333333313110.000000012331433313311.000000001333334312351.000000001333353312111.000000001333334312210.000000113321433312311.000000135322333311331.000000013333332101151.000000001111111000111",
326
+
327
+ ## 108
328
+ "00000111110000000.00011333311000000.00013111121000000.00011100121110000.00000011123311000.00000112222331100.00000122222333110.00000133323333311.00000133333313331.00000133333241121.00011111132244411.01113333312241111.13533333331212251.01333143331222111.00133322421321111.00132225221333351.00122222421333111.01222142221331000.12522222221110000.01112222210000000.00011111100000000",
329
+
330
+ ## 109
331
+ "00000011111000.00001112221100.00001322222110.00001322212211.00011333211331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533333331111.01333143331210.00133322421210.00132225221210.00122222421110.01222142221510.12522222221310.01112222213310.00011111113110.00000000111100",
332
+
333
+ ## 110
334
+ "0000000000000111110000.0000000000011133211000.0000000000013311221100.0000000000131111112100.0000000000111333222111.0001111111133333122221.1111333331333333133311.1353333333133223113310.0133314333132223333110.0013332242131214444110.0013222522131514444251.0012222242131134442211.0122214222133333111110.1252222222133111100000.0111222221331100000000.0001111110151000000000.0000000000111000000000",
335
+
336
+ ## 111
337
+ "000000011111000111000.000011113331111331110.011112122333333322211.013222122333333311221.113111122333344111121.133100123333334413111.131000113333324413310.131000011333322411510.133100001133322221110.111100001111111121100.000000113333333122100.000000135333333312110.000000013331433312211.000000001333224212251.000000001322252213111.000000001222224213310.000000112221422213311.000000125222222211331.000000012222222101151.000000001111111000111",
338
+
339
+ ## 112
340
+ "00000111110000000.00011333311000000.00013111131000000.00011100131110000.00000011133311000.00000113333331100.00000133333333110.00000133333333311.00000133333313331.00000133333341151.00011111133344411.01113333313341111.13533334331313351.01333134331333111.00133333331331111.00133335331333351.00133333331333111.01333134331331000.13533334331110000.01113333310000000.00011111100000000",
341
+
342
+ ## 113
343
+ "00000011111000.00001113331100.00001333333110.00001333313311.00011333311331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533334331111.01333134331310.00133333331310.00133335331510.00133333331110.01333134331510.13533334331310.01113333313310.00011111113110.00000000111100",
344
+
345
+ ## 114
346
+ "0000000000000111110000.0000000000011133311000.0000000000013311331100.0000000000131111113100.0000000000111333333111.0001111111133333133351.1111333331333333133311.1353333433133333113310.0133313433133333333110.0013333333131314444110.0013333533131514444351.0013333333131134443311.0133313433133333111110.1353333433133111100000.0111333331331100000000.0001111110151000000000.0000000000111000000000",
347
+
348
+ ## 115
349
+ "000000011111000111000.000011113331111331110.011113133333333333311.013333133333333311331.113111133333344111151.133100133333334413111.131000113333334413310.131000011333333411510.133100001133333331110.111100001111111131100.000000113333333133100.000000135333343313110.000000013331343313311.000000001333333313351.000000001333353313111.000000001333333313310.000000113331343313311.000000135333343311331.000000013333333101151.000000001111111000111",
350
+
351
+ ## 116
352
+ "00000111110000000.00011323211000000.00013111131000000.00011100121110000.00000011132311000.00000112333331100.00000133233333110.00000123333333311.00000132333313331.00000133333341151.00011111133344411.01113232313341111.13533334331312351.01333134331333111.00123333331331111.00133335331333351.00123333331333111.01333134331321000.13533334331110000.01113232310000000.00011111100000000",
353
+
354
+ ## 117
355
+ "00000011111000.00001113231100.00001233333110.00001323313211.00011333311321.00013233133131.00013323334121.00011333334131.00011111131121.01113232311331.13533334331111.01333134331210.00123333331310.00133335331510.00123333331110.01333134331510.13533334331310.01113232312310.00011111113110.00000000111100",
356
+
357
+ ## 118
358
+ "0000000000000111110000.0000000000011123211000.0000000000012311321100.0000000000131111113100.0000000000111233333111.0001111111123323133351.1111323231332333133311.1353333433133333113310.0133313433133333333110.0012333333131314444110.0013333533131514444351.0012333333131134442311.0133313433132333111110.1353333433123111100000.0111323231331100000000.0001111110151000000000.0000000000111000000000",
359
+
360
+ ## 119
361
+ "000000011111000111000.000011113331111231110.011113133333333333311.012323133333333311331.113111133233344111151.122100132333334413111.131000113323334413310.121000011233333411510.133100001133333331110.111100001111111131100.000000113332323133100.000000135333343313110.000000013331343313211.000000001233333313351.000000001333353313111.000000001233333313310.000000113331343313211.000000135333343311331.000000013332323101151.000000001111111000111",
362
+
363
+ ## 120
364
+ "00000111110000000.00011223311000000.00012111131000000.00011100131110000.00000011133311000.00000112333321100.00000122233222110.00000122333223311.00000123333313331.00000133332241151.00011111122244411.01113322313241111.12533334331313351.01233134331333111.00133333331231111.00133335331223351.00133333331233111.01332134331331000.13532234331110000.01113333210000000.00011111100000000",
365
+
366
+ ## 121
367
+ "00000011111000.00001113331100.00001223333110.00001223313311.00011233311331.00013333123131.00013333224121.00011333334121.00011111131121.01113322311221.12533334331111.01233134331310.00133333331310.00133335331510.00133333331110.01332134331510.13532234331210.01113333212210.00011111112110.00000000111100",
368
+
369
+ ## 122
370
+ "0000000000000111110000.0000000000011133311000.0000000000012211331100.0000000000121111113100.0000000000111222223111.0001111111133322133351.1111332231333233133311.1253333433133333113310.0123313433133333333110.0013333333131314444110.0013333533121514444251.0013333333121134442211.0133213433122333111110.1353223433123111100000.0111333321331100000000.0001111110151000000000.0000000000111000000000",
371
+
372
+ ## 123
373
+ "000000011111000111000.000011113331111231110.011113133332222233311.013333123333223311331.113111122233344111151.122100122223334413111.121000112223334413310.121000011233333411510.122100001133333331110.111100001111111131100.000000112333223133100.000000125333343313110.000000012331343313311.000000001333333312351.000000001333353312111.000000001333333312210.000000113321343312311.000000135322343311331.000000013333332101151.000000001111111000111",
374
+
375
+ ## 124
376
+ "00000111110000000.00011333311000000.00013111121000000.00011100121110000.00000011123311000.00000112222331100.00000122222333110.00000133323333311.00000133333313331.00000133333241121.00011111132244411.01113333312241111.13533334331212251.01333134331222111.00133322221321111.00132225221333351.00122222221333111.01222124221331000.12522224221110000.01112222210000000.00011111100000000",
377
+
378
+ ## 125
379
+ "00000011111000.00001112221100.00001322222110.00001322212211.00011333211331.00013333133131.00013333334131.00011333334131.00011111131131.01113333311331.13533334331111.01333134331210.00133322221210.00132225221210.00122222221110.01222124221510.12522224221310.01112222213310.00011111113110.00000000111100",
380
+
381
+ ## 126
382
+ "0000000000000111110000.0000000000011133211000.0000000000013311221100.0000000000131111112100.0000000000111333222111.0001111111133333122221.1111333331333333133311.1353333433133223113310.0133313433132223333110.0013332222131214444110.0013222522131514444251.0012222222131134442211.0122212422133333111110.1252222422133111100000.0111222221331100000000.0001111110151000000000.0000000000111000000000",
383
+
384
+ ## 127
385
+ "000000011111000111000.000011113331111331110.011112122333333322211.013222122333333311221.113111122333344111121.133100123333334413111.131000113333324413310.131000011333322411510.133100001133322221110.111100001111111121100.000000113333333122100.000000135333343312110.000000013331343312211.000000001333222212251.000000001322252213111.000000001222222213310.000000112221242213311.000000125222242211331.000000012222222101151.000000001111111000111"
386
+ ]
@@ -0,0 +1,215 @@
1
+
2
+ module Mooncats
3
+ class Image
4
+
5
+
6
+ COLORS_GENESIS_WHITE = ['#555555', '#d3d3d3', '#ffffff', '#aaaaaa', '#ff9999']
7
+ COLORS_GENESIS_BLACK = ['#555555', '#222222', '#111111', '#bbbbbb', '#ff9999']
8
+
9
+
10
+ def self.generate( cat_id, zoom: 1 )
11
+ bytes = hex_to_bytes( cat_id )
12
+
13
+ genesis = bytes[0] != 0 ## note: convert to bool (if zero assume NOT genesis)
14
+ k = bytes[1]
15
+ r = bytes[2]
16
+ g = bytes[3]
17
+ b = bytes[4]
18
+
19
+ invert = k >= 128
20
+ design = k % 128
21
+
22
+ colors = if genesis
23
+ if design % 2 === 0 && invert ||
24
+ design % 2 === 1 && !invert
25
+ COLORS_GENESIS_WHITE
26
+ else
27
+ COLORS_GENESIS_BLACK
28
+ end
29
+ else
30
+ derive_palette( r, g, b, invert: invert )
31
+ end
32
+
33
+ new( design: design,
34
+ colors: colors,
35
+ zoom: zoom )
36
+ end
37
+
38
+
39
+ def initialize( design: 0,
40
+ colors: COLORS_GENESIS_WHITE,
41
+ zoom: 1 )
42
+
43
+ ## puts "==> [Mooncats] Image.new zoom: #{zoom}"
44
+
45
+ design = if design.is_a?( String )
46
+ Design.parse( design )
47
+ elsif design.is_a?( Array )
48
+ Design.new( design )
49
+ elsif design.is_a?( Design )
50
+ design ## pass through as is 1:1
51
+ else ## assume integer nuber
52
+ design_num = design ## note: for convenience "porcelain" param is named design (NOT design_num)
53
+ Design.find( design_num )
54
+ end
55
+
56
+ ## note: first color (index 0) is always nil (default/white or transparent)
57
+ colors = [ nil ] + parse_colors( colors )
58
+
59
+ ## puts " colors:"
60
+ ## pp colors
61
+
62
+ @cat = ChunkyPNG::Image.new( design.width*zoom,
63
+ design.height*zoom,
64
+ ChunkyPNG::Color::WHITE ) # why? why not?
65
+
66
+ design.each_with_index do |row, x|
67
+ row.each_with_index do |color, y|
68
+ if color > 0
69
+ pixel = colors[ color ]
70
+ zoom.times do |n|
71
+ zoom.times do |m|
72
+ @cat[n+zoom*x,m+zoom*y] = pixel
73
+ end
74
+ end
75
+ end # has color?
76
+ end # each row
77
+ end # each data
78
+ end
79
+
80
+ #####
81
+ # (image) delegates
82
+ ## todo/check: add some more??
83
+ def save( path ) @cat.save( path ); end
84
+ def width() @cat.width; end
85
+ def height() @cat.height; end
86
+
87
+
88
+
89
+ ##################
90
+ # (static) helpers
91
+ def self.hex_to_bytes( str_or_num )
92
+ if str_or_num.is_a?( Integer ) ## allow passing in of integer to e.g. 0x... etc.
93
+ num = str_or_num
94
+ str = '%010x' % num # 5 bytes (10 hex digits/chars)
95
+ else ## assume string
96
+ ## cut-off optionial 0x
97
+ str = str_or_num
98
+ str = str.downcase
99
+ str = str[2..-1] if str.start_with?( '0x')
100
+ end
101
+
102
+ raise ArgumentError, "expected 5 byte hex string (10 digits/chars); got #{str_or_num}" if str.size != 10
103
+
104
+ bytes = [str].pack('H*').bytes
105
+ bytes
106
+ end
107
+
108
+ def self.derive_palette( r, g, b, invert: false )
109
+ ## note: Color.rgb returns an Integer (e.g. 34113279 - true color or just hex rgba or?)
110
+ rgb = ChunkyPNG::Color.rgb( r, g, b )
111
+
112
+ # to_hsl(color, include_alpha = false) ⇒ Array<Fixnum>[0], ...
113
+ # Returns an array with the separate HSL components of a color.
114
+ hsl = ChunkyPNG::Color.to_hsl( rgb )
115
+ #=> [237, 0.9705882352941178, 0.26666666666666666]
116
+
117
+ h = hsl[0]
118
+ s = hsl[1]
119
+ l = hsl[2]
120
+
121
+ hx = h % 360
122
+ hy = (h + 320) % 360
123
+ #=> e.g. hx: 237, hy: 197
124
+
125
+ c1 = ChunkyPNG::Color.from_hsl( hx, 1, 0.1 )
126
+ if invert
127
+ c4 = ChunkyPNG::Color.from_hsl( hx, 1, 0.2 )
128
+ c5 = ChunkyPNG::Color.from_hsl( hx, 1, 0.45 )
129
+ c2 = ChunkyPNG::Color.from_hsl( hx, 1, 0.7 )
130
+ c3 = ChunkyPNG::Color.from_hsl( hy, 1, 0.8 )
131
+ else
132
+ c2 = ChunkyPNG::Color.from_hsl( hx, 1, 0.2 )
133
+ c3 = ChunkyPNG::Color.from_hsl( hx, 1, 0.45 )
134
+ c4 = ChunkyPNG::Color.from_hsl( hx, 1, 0.7 )
135
+ c5 = ChunkyPNG::Color.from_hsl( hy, 1, 0.8 )
136
+ end
137
+
138
+ ## note: returns an array of Integers!!
139
+ ## e.g. [144127, 354047, 779775, 1701707775, 2581790719]
140
+ [c1, c2, c3, c4, c5]
141
+ end
142
+
143
+
144
+ ######
145
+ # helpers
146
+ def parse_colors( colors )
147
+ ## convert into ChunkyPNG::Color
148
+ colors.map { |color| parse_color( color ) }
149
+ end
150
+
151
+ def parse_color( color )
152
+ if color.is_a?( Integer ) ## e.g. Assumess ChunkyPNG::Color.rgb() or such
153
+ color ## pass through as is 1:1
154
+ elsif color.is_a?(String)
155
+ ## note: return an Integer !!! (not a Color class or such!!! )
156
+ ChunkyPNG::Color.from_hex( color )
157
+ else
158
+ raise ArgumentError, "unknown color format; cannot parse - expected rgb hex string e.g. d3d3d3"
159
+ end
160
+ end
161
+ end # class Image
162
+
163
+
164
+
165
+ class Design
166
+ def self.find( num ) ## pass in design index number (0 to 127)
167
+ ## todo: add cache (memoize) - why? why not?
168
+ str = DESIGNS[ num ]
169
+ design = parse( str )
170
+
171
+ puts " design ##{num} (#{design.width}x#{design.height})"
172
+ ## pp design.data
173
+ ## puts
174
+
175
+ design
176
+ end
177
+
178
+
179
+ def self.parse( str )
180
+ data = str.split('.')
181
+ new( data )
182
+ end
183
+
184
+ def initialize( data )
185
+ ## todo: add cache (memoize) - why? why not?
186
+
187
+ ## note: map colors encoded as a string to an array of integers - why? why not?
188
+ ## e.g. "00011111133344411"
189
+ ## =>
190
+ ## [0,0,0,1,1,1,1,1,1,3,3,3,4,4,4,1,1]
191
+
192
+ @data = data.map do |row|
193
+ row.chars.map do |color|
194
+ color.to_i
195
+ end
196
+ end
197
+ end
198
+
199
+ ## note: design data stored mirrored (data.size is the width NOT height)
200
+ def width() @data.size; end
201
+ def height() @data[0].size; end
202
+
203
+ def data() @data; end
204
+
205
+ def each_with_index( &blk )
206
+ ## note: y,x is reversed - keep for now
207
+ ## (todo/fix later? and "pivot" raw data on init - why? why not?)
208
+ @data.each_with_index do |row, x|
209
+ blk.call( row, x )
210
+ end
211
+ end
212
+ end # class Design
213
+
214
+ end # module Mooncats
215
+
@@ -0,0 +1,22 @@
1
+
2
+ module Mooncats
3
+
4
+ MAJOR = 0
5
+ MINOR = 1
6
+ PATCH = 0
7
+ VERSION = [MAJOR,MINOR,PATCH].join('.')
8
+
9
+ def self.version
10
+ VERSION
11
+ end
12
+
13
+ def self.banner
14
+ "mooncats/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
15
+ end
16
+
17
+ def self.root
18
+ File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
19
+ end
20
+
21
+ end # module Mooncats
22
+
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mooncats
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Gerald Bauer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chunky_png
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: csvreader
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '7'
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '4.0'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '7'
61
+ - !ruby/object:Gem::Dependency
62
+ name: hoe
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.22'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.22'
75
+ description: mooncats - mint your own mooncat pixel art images off chain using any
76
+ of the 128 True Official Genuine Mooncat™ md5-verified original designs; incl. 2x/4x/8x
77
+ zoom for bigger sizes
78
+ email: wwwmake@googlegroups.com
79
+ executables:
80
+ - mooncat
81
+ extensions: []
82
+ extra_rdoc_files:
83
+ - CHANGELOG.md
84
+ - LICENSE.md
85
+ - Manifest.txt
86
+ - README.md
87
+ files:
88
+ - CHANGELOG.md
89
+ - LICENSE.md
90
+ - Manifest.txt
91
+ - README.md
92
+ - Rakefile
93
+ - bin/mooncat
94
+ - lib/mooncats.rb
95
+ - lib/mooncats/designs.rb
96
+ - lib/mooncats/image.rb
97
+ - lib/mooncats/version.rb
98
+ homepage: https://github.com/cryptocopycats/mooncats
99
+ licenses:
100
+ - Public Domain
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options:
104
+ - "--main"
105
+ - README.md
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '2.3'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.1.4
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: mooncats - mint your own mooncat pixel art images off chain using any of
123
+ the 128 True Official Genuine Mooncat™ md5-verified original designs; incl. 2x/4x/8x
124
+ zoom for bigger sizes
125
+ test_files: []