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)

22
votes
4answers
596 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 ...
31
votes
3answers
751 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: ...
19
votes
8answers
816 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
227 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
932 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, ...
26
votes
1answer
372 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 ...
7
votes
2answers
284 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
217 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 ...
20
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 ...
9
votes
3answers
570 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
515 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 ...
13
votes
3answers
887 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
468 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 ...
16
votes
2answers
501 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 ...
12
votes
11answers
2k 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
189 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 ...
21
votes
28answers
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
287 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
554 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 ...
19
votes
26answers
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 ...
79
votes
8answers
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 ...
181
votes
33answers
27k 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,...
21
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 ...
49
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
302 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
558 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 ...
9
votes
0answers
339 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
456 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
146 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 ...
59
votes
2answers
906 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
448 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 ...
48
votes
3answers
2k views

Black and White Rainbows

Given an image that has only black and white pixels and an (x,y) location that's a white pixel, color the white pixels based on their minimal Manhattan distance from (x,y) in a path that only involves ...
15
votes
4answers
553 views

Make America(n Maps) Great Again

New Bonus! (See below) The cartography team of U.S. Republican presidential hopeful Ben Carson is having some trouble with their maps (image via Washington Post): The problem is they don't have ...
93
votes
71answers
14k views

Draw the national flag of France

There have been many other flag challenges posted but not one for the national flag of France. This week seems like an appropriate time. Produce this flag in the fewest bytes possible: The image ...
20
votes
1answer
553 views

The Death Of Low-Resolution Pixel Art (Or, Draw That Death)

This is an Irregular Webcomic! themed task.* Death is a rather extensive orginization, and, although Head Death has had no trouble telling his employees apart, certain other entities connected to ...
6
votes
1answer
332 views

Sobel edge detector

Your task is to write a program that takes an input image and run it through edge-detection to become an output image. The edge-detection works as follows (if unclear, see sobel edge detection): ...
21
votes
1answer
345 views

Plumbing Random Paths

Write a program or function that takes in three integers, a width w, a height h, and a step count s. You will be drawing a non-self-intersecting random walk s steps long on a 5*w by 5*h pixel image ...
33
votes
12answers
3k views

Sort the pixels

Your task is to create a program that will, given an input image, create an output image of the same size, where all pixels are ordered by hex value. Your program may: Sort the pixels from left to ...
15
votes
9answers
819 views

Proto space invaders (can you blit it?)

Proto space invaders This is a graphical output challenge where the task is to give the shortest code per language. Task Your code should allow the user to move the following alien around the ...
36
votes
40answers
6k views

A single pixel moving in a circular path

This is a graphical output challenge where the task is to give the shortest code per language. Task Your code should plot a single purple pixel (hex value #800080 or rgb(128, 0, 128)), moving ...
20
votes
8answers
845 views

Circular ​Blues

Write a program or function that takes in a positive integer N and recreates this pattern of circles scaled to fit an N×N pixel image: This image is a valid output example for N = 946. In ...
23
votes
5answers
1k views

Seamless conversion from square to hexagon

For many games played on a grid, hexagons are the Clearly Superior Choice™. Unfortunately, many free game art sites only have seamless tile sets for square maps. On a past project, I used some of ...
15
votes
3answers
405 views

Regular Polygrams

Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular polygram....
26
votes
11answers
2k views

Graph Florets of a Flower

Take a look at this chamomile flower: Pretty, isn't it? Well, what if I told you that this wasn't actually one flower? A lot of flowers (including sunflowers, chamomiles, daisies and others) ...
20
votes
1answer
513 views

Generating Picture Mazes

Challenge Write a program/function that accepts an "image" and outputs a picture maze formed from that image. Input Your program should accept two arguments: I, the image to form the maze from S, ...
5
votes
2answers
397 views

3-D Antiferromagnetism

A while ago, we had a challenge related to antiferromagnetism (AF) in two dimensions. Now, on a 2-d square lattice, antiferromagnetic is antiferromagnetic, and that is all there is to it. Moving to ...