This challenge involves drawing pictures on a screen or generating image files. For pure ASCII art contests, use [ascii-art] instead. If participants can choose between graphics and ASCII art, use both tags. For images as input, use [image-processing].

learn more… | top users | synonyms (1)

95
votes
24answers
13k views

Appease Your Google Overlords: Draw the “G” Logo

Write a program or function that takes in a positive integer N, and outputs an N×N pixel image of Google's "G" logo according to this* construction: For example, if N is 400, a 400×...
4
votes
1answer
286 views

Fabulous glamour shot

Found this picture on the web today. Being a lazy programmer, I don't want to actually open google and type a couple of characters. Way too much work! This is such an important task that it should be ...
26
votes
1answer
343 views

Build an aesthetically pleasing divisor tree

An aesthetically pleasing divisor tree is a tree of divisors of input n that, for any composite number m, has two children nodes that are the pair of divisors that are closest to the square root of m. ...
16
votes
6answers
589 views

Simulate a Rubik's cube

A Rubik's cube has 6 colors: red, orange, yellow, white, blue, and green. Red and orange, yellow and white, and blue and green faces are on opposite sides. Net of a solved Rubik's cube looks like ...
0
votes
1answer
255 views

Write an xkcd feed bot

The new xkcd feed bot room gave me an idea for a simple challenge. Your code will have to monitor the xkcd website and output all the new comics to the user. Specs When first run it should just sit ...
35
votes
9answers
3k views

Quixels - Quantum Pixels

Introduction A quixel is a quantum pixel. Similar to a classical pixel, it is represented with 3 integer values (Red, Green, Blue). However, quixels are in a super position of these 3 states instead ...
7
votes
5answers
532 views

Draw the Union Jack

Preface There are many "draw x flag" challenges, and upon searching it turns out there are no challenges to draw the union Jack! I feel like this would be a harder flag to draw but it should still be ...
93
votes
7answers
3k views

Exponentially Slimy Programming: Stacking Minecraft Slimes

Slimes are cube shaped enemies in Minecraft that break into multiple smaller versions of themselves when killed. For the purposes of this challenge we'll depict them as an 8×8 pixel image with 3 ...
5
votes
2answers
450 views

Draw a Fibonacci Network!

What are Fibonacci networks? In 1202, an Italian mathematician known as Fibonacci posed the following problem: "A male and a female rabbit are born at the beginning of the year. We assume the ...
12
votes
5answers
367 views

Algebraic curve plotter

An algebraic curve is a certain "1D subset" of the "2D-plane" that can be described as set of zeros {(x,y) in R^2 : f(x,y)=0 }of a polynomial f. Here we consider the 2D-plane as the real plane R^2 ...
2
votes
2answers
332 views

Make a sprite-sheet from all the Stack Exchange sites' favicons

Your goal in this code golf is to compile all the Stack Exchange sites' favicons. Getting the Domains The domains you will be using will be: *.stackexchange.com stackexchange.com stackoverflow.com ...
9
votes
6answers
421 views

Reverse Bayer Filter of an image

Almost all digital camera sensors are organized in a grid of photosensors. Each photo sensor is sensitive for one of the primary colors: red, green and blue. The way those photo sensors are organized ...
8
votes
3answers
499 views

Draw the EU Estimated Sign

The specification of the "estimated" sign used by the European Union Directive (U+212e in Unicode, which you may not simply print for this challenge) is quite precise. To copy some restrictions from ...
76
votes
65answers
17k views

Draw the national flag of Iceland

This year's UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – the Iceland national football team. Let's draw their national flag. ...
19
votes
2answers
434 views

Borders of overlapping circles

Given the coordinates of several points on a plane, and the radius of a circle surrounding each point, draw polygons representing the circles and the edges where the circles meet. Straight edges will ...
24
votes
4answers
853 views

Rotate a hypercube

Introduction A hypercube/tesseract is the 4 dimensional equivalent of a normal cube. It's made by taking a cube net, extending it to the 3rd dimension, then – using the 4th dimension – folding it ...
40
votes
3answers
1k views

Computer Generated Cracked Soil

Write a program that takes in an integer from 0 to 65535 (216-1) and generates a unique 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil: ...
26
votes
9answers
1k views

Generate a “GitHub” Avatar

Background / Description Note: as @HelkaHomba points out, the actual GitHub identicons are not actually random but based on the hash of a username The default GitHub avatar is a 5x5-pixel image. A ...
10
votes
1answer
288 views

Recursive Steiner Chains

Steiner Chains are a set of N circles where each circle is tangent to 2 other non-intersecting circles as well as the the previous and next circles of the chain, as seen in the below images: In ...
17
votes
10answers
1k views

Compress your code in an image

This is a quine variation. Introduction We all write short code, because some obscure reasons, but whatever we do, the'll take up at least 144 pixels/byte (with a 12px font). But what would happen, ...
27
votes
1answer
499 views

Gasket Weaving - draw a Sierpiński knot

Given an integer N >= 2, produce an image showing a Sierpiński knot of degree N. For example, here are knots of degree 2, 3, 4 and 5: Click on the images to view full size (the higher the degree the ...
7
votes
2answers
358 views

Outline a PNG image

Intro (semi fictional) I'm the solo developer of a game, I'm already struggling with character design as is. Hence I've thought of a smart solution, I'll just use images for regular monsters, outline ...
5
votes
1answer
240 views

Tiling by substitution

EDIT: The incorrect A rhomb substitution has been fixed. Apologies to anoyone who had started working on a solution. Consider the following substitutions, where the substituted rhomb(us) is scaled up ...
29
votes
9answers
1k views

Between the Lines

While doodling around on square-ruled paper the other day, I came up with the above negative-space font for digits. In case you haven't spotted it yet, the spaces between the above shapes yield the ...
23
votes
3answers
1k views

Rainbowlify An Image

This challenge is about gradually shifting hues in an image to make pretty pictures like this: (original) Challenge Write a program or function that takes in two non-negative integers and an image ...
10
votes
3answers
680 views

Draw a simple cube

We don't have a single challenge about drawing a real 3 dimensional cube, so here it goes: Challenge Your task is to draw a rotated, cube with perspective. It can be in a separate window or as an ...
4
votes
4answers
580 views

Box-256 Assembly - BIG SQUARE II

I'd like to start a series of challenges for http://box-256.com/ starting with the first challenge, “BIG SQUARE II”. After this one I'll add another for "CHECKERBOARD" and so on. Rules: Complete the ...
13
votes
3answers
949 views

Create a pie chart

The challenge is simple: Create a pie-chart based on a number of input values. The input will be a list of positive numbers, decimal or integers, and the output will be a pie-chart where each of the ...
11
votes
3answers
509 views

Draw a spiral in a box

This geometric spiral looks complicated, but it's fairly simple to draw; take the following box: Draw a straight line between the corner of the box and some set distance above the next corner counter-...
22
votes
3answers
783 views

Draw a random hexa-glyph

The above image is called a hexa-glyph. Hexa-glyphs are some cool patterns I made up while doodling during my DiffEq class. Here's how you make one: Consider the following set of points, shaped ...
13
votes
16answers
3k views

Invert png image

Create program or function that takes file name as an argument or reads it from standard input, and completes the following task: Read image from a png file (name given as argument). Reverse colors ...
-6
votes
4answers
207 views

Graph an equation!

Please note that this question is different from this question. This one asks for graphical output, while the other one asks for ascii art. Objective Help! Timmy's graphing calculator broke! His ...
22
votes
29answers
3k views

Draw the rainbow

The challenge is simple: Draw a rainbow in as few bytes as possible The specs for the rainbow are as follows: The figure must be exactly 400 pixels wide and 200 pixels high (optionally 401x201 if ...
3
votes
1answer
301 views

What time is it again? [closed]

The Inspiration The Challenge I'm tired of seeing the same old-same old clock in my top-right-hand corner of my screen. It's time for a new clock. While the clock clock sated my lack of interesting ...
12
votes
3answers
578 views

Fill the holes in letters

Sometimes when I'm bored, I take some text and fill the "holes" in the letters. But isn't filling the holes the most boring thing you can do? I think we should automate it, so we could use our time ...
29
votes
3answers
3k views

Dank Meme Generator

I like making dank memes out of my own images. But all those so called "quick meme" sites just have too much code. I realized that the only way to make the dankest meme generator is to ask you guys at ...
20
votes
30answers
3k views

Build a chessboard

Saw this in a PHP challenge. The objective is to make a chessboard with 64 squares (8*8) with the minimum amount of code. Simple enough, I made mine in PHP in 356 bytes (not impressive, I know) and I ...
83
votes
9answers
3k views

Patch the Image

In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information ...
189
votes
34answers
28k views

Paint Starry Night, objectively, in 1kB of code

Below is a 386x320 png representation of van Gogh's Starry Night. Your goal is to reproduce this image as closely as possible, in no more than 1024 bytes of code. For the purposes of this challenge, ...
22
votes
6answers
1k views

Triangular Ulam spiral

We've had a couple of challenges about the Ulam spiral. But that's not enough. In this challenge we will plot a triangular Ulam spiral (as opposed to the usual, square Ulam spiral). Here's a sketch ...
23
votes
6answers
2k views

Flip It, Flop It, Mean It

Overview Given an image in plain PPM (P3) format as input, for each pixel p in the image, replace each of the following 4 pixels' red, green, and blue with the floored average value of the respective ...
51
votes
6answers
1k views

Paint by Numbers (using programming, not numbers)

Your task is to create a program which takes a black-and-white outlined image (example images are below) and fills it in with colour. It is up to you how you section off each region and which colour ...
7
votes
1answer
446 views

Make the pattern from composition notebooks [closed]

This challenge was xnor's idea, taken from Digital Trauma's challenge donation thread. Your challenge is to write a program that, as xnor put it, "procedurally generate[s] the splotchy black-and-...
25
votes
6answers
587 views

Draw the Pentaflake

First of all ... I would like to wish everyone a Merry Christmas (sorry if I am a day late for your timezone). To celebrate the occasion, we are going to draw a snowflake. Because the year is 2015 ...
15
votes
0answers
505 views

…And Mexico will Pay for It!

Donald Trump is very impressed with the work of the people on this site. He saw how amazing of a job you did helping Ben Carson, so he even hired you to build his wall. He thinks you're terrific. Now ...
9
votes
3answers
513 views

Draw a Christmas Star / Stellated Dodecahedron

Paper stars are a big thing in my family at christmas, so I thought a virtual one would be cool. Below is an image of a regular dodecahedron (from https://en.wikipedia.org/wiki/Dodecahedron, ...
-2
votes
1answer
180 views

Creating a colour chart in PHP will all colours [duplicate]

Now, before we begin, this has already been done here. But!, there are no PHP answers. With that in mind, my CodeGolf is thus: create a program to show all the colours in the html CSS spectrum using ...
77
votes
2answers
1k views

Sprocket Science: Animating a Chain Drive System

The goal of this challenge is to produce an animation of a chain drive system, comprised of a set of sprocket gears connected together by a chain. General Requirements Your program will be given a ...
14
votes
18answers
1k views

Make the PPCG Logo

Come November 1, Programming Puzzles and Code Golf will graduate, so in the next 11 months, we'll want to save some memories from when we were ungraduated. Write a program that produces the PPCG logo,...
19
votes
1answer
489 views

Packing Circles

Take a look at this image. Specifically, at how the holes on the ends are arranged. (Image source) Notice how the pipes in this image are packed in a hexagonal pattern. It is known that in 2D, a ...