Category Archives: algorithms

Pingback: Code Project post “Orbital Mechanics Introduction, Part 2”

The Code Project post Orbital Mechanics Introduction, Part 2 by charles922 uses some code from my WPF 3D posts. His program lets you experiment with the following orbital parameters: Eccentricity – the eccentricity of the orbit’s ellipse. Inclination – the … Continue reading

Posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , | Leave a comment

Winners of the book drawing

Congratulations to the following winners of the book drawing for copies of The Modern C# Challenge. Josh Williams Tony Ropson Richard Moss Mark Williamson William Cruz Stephen Igor Kuzmishov Paolo Mike Griffiths Francisco Javier L√≥pez Manzano If you didn’t win, … Continue reading

Posted in algorithms, books | Tagged , , , , , , , , | Leave a comment

Why you should study algorithms (plus a free book drawing)

There are several reasons why you should study algorithms. I’m going to talk about four of them. (If you want to skip to the bottom, you can read about the drawing I’m having in the next few days for one … Continue reading

Posted in 3D graphics, algorithms, books, graphics | Tagged , , , , , , , , , | Leave a comment

Book Drawing: The Modern C# Challenge

I’m holding a drawing for 10 copies of my latest book, The Modern C# Challenge. Here’s the short blurb about this book. The Modern C# Challenge Become an expert C# programmer by solving interesting programming problems This book includes 100 … Continue reading

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

Draw a randomly colored Sierpinski octagon in C#

This example draws a randomly colored Sierpinski octagon. It’s basically the same as the example Draw a randomly colored Sierpinski pentagon in C# except it draws an octagon instead of a pentagon. See that example for most of the details. … Continue reading

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

Gary Beene’s gbUnSnarl game

Check out Gary Bene’s gbUnSnarl game. Your job is to drag the nodes in a network to unsnarl it. Basically it asks you to find a way to rearrange a planar network so none of its edges intersect. Algorithms to … Continue reading

Posted in algorithms, games | Tagged , , , , , , , , | Leave a comment

Find happy numbers in C#

Before I show you the code, let me explain what happy numbers are. Happy Numbers To find happy numbers, start with any integer. Replace it with the sum of the squares off its digits. Repeat the process until the numbers … Continue reading

Posted in algorithms, mathematics | Tagged , , , , , , , | Leave a comment

Draw words on a circle in WPF and C#

This example shows one way that you can draw words on a circle in WPF. Note that it does not show how to draw words where each character is rotated to follow the circle’s curve. Each word is rotated as … Continue reading

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

Draw a hyperbolic spiral in C#

A hyperbolic spiral, which is also called an reciprocal spiral, is the inverse of an Archimedes spiral. It uses the equation r = A / θ to generate points on a spiral. This spiral has a couple of interesting properties. … Continue reading

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

Draw a logarithmic spiral in C#

The post Draw an Archimedes spiral in C# uses the equation r = A˙θ to generate the points on a spiral. This example is almost exactly the same except it uses the equation to r = A˙eB˙θ to generate its … Continue reading

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