Skip to main content
270 votes

Draw the national flag of Iceland

Python 3, 190 172 171 169 167 160 159 147 143 bytes Using PIL version 1.1.7 which has a deprecated but not removed offset method. ...
Gábor Fekete's user avatar
120 votes

Draw the national flag of Iceland

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes The code is meant to be executed as a DOS COM executable. Special thanks meden, saved four bytes. meden, saved two bytes and removed the ...
Margaret Bloom's user avatar
115 votes

The Crow vs The Taxicab

Taxi, 7394 3773 bytes ...
Stephen's user avatar
  • 14k
58 votes

Appease Your Google Overlords: Draw the "G" Logo

Mathematica, 229 226 225 224 221 206 169 bytes Thanks @MartinEnder for 1 byte, @ChipHurst for 37 bytes! ...
JungHwan Min's user avatar
  • 13.8k
57 votes

Draw the national flag of Iceland

C, 194 191 183 Bytes ...
Giacomo Garabello's user avatar
57 votes

Triangular Lattice Points close to the Origin

Python 2, 43 bytes f=lambda n,a=1:n*n<a/3or n*n/a*6-f(n,a+a%3) Try it online! This is black magic. Offering 250 rep for a written-up proof. See Lynn's ...
xnor's user avatar
  • 145k
56 votes

Evaluate the aspect ratio of a triangle

Jelly, 7 bytes SH_÷@HP Try it online! Explanation Let’s read this chain: The implicit argument is a list [a, b, c]. First ...
lynn's user avatar
  • 68.8k
46 votes

Construct a pentagon avoiding compass use

2 circles, 13 lines, 17 points Try it on GeoGebra Let circle(A, B) intersect circle(B, A) at C and D. Let AB intersect circle(A, B) again at E. Let AB intersect circle(B, A) again at F. Let AD ...
Anders Kaseorg's user avatar
45 votes

Appease Your Google Overlords: Draw the "G" Logo

C (Windows), 311 bytes ...
Martin Rosenau's user avatar
43 votes

Random point on a sphere

Wolfram Language (Mathematica), 20 bytes RandomPoint@Sphere[] Try it online! Does exactly what it says on the tin.
att's user avatar
  • 20.7k
41 votes

Draw the Ionising Radiation Hazard Symbol

BBC BASIC, 200 bytes ...
Beta Decay's user avatar
  • 23.4k
38 votes

Is my triangle right?

Jelly, 5 bytes ²µSHe Try it online! Technical note: Bytes are counted in Jelly codepage. Explanation: ...
DELETE_ME's user avatar
  • 17.3k
36 votes

Diamond creator +

brainfuck, 151 139 bytes ...
Jo King's user avatar
  • 47.2k
36 votes

Covering a Skyline with brush strokes

JavaScript (Node.js), 38 bytes a=>a.map(v=>(n+=v>p&&v-p,p=v),p=n=0)|n Try it online! Simply a greedy algorithm which scan from left to right, ...
tsh's user avatar
  • 34.9k
35 votes

Appease Your Google Overlords: Draw the "G" Logo

Python 2, 244 220 bytes using Martin Rosenau's transformation on the [-1,1]^2 plane and minor golfing like removing 0. or brackets ...
Karl Napf's user avatar
  • 4,413
34 votes

Solve Grid-Tangram

BBC BASIC, 570 514 490 bytes ASCII Download interpreter at http://www.bbcbasic.co.uk/bbcwin/download.html 435 bytes tokenised Full program displays an input from ...
Level River St's user avatar
34 votes

Triangular Lattice Points close to the Origin

Haskell, 48 bytes f n=1+6*sum[(mod(i+1)3-1)*div(n^2)i|i<-[1..n^2]] Try it online! Uses xnor's "black magic" formula: $$f(n)=1+6\sum_{a=0}^\infty \...
lynn's user avatar
  • 68.8k
32 votes

Draw the national flag of Iceland

Excel VBA, 254 228 153 bytes Couldn't really find a way to set column/row size to pixels(thereby making them square) because of the way Excel handles it so make them nice and square first. Edit 1: ...
tjb1's user avatar
  • 571
31 votes

Covering a Skyline with brush strokes

05AB1E,  8 7  5 bytes Saved 2 bytes thanks to @Adnan 0š¥þO Try it online! How? This is using the algorithm that was first found by @tsh. If you like this answer, ...
Arnauld's user avatar
  • 193k
30 votes

What is the area of this polygon?

Mathematica, 13 bytes Area@*Polygon
Martin Ender's user avatar
30 votes

Triangular Lattice Points close to the Origin

Wolfram Language (Mathematica), 53 51 50 bytes -1 byte thanks to @miles Sum[Boole[x(x+y)+y^2<=#^2],{x,-2#,2#},{y,-2#,2#}]& Try it online! How? Instead of ...
JungHwan Min's user avatar
  • 13.8k
29 votes

Draw the national flag of Iceland

MATL, 57 56 52 49 48 bytes 7:g2IvtPvt!9Mh2$X>2YG[0E28]8*255/7B[43DD]51/v2ZG This produces the following figure (tested with the compiler running on Matlab and ...
Luis Mendo's user avatar
  • 105k
28 votes
Accepted

Gasket Weaving - draw a Sierpiński knot

Ruby, 1168 932 Corrected a mistake from last night, more golfing to do after clarifying. This is (currently) a full program that accepts a number from stdin and outputs an ...
Level River St's user avatar
27 votes

Draw the national flag of Iceland

Bash + Imagemagick 7, 94 90 86 85 bytes magick -size 84x56 xc:#0048e0 ${s=-splice 8x8}+28+28 -background \#d72828 $s+32+32 x: Saved 8 bytes, thanks to @manatwork, ...
bodqhrohro's user avatar
27 votes

Draw the national flag of Iceland

CSS, 285 284 264 bytes ...
gcampbell's user avatar
  • 561
27 votes

Appease Your Google Overlords: Draw the "G" Logo

JavaScript (ES6), 408 ... 321 317 bytes 384 383 371 367 359 327 316 308 304 bytes of JavaScript + 24 13 bytes for the canvas element ...
Hedi's user avatar
  • 1,977
26 votes
Accepted

Golf the smallest circle!

Wolfram Language (Mathematica), 28 27 bytes #~BoundingRegion~"MinDisk"& Try it online! Built-ins are handy here. Output is a disk object with the centre and ...
Nick Kennedy's user avatar
  • 21.1k
25 votes

Appease Your Google Overlords: Draw the "G" Logo

BBC BASIC, 177 bytes Download interpreter at http://www.bbcbasic.co.uk/bbcwin/download.html ...
Level River St's user avatar
25 votes

Volumes of ASCII boxes

Retina, 29 28 bytes T`.p`xy`\G\..+¶ xy ¶\| $` y Try it online! There's a lot of ways to approach this in Retina, depending on which area you want to multiply ...
Martin Ender's user avatar
25 votes

Draw HyperNeutrino's benzene hegaxon icon in ASCII

Charcoal, 23 bytes ×_⁷↙←×_⁸↖⁶→↗⁶P×_⁸↘↓↙⁵‖B Try it online! Explanation: Prints the lines in the following order, then reflects everything horizontally: ...
Neil's user avatar
  • 172k

Only top scored, non community-wiki answers of a minimum length are eligible