Monthly Archives: December 2018

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

Let the user draw lines in C#

This example lets the user click and draw to draw lines. To make working with lines easier, the program uses the following Segment class. class Segment { public Pen Pen; public Point Point1, Point2; public Segment(Pen pen, Point point1, Point … Continue reading

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