Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [graphical-output]

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].

6
votes
11answers
389 views

Draw a times table (also called modular multiplication circle) of a number \$n\$ with \$k\$ vertices

Not to be confused with this question. You need to draw a times table (also known as Cremona's method for cardioid generation) as shown in this video. The number \$n\$ and \$k\$ will be the inputs. ...
32
votes
8answers
762 views

Can square tree rings be generated from primes?

Apparently yes! In three easy steps. Step 1 Let f(n) denote the prime-counting function (number of primes less than or equal to n). Define the integer sequence s(n) as follows. For each positive ...
18
votes
2answers
878 views

Implement the Boids algorithm

Introduction The Boids Algorithm is a relatively simple demonstration of emergent behavior in a group. It has three main rules, as described by its creator, Craig Reynolds: The basic flocking ...
37
votes
26answers
10k views

Happy Birthday, Finland!

Introduction As is known, in 2017, Finland celebrates its 100 years of independence. To mark the occasion, it is your job to produce a Finnish flag for everyone's enjoyment. Challenge Create a ...
0
votes
0answers
91 views

Large size letter [duplicate]

Convert a letter(you can choose upper or lower) into a picture, which only consist of '.' and '#' (or any two reasonable char), ...
14
votes
6answers
1k views

How to code colors in hex

Hexagonal tessellations, or tilings of the plane, are three-colorable -- meaning that using only three colors, such as Red, Blue, and Green, every hexagon can be colored without any two hexagons that ...
-2
votes
1answer
212 views

Drawing a square with an 'x' inside [closed]

Task: Make a program that draws the following figure line by line. Your program should wait for one-second after drawing each line(it can be longer, just has to be a noticeable difference) . Your ...
11
votes
11answers
855 views

Generate a special period image

Construct a program or function that takes input in form of <width>, <height>, <color1>, <color2> and generates an output such that first ...
13
votes
7answers
666 views

Little Boxes on the Hillside

There's a satirical song called Little Boxes, originally by Malvina Reynolds, about suburban sprawl that has lyrics as follows: Little boxes on the hillside, Little boxes made of ticky-tacky, ...
2
votes
1answer
227 views

Application screen shot [closed]

Write the minimal code you need to take a screenshot of your application window. I am not asking for a function or program; just only a code segment. It has obviously to be a GUI application; console ...
46
votes
49answers
11k views

Draw the Swiss Flag

Task: Output the Swiss flag. Happy Swiss National Day / Schweizer Bundesfeiertag / Fête nationale suisse / Festa nazionale svizzera / Fiasta naziunala svizra! Details: The flag consists of a white ...
21
votes
14answers
2k views

The Chroma Key to Success

The RGB color value #00FF00 is a rather important one: it is used to make movies, TV shows, weather announcements, and more. It is the famous "TV green" or "green ...
4
votes
2answers
308 views

Sandbox Visualization Module Emulator

The Zachtronics game TIS-100 contains a graphics display called the visualization module. I could try and explain the specs of this module, but the game's manual will do a better job: (As you may ...
30
votes
4answers
691 views

A Dog on a Chain

I'm looking out of my attic window into my neighbor's yard. They have a dog chained to a post in the center of the yard. The dog runs around the yard but is always on the end of its chain, so it ...
36
votes
14answers
4k views

Let's draw Mona Lisa

In 2014, demoscener Jakub 'Ilmenit' Debski released a 250-byte(1) procedural graphics demo for the Atari XL called Mona. It's drawing the following picture(2): Your task is to generate the exact same ...
26
votes
19answers
3k views

Draw A Reuleaux Triangle!

The Reuleaux triangle is the shape formed by the intersection of three circles, with each circle passing through the others' centers. Regardless of rotation, a Reuleaux triangle's width will always ...
40
votes
42answers
5k views

Display random colored pixels

I've always liked screens full of randomly colored pixels. They're interesting to look at and the programs that draw them are fun to watch. The challenge Fill your screen, or a graphical window, ...
50
votes
45answers
11k views

Display the Hacker Logo

You may have heard of the "Hacker Logo", also called the "Hacker Emblem". It looks like this: This is a pattern from a mathematical simulation called the Game of Life. The glider is the simplest Life ...
21
votes
7answers
1k views

The strange attraction of the logistic map

The purpose of the challenge is to approximately plot the attractor of the logistic map as a function of its parameter r (also called bifurcation diagram), or a subregion of it. The appearance of the ...
1
vote
2answers
506 views

Print your system's logo [closed]

This is a throwback challenge. You will choose an old computer system and an old language created for that system. The challenge Pick an old computer system that was made before the year 2000. In a ...
10
votes
5answers
2k views

Plot the Gaussian Distribution in 3D

In probability theory, the normal (or Gaussian) distribution is a very common continuous probability distribution. Normal distributions are important in statistics and are often used in the natural ...
10
votes
4answers
316 views

X marks the spot – a print job

Given two numbers, print a page with an "X" in the specified location (±10%). The numbers must be either percentages or fractions of the page's print area dimensions, e.g. ...
5
votes
0answers
191 views

Filling space with pursuit polygons [closed]

Make a program which can fill a 2D space with "pursuit polygons". The following picture will help you understand better what I mean. You can also look up "pursuit curves" or mice problem or watch ...
13
votes
10answers
573 views

Easier communication means… ○ circular edition!

Based on this, but I was asked[​1​],[​2​] to do a graphical edition. Task Generate a circular display of the text ...
23
votes
3answers
666 views

The Image of the Dragon

I saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.      &...
50
votes
25answers
6k views

Create a Paint program!

Introduction One day, you were showing your kid how to draw on a computer. You type mspaint.exe in the run bar. To your horror, it says "No items match your search"...
31
votes
19answers
5k views

Draw a graph of \$y=(-n)^x\$

Challenge Given an input of an integer, \$n\$ (where \$0<n<50\$), output the graph of \$y=\mathrm{Re}((-n)^x)\$ from \$x = -3\$ to \$x = 3\$ inclusive. Where \$\mathrm{Re}(p)\$ is the real ...
21
votes
16answers
3k views

Extract an RGB channel of an image

Given an image, either as input (possibly in RGB triplets) or with the filename as input (you may assume the image has a specific filename, possibly without an extension), output an image representing ...
2
votes
0answers
204 views

Pie of pi pies (Pie day 2017) [closed]

In honor of national pi day, create a program that, when given an integer, n, as input, will create a circular "pie" constructed of these smaller pies: Your ...
22
votes
10answers
2k views

Two-Coloring Overlapping Circles

Write a program or function that takes in the following input in a reasonable format of your choice: Two positive integers W and H that define the width and height of the image you'll be generating. ...
18
votes
8answers
1k views

Penrose Triangle Codegolf

The Penrose triangle, also known as the Penrose tribar, or the impossible tribar, is an impossible object. The goal in this challenge is to display a Penrose triangle in the fewest bytes possible. ...
6
votes
1answer
337 views

Wild MISSINGNO appeared! [closed]

I think is about time to do another Pokemon challenge! Even if Pokémon Go is not as mainstream as it used to be... The task. Just draw a MISSINGNO. MISSINGNO is an unofficial Pokémon species found ...
46
votes
15answers
7k views

Attack, Decay, Sustain, Release

Sound synthesizers use envelope generators to control how certain parameters of the sound (such as overall loudness) change with time. In many synthesizers an envelope is defined by four parameters, ...
44
votes
18answers
8k views

Draw/plot a heart graph

Your challenge is to draw/plot one of the hearts below. The size must be at least 50x50 pixels (vector graphics is OK). You may choose which of the hearts you want to draw/plot. Axes, grid lines etc. ...
15
votes
9answers
702 views

Carpet an Airport

In 2015 the Portland International Airport began the replacement of their iconic carpet. I want you to write a program to draw their old carpet in as few bytes as possible. The carpet: ...
16
votes
1answer
798 views

Draw the Ingress glyphs

In the location-based AR mobile game way of life Ingress the player can hack things called portals in order to get items. (If you are interested in Ingress, you can ping me in chat for more info. ...
18
votes
3answers
791 views

Find the identity sandpile

This question is about abelian sandpiles. Read this previous challenge and watch this numberphile video to learn more. An abelian sandpile of size n by n is a grid containing the number 0, 1, 2 and 3 ...
28
votes
18answers
5k views

XOR two monochrome images

Challenge: Take input of two black and white (monochrome) images and xor each pixel of the first, with each pixel of the second, add them to a new image and output the new image. Some clarifications:...
33
votes
7answers
1k views

Draw Reutersvärd's Triangle

This impossible object is Reutersvärd's triangle: Draw your own version according to these rules: Exactly 9 cubes total Each side is made up of exactly 4 cubes The cubes appear to overlap such that ...
21
votes
8answers
2k views

Arnold's Cat Map

Challenge Given a colour raster image* with the same width and height, output the image transformed under Arnold's cat map. (*details see below) Definition Given the size of the image ...
33
votes
6answers
713 views

Generate a Padovan Spiral

Introduction Similar to the Fibonacci Sequence, the Padovan Sequence (OEIS A000931) is a sequence of numbers that is produced by adding previous terms in the sequence. The initial values are defined ...
1
vote
4answers
493 views

A challenge about colours [closed]

Above, you can see an image full of different colours. Click here for a hex-dump. One possible way to generate this image is by using a linear gradient rotated 90 degrees, however, this may not be ...
23
votes
1answer
324 views

It's factors all the way down!

This challenge is inspired by this fantastic animated diagram (thanks to flawr for posting it in chat). Given an input n, draw all of its prime factors as nested ...
17
votes
4answers
837 views

A 2D Traffic Jam

The Biham-Middleton-Levine traffic model is a self-organizing cellular automaton that models simplified traffic. It consists of a number of cars represented by points on a lattice with a random ...
21
votes
17answers
873 views

Random Pixel Poking

Your task is simple: write a program that will replace random pixels in a black 16px * 8px rectangle (width by height) with a white pixel. The holes must be uniformly random, and you should output ...
12
votes
4answers
2k views

Output subdivisions of international standard paper sizes

ISO Paper Sizes Defined: The A series paper sizes are defined by the following requirements: ...
33
votes
6answers
2k views

Plotting the Cornu spiral

The Cornu Spiral can be calculated using Feynman's method for path integrals of light propagation. We will approximate this integral using the following discretisation. Consider a mirror as in this ...
40
votes
7answers
4k views

Create a bad pixel

Your task is to write a program that makes your screen appear to have a bad pixel. You should choose exactly one pixel on the screen, and exactly one channel between red, green and blue, and make its ...
24
votes
1answer
789 views

A Rather Knotty Conundrum

Write a program to draw a 2-D diagram of a knot based on the knot's structure. A knot is exactly what it sounds like: a loop of rope that's tied up. In mathematics, a knot diagram shows where a piece ...
27
votes
2answers
532 views

Hilbertify an image

I like the Hilbert Curve. Your task for this challenge is to take an image (strictly a square image where all the sides are a power of two pixels wide) and unravel it line by line in a zig-zagging ...