Category Archives: algorithms

Make an Apollonian gasket filled with images in C#

This example shows how to draw an Apollonian gasket filled with images of a cat. (I promise that this will be my last cat fractal for a while, although I may have one other cat image post coming up. ;-)) … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , | 2 Comments

See which section is under the mouse in a sunburst chart in C#

My earlier post Make a sunburst chart in C#, Part 4 shows how you can draw a sunburst chart. This example shows how you can tell which section the mouse is over when you move the mouse over the chart. … Continue reading

Posted in algorithms, drawing, graphics | Tagged , , , , , , , , , , , | 3 Comments

Flow words around drop caps in C#

The example Flow blocks around obstacles for document layout in C# implements a document layout algorithm that flows blocks around obstacles. Moving from there to flowing words around obstacles is relatively simple. The following sections describe the main places where … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | 2 Comments

Flow words around obstacles for document layout in C#

The example Flow blocks around obstacles for document layout in C# implements a document layout algorithm that flows blocks around obstacles. Moving from there to flowing words around obstacles is relatively simple. The following sections describe the two main places … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | Leave a comment

Flow blocks around obstacles for document layout in C#

The following two document layout examples draw “illuminated” text by using an initial or drop cap. Draw different styles of “illuminated” text in C# Draw “illuminated” text in C# Martin asked how we could do something similar when the text … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | 2 Comments

Give an image an improved transparent background in C#

This example lets you make some pixels in an image part of a transparent background. Use the File menu to open an image file. When you click on the original image on the left, the program converts pixels that have … Continue reading

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

Find hexes a certain distance from a target hex in C#

My post Draw a hexagonal grid in C# shows how you can draw a grid made up of hexagons. This post shows how you can find the hexes that are a given distance N from a target hex. Basic Idea … Continue reading

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

New Book: Essential Algorithms, Second Edition: A Practical Approach to Computer Algorithms Using Python and C#

I’m happy to announce my latest book, Essential Algorithms, Second Edition: A Practical Approach to Computer Algorithms Using Python and C#. This is a greatly revised and expanded version of the popular first edition. Here are some links that you … Continue reading

Posted in algorithms, books | Tagged , , , , , , , , | 1 Comment

Graph equations while preserving aspect ratio in WPF and C#

The previous example, Graph equations entered by the user in WPF and C# shows how to graph an equation entered by the user. The user must also enter the coordinate bounds that the program should use. For example, in the … Continue reading

Posted in algorithms, drawing, graphics, mathematics, reflection, wpf | Tagged , , , , , , , , , , , , , , | 2 Comments

WPF 3d: Three-Dimensional Graphics with WPF and C#

If you haven’t checked out my book, WPF 3d: Three-Dimensional Graphics with WPF and C#, please take a quick look either on my web page or on Amazon. If you have a copy of the book, please post a review! … Continue reading

Posted in 3D, 3D graphics, algorithms, books, graphics, wpf | Tagged , , , , , , , , , , | 5 Comments