Category Archives: drawing

Book Discussion Page: WPF 3d

This is a discussion page for my book WPF 3D, Three-Dimensional Graphics with WPF and C#. Please post questions, thoughts, and suggestions here in the “Leave a Reply” box at the bottom of the page. I will moderate posts and … Continue reading

Posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, Uncategorized, wpf, XAML | Tagged , , , , , , , , , , , , , , | 3 Comments

WPF 3d: Table of Contents

This is a brief summary of the table of contents for my book WPF 3D, Three-Dimensional Graphics with WPF and C#. Contents Introduction Part I. Getting Started Chapter 1. XAML Example Chapter 2. C# Example Chapter 3. Coordinates Chapter 4. … Continue reading

Posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , | 3 Comments

Graph a square curve in C#

This example shows how to graph a curve that draws a square. The basic idea isn’t as bizarre as you might think. You probably know that x2 + y2 = 1 is the equation for a circle. So what is … Continue reading

Posted in algorithms, drawing, mathematics | Tagged , , , , , , , , , , , | 4 Comments

Map device coordinates to world coordinates in C#

Sometimes it’s convenient to draw in one coordinate system (called world coordinates) and map those coordinates to the screen’s device coordinates. The example Map points between coordinate systems in C# shows how to do this in C#. For example, the … Continue reading

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

Display tooltips on a graph of an equation entered by the user in C#

This example draws a graph of an equation entered by the user and the displays a tooltip on it when you move the mouse over the graph. See the post Graph equations entered by the user in C# for information … Continue reading

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

Draw a picture-filled histogram in C#

The example Make a simple histogram in C# shows how to draw a histogram. This example shows how to fill the histogram’s bars with pictures. The following TileRectangle method fills a rectangle with an image. // Tile an area from … Continue reading

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

Tile a PictureBox in C#

If you set a form’s BackgroundImageLayout property Tile, then the control fills itself with copies of its background image. Strangely the PictureBox control does not have a corresponding Tile property. This example shows one way you can tile images on … Continue reading

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

Draw the Weierstrass function in C#

The Weierstrass function was discovered by Karl Weierstrass in 1872. It’s an odd function that is continuous everywhere but differentiable nowhere. I’ll explain what that means shortly. Here’s the function: Here: The following two sections explain what it means to … Continue reading

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

Recursively draw equations in C#

The basic idea for recursively drawing equations is simple. Well, sort of simple. Classes represent different kinds of equations. A particular class knows how to draw its kind of equation. It uses other classes to draw its pieces. For example, … Continue reading

Posted in algorithms, drawing, fonts, graphics, recursion | Tagged , , , , , , , , , , , | 2 Comments

Calculate where a line segment and an ellipse intersect in C#

Finding the intersection between a line segment and an ellipse requires a lot of mathematics. It’s not particularly hard mathematics, but if you’d rather skip it, you can use the following links to jump to the other parts of this … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , | 5 Comments