A graphing calculator application that allows users to input mathematical expressions and visualize their corresponding graphs. This tool supports a variety of expressions, including basic arithmetic operations and trigonometric functions like sin
, cos
, tan
, csc
, cot
, and sec
.
The Graphing Calculator provides an intuitive interface to analyze mathematical functions visually. Users can input expressions, view their graphical representations, and interact with the graph by moving or zooming in/out. The sidebar also displays a history of expressions entered.
- Expression Input: Type and evaluate expressions with trigonometric functions and arithmetic operators.
- Graph Navigation: Move the graph left, right, up, and down, or zoom in and out for detailed analysis.
- Expression History: View a list of previous expressions in the sidebar for reference.
- Supported Functions: Graph basic expressions like
x^2 + y = 0
or trigonometric expressions likecos(x^3) + 10sin(y)
.
The Graphing Calculator uses the SFML (Simple and Fast Multimedia Library) for graphics rendering.
-
Download: Download the SFML package from SFML Downloads.
-
Link Libraries: Link the following SFML libraries to your project:
sfml-graphics
sfml-window
sfml-system
-
Tutorials: Follow the official SFML tutorials to set up SFML for your preferred development environment.
-
Run:
- Navigate to the
bin
folder containing the compiled executable and required SFML files. - Launch the Graphing Calculator executable.
- Navigate to the
-
Keyboard Commands:
[Up]
: Move the graph up.[Down]
: Move the graph down.[Left]
: Move the graph left.[Right]
: Move the graph right.[Space]
: Start typing a new expression.[Enter]
: Submit the expression for evaluation.[Q]
: Exit the application.[I]
: Zoom in.[O]
: Zoom out.[R]
: Reset the graph to the default view.
-
Screenshots:
- Focus on Data Structures: This project emphasizes creating and demonstrating custom-built data structures like lists, stacks, and queues.
- Shunting Yard Algorithm: Utilizes the shunting yard algorithm and tokenization for accurate expression parsing and evaluation.
- Modular Structure: Uses a modular structure with separate files for different functionalities like input parsing, graph drawing, and shunting-yard evaluation.
- Maintainability: Refactored to include reusable data structures and utility functions for improved maintainability.
This project uses SFML, which is licensed under the zlib/png license. A copy of the license can be found in the file SFML_LICENSE
.