Tag Archives: graph equation

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

Graph equations entered by the user in C#

This example draws a graph of an equation entered by the user by combining techniques from the following two posts: Evaluate numeric expressions that are entered by the user in C# Graph an equation in C# This example uses techniques … Continue reading

Posted in algorithms, drawing, graphics, mathematics, reflection | Tagged , , , , , , , , , , , | 6 Comments

Graph an equation in C#

This example uses the the following MakeGraph method to draw the graph. // Make the graph. private void MakeGraph() { // The bounds to draw. float xmin = -3; float xmax = 3; float ymin = -3; float ymax = … Continue reading

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

Plot functions in C#, Part 3

This is the third example that shows how to plot functions that draw hearts. This time the function is: The following examples also draw heart-shaped functions. See the first for an explanation of how the programs work. Plot a heart-shaped … Continue reading

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

Plot functions in C#

This example shows how to plot functions. This example plots a function that represents a heart shape. The earlier example Plot a heart-shaped function in C# shows how to draw a relatively complex heart-shaped function. Recently I saw a much … Continue reading

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

See where two conic sections intersect in C#

This example uses techniques demonstrated in several earlier posts to let you see where two conic sections intersect. To use the example, click the left mouse button five times each to select one conic section> Then click the right mouse … Continue reading

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

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

Pass a method to another method in C#

This example shows how you can use delegates to pass a method to another method. The example Plot an equation containing two variables in C# shows how to draw a graph of a function even if you don’t really understand … Continue reading

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

Plot an equation containing two variables in C#

This example shows one way you can plot an equation containing two variables with the format F(x, y) = 0. Some equations, such as y = 3 × x + 5, are easy to graph. Others are much harder. For … Continue reading

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