Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 2.57 KB

File metadata and controls

39 lines (32 loc) · 2.57 KB

Overview

I built a function plotter in Java featuring a custom parser for infix and reverse polish notation (RPN), AST-based evaluation, and symbolic differentiation. Includes support for common mathematical functions, parameters, and graph visualization. It is built using LiveViewProgramming for interactive browser-based output.
📌 Credits to D. Herzberg's LiveViewProgramming for providing the Java-based live coding environment.

Execution Guide for LVP with the Code

Steps:

  1. Install at least JDK-24.
  2. Extract the ZIP archive into a folder of your choice.
  3. Open this folder in an IDE of your choice (e.g., Visual Studio Code) and navigate to the src directory.
  4. Open a new terminal (inside your IDE) and run the following command: java -jar lvp-0.5.4.jar --log --watch=funktionsplotter.java
  5. LVP will start with funktionsplotter.java and can be accessed at: http://localhost:50001/

Modifications to LVP:
Only the Turtle.java from LiveViewProgramming was reused and extended with a few additional methods to simplify and improve usability. The original Turtle implementation from the JAR file (lvp-0.5.4.jar) is not used in this project.

Extensions:

  1. Input and visualization of multiple functions with distinct colors
  2. Support for functions with a parameter a, allowing multiple parameter values to be displayed simultaneously
  3. Derivation of functions

Important Note: The archive contains important files:
1. funktionsplotter.java --> The Java program for the function plotter
2. lvp-0.5.4.jar --> The JAR file for LVP
3. Turtle.java --> Self-developed extended Turtle with 3 additional methods, used instead of the Turtle from the JAR file (lvp-0.5.4.jar)
4. README.md --> Information about how to run the program

When executing, make sure all files are present and you are in the correct directory!

Alternative: Docker

  1. Install Docker on your computer.
  2. Open a terminal and navigate to the folder where the Dockerfile is located.
  3. Run the following command to build the Docker image:
    docker build -t funktionsplotter.java .
  4. Once the image is built, you can start the container with the following command:
    docker run -d -p 50001:50001 funktionsplotter.java
  5. LVP will start with funktionsplotter.java and can be accessed at: http://localhost:50001/