Draw Function is an algorithm that draws a mathematical function y = x^2 - 4 and calculates its zeros using three different algorithms: bisection, tangent and secant. The algorithm uses a Windows Form with a picture box, where the function is drawn, and some labels and buttons, where the user can input the values of xA, xB and epsilon and see the results of each algorithm. The algorithm also uses a timer to update the graph of the function and two buttons to zoom in and out.
The algorithm is written in C#, an object-oriented and cross-platform programming language. To run the algorithm, you need to have the .NET Framework or the .NET Core installed on your system. Moreover, you need to have an IDE or a text editor that supports the C# language, such as Visual Studio, Visual Studio Code or MonoDevelop.
To use the algorithm, follow these steps:
- Clone or download the GitHub repository of the project.
- Open the file Form1.cs with your IDE or text editor.
- Compile and run the code.
- The algorithm will show a Windows Form with a picture box, some labels and buttons.
- Enter the values of xA, xB and epsilon in the corresponding text boxes and click the “Zeri” button to calculate the zeros of the function using the three algorithms. The results will be shown in the labels below the text boxes.
- Click the “Disegna” button to draw the graph of the function on the picture box. You can zoom in and out the graph by clicking the “+” and “-” buttons.
The algorithm is distributed under the MIT license, which allows the use, modification and distribution of the code to anyone, as long as the same license is maintained and the authorship of the original author is recognized. The algorithm is based on the concept of numerical methods, which are techniques to find approximate solutions to mathematical problems that cannot be solved analytically.