Tag Archives: ellipse

Select a conic section in C#

This example shows how you can let the user click five points to select a conic section. Recall that the equation for a conic section is: If you know the coordinates of some points on a conic section, then you … Continue reading

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

Draw a conic section from its polynomial equation in C#

This example shows how to draw a conic section from its polynomial equation. A previous series of posts explained how to find the intersection between two ellipses. See these posts for more information about that: See where two ellipses intersect … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , | 4 Comments

See where two ellipses intersect in C#, Part 4

This post explains why Newton’s method may not be the best way to find the roots of the difference equations used to see where two ellipses intersect. The final step in finding the points of intersection between two ellipses (or … Continue reading

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

See where two ellipses intersect in C#, Part 3

This post summarizes the method you can use to see where two ellipses intersect. (Or any two conic sections, for that matter.) It also explains the example program. To find the points of intersection: Get the equations for the ellipses. … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , | 1 Comment

See where two ellipses intersect in C#, Part 2

This post shows The Ugly Math that you can use to see where two ellipses intersect. Brace yourself! Here it comes! First recall the quadratic formula. If ax2 + bx + c = 0, then: Now consider the formula for … Continue reading

Posted in algorithms, geometry, mathematics | Tagged , , , , , , , , , , | 1 Comment

See where two ellipses intersect in C#, Part 1

This example shows how you can see where two ellipses intersect. Surprisingly, some of the most popular posts on the C# Helper web site are not about C# itself. Instead they are about geometry. I decided to add to this … Continue reading

Posted in algorithms, geometry, mathematics | Tagged , , , , , , , , , , | 3 Comments

Calculate the formula for an ellipse selected by the user in C#

This is example is very similar to Calculate the formula for a circle selected by the user in C# except it shows how to calculate the formula for an ellipse instead of a circle. See that post or download the … Continue reading

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

Let the user move the center point of an elliptical gradient in C#

The example Fill an area with an elliptical gradient in C# shows how to make a brush that fills an area with an elliptical gradient. This example just lets the user move the gradient’s center point. When you move the … Continue reading

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

Fill an area with an elliptical gradient in C#

Filling an area with an elliptical gradient is non-trivial in a Windows Forms application because the .NET Framework libraries intended for use with Windows Forms don’t include a RadialGradientBrush class. There is such a class in the System.Windows.Media namespace, but … Continue reading

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