26
votes
11
votes
Draw the GKMS aperiodic tile
JavaScript (ES6), 150 bytes
-10 thanks to @Neil
Generates a SVG.
...
9
votes
Draw a Gameboy Tile
J, 41 bytes
load'viewmat'
[:viewmat 2#._2|:@|.\#:@dfh
Try it online - fails because TIO can't run viewmat
Working link that outputs a matrix of integers 0 thru 3
...
8
votes
Accepted
Draw a Gameboy Tile
MATL, 13 bytes
8&B1L&Y)E+1YG
Inputs an array of bytes, and displays an image. The image consists of grey colours where ...
8
votes
Draw a Gameboy Tile
Shell + rgbds devkit, 16 bytes
rgbgfx -r1 -o- -
Takes raw bytes from stdin and outputs a png on stdout. rgbgfx is the graphics conversion program from the RGBDS ...
8
votes
7
votes
Accepted
Create a triangle whose colors are determined by the bitsums of coordinates
Wolfram Language (Mathematica), 119 bytes
-1 byte thanks to @att.
...
7
votes
Draw a Gameboy Tile
R, 65 bytes
\(a)image(t((b=outer(rev(a),2^(7:0),`%/%`)%%2)[!1:0,]+2*b[!0:1]))
Don't attempt This Online; instead, Try it at rdrr.io with graphical output (uses <...
7
votes
Draw a Gameboy Tile
QBasic, 100 96 bytes
SCREEN 7
FOR r=0TO 7
INPUT a
INPUT b
FOR c=0TO 7
PSET(7-c,r),a\2^c MOD 2+(1AND b\2^c)*3
NEXT c,r
You can try it on Archive.org. Input the ...
7
votes
7
votes
Draw Parcly Taxel's cutie mark
JavaScript (ES6), 273 bytes
Thanks to @Shaggy for suggesting to switch from HTML+JS to JS and saving 2 bytes in the new version
Generates a SVG similar to this one from Parcly Taxel.
...
6
votes
Create a triangle whose colors are determined by the bitsums of coordinates
JavaScript (ES76), 191 187 180 174 172 168 152 bytes
...
6
votes
Draw a Gameboy Tile
Japt -R, 17 25 23 bytes
m¤ùT8 ò ®y͸Ãi"P2 8 8 3
Try it
Saved two bytes thanks to Shaggy
Previously, this answer outputted ...
6
votes
Convert numbers to dice patterns
Python 3 (194 199 210 bytes) -16 (- 5 thanks to Kevin)
My First golf!
Returns a int, array, where len(arr) == side ** 2
...
5
votes
Create a triangle whose colors are determined by the bitsums of coordinates
C++ using SFML : 722 703 683 527 411 399 bytes
-19 bytes thanks to NoLongerBreathedIn, using __builtin_popcount removes needing a bitsum function. Might work only for GCC.
-20 bytes, I used the using ...
5
votes
Draw a Gameboy Tile
JavaScript (ES6), 79 bytes
Expects a list of bytes and outputs a matrix of RGB tuples, using the greenish palette 00C000, 008000,...
5
votes
Draw a Gameboy Tile
C, 108 105 95 93 89 85 bytes
b;main(j){for(puts("P5 8 8 3");j=j-1?:read(0,&b,2)*4;b+=b)putchar(3^b>>14&2^b>>7&1);}
Try it online!...
5
votes
Draw the GKMS aperiodic tile
Logo, 133 bytes
to s:a:n:m
fw:a*150
rt:n*60-60
fw:a*150
rt:m*90-90
end
to t:a
s 1-:a 2 2
s:a 0 2
s 1-:a 0 2
s:a 2 0
s 1-:a 2 2
s:a 2 0
s 1-:a 2 1
end
Unfortunately ...
5
votes
Draw the GKMS aperiodic tile
Wolfram Language (Mathematica), 112 bytes
(q=1-#;r=Pi/2;t=Pi/3;AnglePath@MapThread[List,{{#,#,q,q,#,#,q,q,#,#,q,2 q,q},{0,-t,r,-t,r,t,-r,t,r,t,-r,t,t}}])&
Try ...
5
votes
4
votes
4
votes
Draw the Ukrainian Flag
Game Boy Color assembly, 99 97 bytes
Must be placed at $0150, to which it is jumped from $0100 (standard Game Boy stuff).
...
4
votes
Draw the national flag of Iceland
NES 6502 Assembly, 156 Bytes
This might not be the most impressive implementation, but it felt like between all the other popular assembly languages this one was still missing.
I don't even know if ...
4
votes
Draw the GKMS aperiodic tile
Python, 123 118 bytes
from turtle import*
def t(a):
m=13609645555;reset()
while m:fd([1-a,a][m>>2&1]*150);rt((m%4*5%9-3)*30);m>>=3
home()
The ...
3
votes
Draw the Ukrainian Flag
Nibbles, 26.5 bytes (53 nibbles)
"P3 78 52 255 ".\`\~`D256^2028$ FFD7000057B7
Outputs a plain PPM file of 78x52 pixels, depicting the Ukrainian flag ...
3
votes
Create a triangle whose colors are determined by the bitsums of coordinates
Wolfram Language (Mathematica), 222 bytes
...
3
votes
Draw the national flag of France
Grasshopper JS, 21 bytes
drawBoxes('bwr bwr');
Outputs this image:
3
votes
Draw a Gameboy Tile
K (ngn/k), 44 bytes
`0:"P2 8 8 3"
2/+,/+'0N 2#-8#'+(8#0),2\.0:`
Takes input as a space separated list of integers. Outputs a plain pgm to stdout.
Colors ...
3
votes
2
votes
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
graphical-output × 346code-golf × 264
popularity-contest × 58
image-processing × 55
kolmogorov-complexity × 44
geometry × 44
ascii-art × 33
fractal × 25
code-challenge × 21
math × 20
animation × 16
random × 11
color × 9
number × 8
tiling × 7
game × 6
compression × 5
cellular-automata × 5
game-of-life × 5
trigonometry × 5
sequence × 4
integer × 4
grid × 4
path-finding × 4
hello-world × 4