Tag Archives: graphics

Tile a board with colored trominoes in C#

The post Tile a board with trominoes in C# explains how to tile a board with a missing square with trominoes. This post shows how to color the trominoes so no two adjacent ones share the same color. The four-color … Continue reading

Posted in algorithms, drawing, graphics, mathematics, recursion | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Tile a board with trominoes in C#

Trominoes are polyominoes of order three. That means they are polygons made up of three equal sized squares joined at their edges. There only are two kinds of trominoes: three squares joined in a line and three squares joined in … Continue reading

Posted in algorithms, drawing, graphics, mathematics, recursion | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

Draw text wrapped to fit columns in C#

The post Draw aligned columns of data in C# shows one way to draw text in rows and columns. It uses the Graphics class’s MeasureString method to size the columns so they are big enough to display their data without … Continue reading

Posted in fonts, graphics, lists | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Draw a randomly colored Sierpinski pentagon in C#

The example Draw a colored Sierpinski pentagon in C# lets the user click on the parts of a Sierpinski pentagon to change their colors. Eddie Bole thought it would be interesting to color the larger pentagons in addition to the … Continue reading

Posted in drawing, fractals, graphics, recursion | Tagged , , , , , , , , , , | Leave a comment

Draw a colored Sierpinski pentagon in C#

The example Draw a Sierpinski pentagon in C# shows how to draw a Sierpinski pentagon. This example modifies that one so the user can click on pentagons to change their colors. To do that, this program takes a very different … Continue reading

Posted in drawing, fractals, graphics, recursion | Tagged , , , , , , , , , , | 5 Comments

Use label controls to draw a simple labeled histogram in C#

The example Draw a simple labeled histogram in C# draws a labeled histogram on a PictureBox in that control’s Paint event handler. It does a fair amount of work to ensure that the histogram’s bars are in their proper positions … Continue reading

Posted in drawing, graphics, mathematics | Tagged , , , , , , , , , , , | Leave a comment

Draw a simple labeled histogram in C#

The example Make a simple histogram in C# shows how to draw a simple histogram on a PictureBox. This example adds Label controls above the histogram’s bars. When the program loads, it uses the following code to generate some random … Continue reading

Posted in drawing, graphics, mathematics | Tagged , , , , , , , , , , | 1 Comment

Encode and decode Futurama’s alienese in C#

My last two posts explained a program can pull out pieces of an image. In those examples, the image was a collection of glyphs and the program saved the individual glyphs in png files. This post uses the glyphs to … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , | Leave a comment

Separate glyphs in an image in C#, Part 2

This is the second post describing the program that I wrote to separate glyphs in a combined image. The first post explained the program’s menus. This post explains how the program manages its red glyph selection rectangle. This post describes … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , | Leave a comment

Separate glyphs in an image in C#, Part 1

I’m working on a program to translate to and from Futurama’s alienese alphabet. Before I do that, I wrote this program to separate glyphs stored in an image that contains the alphabet. It’s a fairly full-featured program, so I’ll describe … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , | 1 Comment