Skip to content

A project I made for a C++ class in June 2019. Parse and plot any polynomial or trigonometric polynomial in the console.

License

Notifications You must be signed in to change notification settings

charon25/ConsoleCurvePlotter

Repository files navigation

C++ Console Curve Plotter

This project was made for a C++ class between January and June of 2019. The program is able to plot every polynomial or trigonometric function on a specified interval. The function should have one of the following format :

  • a
  • ax
  • xn
  • axn
  • P
  • cos(P)
  • sin(P)
  • a ∗ cos(P)
  • ax ∗ cos(P)
  • xn ∗ cos(P)
  • axn ∗ cos(P)

Where a is a real number, n is a positive integer and P is a polynomial.

It will also print approximation of roots on the interval.

Examples

Plot of x<sup>2</sup>-2

This one is the plot of the function f(x) = x2 - 2 between -3 and 3. You can also see the approximation of the roots √2 and -√2.

Plot of cos(x)

This one is the plot of the function f(x) = cos(x) between -2π and 2π. You can also see the approximation of the roots -3π/2, -π/2, π/2 and 3π/2.

Plot of x<sup>3</sup>-4x<sup>2</sup>

This one is the plot of the function f(x) = x3 - 4x2 between -1 and 5.

About

A project I made for a C++ class in June 2019. Parse and plot any polynomial or trigonometric polynomial in the console.

Topics

Resources

License

Stars

Watchers

Forks

Languages