Graph Visualizer is a Java Swing-based application for visualizing mathematical graphs. Users can input mathematical expressions, and the application will render the corresponding graph.
- Input mathematical expressions to render their corresponding graphs.
- Supports various mathematical functions and constants.
- Java Development Kit (JDK) 18
- Maven 3.6+
-
Clone the repository:
git clone https://github.com/entity-destroyed/Graph-Visualizer-Swing.git cd graph-visualizer-swing -
Build the project using Maven:
mvn clean install
-
Run the application:
java -jar target/Graph_Visualizer_Swing-1.0-SNAPSHOT.jar
- Launch the application.
- Choose an option: New empty pane, or Load previous.
- If you have chosen New empty pane, now click Add new.
- Enter a mathematical expression in the input field (e.g.,
sin(x),x^2 + 3*x - 2). - Hit enter to visualize the graph.
Configuration options are defined in the config.properties file. Here are the adjustable parameters:
g.step: The step interval for graph calculations (e.g.,0.1).g.scale: The scale factor for rendering the graph (e.g.,10).g.begin: The starting value of the range (e.g.,-50).g.end: The ending value of the range (e.g.,50).
Example config.properties:
g.step=0.1
g.scale=10
g.begin=-50
g.end=50The project uses the following dependencies:
-
Clone the repository and navigate to the project directory.
-
Build the project:
mvn clean install
-
Run tests:
mvn test
src/main/java/com/graphVisualizer: Main application source code.src/test/java/com/graphVisualizer: Test cases.pom.xml: Project Object Model file containing project dependencies and build configurations.
Contributions are welcome! Please follow these steps to contribute:
-
Fork the repository on GitHub.
-
Clone your fork:
git clone https://github.com/yourusername/graph-visualizer-swing.git cd graph-visualizer-swing -
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Make your changes and commit them with descriptive messages.
-
Push your changes:
git push origin feature/your-feature-name
-
Create a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for more details.