Skip to content

This project is a graphical calculator application built using Python and the Tkinter library. It allows users to input mathematical equations and visualize them in both 2D and 3D plots. The application leverages several powerful libraries, including SymPy for symbolic mathematics and Matplotlib for plotting.

License

Notifications You must be signed in to change notification settings

fzlzjerry/graphing_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Advanced Graphing Calculator

Python Version License PRs Welcome

A powerful mathematical visualization tool crafted for educators and students. Transform complex mathematical expressions into interactive, dynamic graphs.

Getting Started β€’ Key Features β€’ Examples β€’ Documentation β€’ Contributing

Graphing Calculator Interface


🌟 Overview

Advanced Graphing Calculator is a sophisticated mathematical visualization tool that brings complex functions to life. Perfect for:

  • πŸ“š Students: Exploring mathematical concepts
  • πŸŽ“ Educators: Demonstrating function behaviors
  • πŸ”¬ Researchers: Analyzing mathematical relationships
  • πŸ’‘ Enthusiasts: Anyone interested in mathematical visualization

πŸ“š Table of Contents

  1. Overview
  2. Getting Started
  3. Usage Instructions
  4. Key Features
  5. Examples
  6. Important Notes
  7. Frequently Asked Questions
  8. Contributing
  9. License
  10. Contact Us

πŸš€ Getting Started

System Requirements

  • Python 3.9+
  • pip package manager

Installation

Install the required Python libraries using the following command:

pip install PyQt6 requests semver sympy numpy matplotlib

Running the Application

  1. Save the graphing_calculator.py file to your local machine.

  2. Open a terminal or command prompt and navigate to the directory containing the file.

  3. Run the following command to start the application:

    python graphing_calculator.py

Usage Instructions

Entering Expressions

  • In the "Enter 2D equations" input field, enter one or more 2D expressions.
  • Input only expressions, not equations. For example, enter sin(x) x^2 |x| to plot sin(x), xΒ², and |x|.
  • Use spaces to separate multiple expressions. Spaces are used to distinguish different formulas.

Plotting Graphs

  • After entering the expressions, click the "Plot 2D Graphs" button.
  • The application will plot the corresponding graphs and calculate various function properties.
  • Results will be displayed in the text browser below the plot.

Interactive Operations

  • Zooming: Use the mouse wheel to zoom in and out of the graph. Hold the Ctrl key and scroll the mouse wheel for precise zooming.
  • Panning: Press and hold the middle mouse button (scroll wheel) and drag to pan the graph.
  • View Intersections: Click on the intersection points in the graph to display their coordinates and corresponding equations.

✨ Key Features

Function Plotting

  • Multi-Function Plotting: Visualize multiple functions simultaneously
  • Interactive Graphs: Real-time zoom, pan, and point analysis
  • Smart Annotations: Automatic labeling of key points and intersections

Mathematical Analysis

Feature Description
🎯 Zero Points Automatically finds x-intercepts
πŸ“Š Derivatives Calculates first and second derivatives
🌟 Critical Points Identifies extrema and inflection points
🌐 Domain & Range Determines function boundaries
πŸ“‰ Asymptotes Locates horizontal and vertical asymptotes
⚠️ Discontinuities Identifies points of discontinuity

Interactive Controls

Control Action Description
Mouse Wheel Zoom Scroll to zoom in/out
Ctrl + Wheel Precise Zoom Fine-grained zoom control
Middle Mouse Pan Click and drag to move view
Left Click Point Analysis Shows coordinates and function details
Grid Toggle Show/Hide Grid Toggle grid visibility
Dark Mode Theme Switch Changes interface theme
Custom Ranges Set View Bounds Enter custom x/y axis limits

Data Management

Feature Format Description
Save Equations Text file (.txt) Save current function set
Load Equations Text file (.txt) Load saved function set
Export Graph PNG/SVG Export graph as image
Function Templates Built-in Quick access to common functions

Supported Functions

Category Functions Examples
Arithmetic +, -, *, /, ^ x^2 + 2*x
Trigonometric sin, cos, tan, sec, csc, cot sin(x) * cos(x)
Inverse Trig asin, acos, atan asin(x/2)
Hyperbolic sinh, cosh, tanh sinh(x)
Exponential exp, ln, log exp(-x^2)
Special Abs, factorial, gamma `
Bessel jn, yn jn(0,x)

Examples

Example 1: Plotting Simple Functions

Input:

sin(x) x^2

Outcome:

  • Plots the sine function and the quadratic function on the same graph.
  • Displays the intersection points, zeros, derivatives, and other properties for both functions.

Example 2: Including Absolute Value Function

Input:

|x| x^3-3x

Outcome:

  • Plots the absolute value function and the cubic function.
  • Automatically handles absolute value notation and calculates relevant function properties.

Important Notes

  • Avoid Using Dark Mode: Do not use dark mode on Windows systems to ensure proper display of the interface and graphs.
  • Input Format:
    • Do Not Insert Spaces Within Expressions: Spaces are used to separate different expressions. Do not include spaces within a single expression.
    • Input Only Expressions: Enter only the mathematical expression without an equals sign. For example, use x^2 instead of y = x^2.
    • Separate Multiple Expressions with Spaces: To plot multiple functions, separate each expression with a space, such as sin(x) cos(x).

Frequently Asked Questions (FAQs)

Q1: How do I input absolute value functions?

A1: Use the pipe symbol | to denote absolute values. For example, |x| will be automatically converted to Abs(x) for processing.

Q2: What happens if I enter an invalid expression?

A2: The application will display an error message in the results browser, prompting you to check and correct your input expressions.

Q3: How can I view the derivatives and other properties of a function?

A3: After plotting the graphs, the results browser will automatically list the first and second derivatives, domain, asymptotes, and other detailed properties for each function.

Contributing

Contributions are welcome! If you have suggestions or want to contribute code, please submit an Issue or Pull Request on the GitHub repository.

License

This project is licensed under the GNU Affero General Public License v3.0 License. See the LICENSE file for details.

Contact Us

If you have any questions or suggestions, please reach out to us:

About

This project is a graphical calculator application built using Python and the Tkinter library. It allows users to input mathematical equations and visualize them in both 2D and 3D plots. The application leverages several powerful libraries, including SymPy for symbolic mathematics and Matplotlib for plotting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages