A simple Java project for performing basic vector operations such as addition, subtraction, magnitude, dot product, and more. Clean code and easy to extend.
A JavaFX application for performing vector operations in different coordinate systems. The project supports Cartesian, Cylindrical, and Spherical coordinate systems, and automatically converts all inputs to the Cartesian system before performing calculations.
- Multiple Coordinate Systems
- Coordinate Conversion
- Vector Operations
- JavaFX GUI
- Formatted Results
- Reset & Exit Buttons
Vector Addition and Vector Subtraction.
Each system has its own class and conversion logic.
vector_operations/
│
├── Vector_Operations.java
├── Cartesian.java
├── Cylendrical.java
└── Spherical.java
double x = rho * Math.cos(Math.toRadians(45)) - phi * Math.sin(Math.toRadians(45));
double y = rho * Math.sin(Math.toRadians(45)) + phi * Math.cos(Math.toRadians(45));
double z = z;
double x = r * Math.sin(Math.toRadians(45)) * Math.cos(Math.toRadians(phi))
+ theta * Math.cos(Math.toRadians(45)) * Math.cos(Math.toRadians(phi))
- phi * Math.sin(Math.toRadians(45));
double y = r * Math.sin(Math.toRadians(45)) * Math.sin(Math.toRadians(phi))
+ theta * Math.cos(Math.toRadians(45)) * Math.sin(Math.toRadians(phi))
+ phi * Math.cos(Math.toRadians(45));
double z = r * Math.cos(Math.toRadians(45)) - theta * Math.sin(Math.toRadians(45));
JDK 17 or later JavaFX SDK Any IDE: IntelliJ, NetBeans, Eclipse
Run via Command Line java --module-path /path/to/javafx/lib --add-modules javafx.controls Vector_Operations
📸 Screenshots (Optional) If you want, send me screenshots and I’ll integrate them nicely here.
🛠️ Possible Future Enhancements
- Add dot product & cross product
- Add magnitude and angle calculations
- Add better cylindrical and spherical conversion formulas
- Add vector graphical visualization
📜 License
MIT License — free to use, modify, and distribute.