An interactive JavaFX application for exploring the unit circle, trigonometric functions, and special right triangles. This educational tool supports multiple modes that help students visually and interactively learn sine, cosine, and tangent across quadrants.
This project is a trigonometry learning tool with three interactive modes:
- Exploration Mode: Freely explore the unit circle by clicking labeled angle buttons.
- Unit Circle Game Mode: A 2-minute timed game where users match angles based on trigonometric values.
- Special Triangles Mode: Pop-up overlays display properly oriented 30-60-90 and 45-45-90 triangles.
- 🔵 JavaFX GUI with dynamic layout and scale-aware transformations
- 🟠 Trigonometric overlays that hide quadrants depending on sin/cos/tan positivity
- 🟢 Interactive scoring and timer logic for timed games
- 🟣 Weighted angle generation based on user mistakes for personalized practice
- 🟤 Popup triangle diagrams with orientation based on unit circle quadrants
- ⚪ Modular use of:
Map,Set,List- Lambdas and
Streamfiltering Timelineanimation- File I/O with fallback safety
- 🧪 Fully integrated JUnit 5 and TestFX GUI testing
- 📊 JaCoCo test coverage reporting
- 🧱 UML diagram via PlantUML in both
.txtand.pngformats
⚠️ Assumes Java 17+ and Maven are installed and configured correctly.
git clone https://github.com/penpro/CSIIFinal.git
cd CSIIFinalmvn clean javafx:run
Image: Quadrants are hidden to restrict options based on sine positivity.
Image: Special triangle rendered and rotated for Quadrant III.
- Modes:
- Exploration
- Unit Circle Game
- Special Triangles
- Function Display Options:
- Degrees
- Radians
- sin(x)
- cos(x)
- tan(x)
This app uses a combination of JUnit 5 and TestFX for both logic and GUI testing.
mvn testmvn jacoco:reportOpen the coverage report:
target/site/jacoco/index.htmlIncludes GUI testing of angle button behavior, scene initialization, and game-mode interactions using TestFX. High coverage achieved by simulating button clicks for each angle.
UnitCircleApp.java: JavaFX Application main classHighScoreManager.java: Manages high score I/O and entryScoreHistoryManager.java: Tracks and displays session historySpecialTriangle.java: Draws and rotates triangle diagrams based on angle/quadrant
See docs/uml.txt for the source PlantUML code used to generate this diagram.
- JavaFX official site – https://openjfx.io
- Khan Academy – Unit Circle & Trigonometry – https://www.khanacademy.org/math/trigonometry
- Desmos Graphing Calculator – https://www.desmos.com
- JavaFX Timeline API – https://docs.oracle.com/javase/8/javafx/api/javafx/animation/Timeline.html
- TestFX Documentation – https://github.com/TestFX/TestFX
- JaCoCo Test Coverage Tool – https://www.jacoco.org/jacoco/
- Oracle JavaFX Sample Projects – https://docs.oracle.com/javase/8/javase-clienttechnologies.htm
- Stack Overflow: JavaFX layout tips – https://stackoverflow.com/questions/33016243
- JavaFX ComboBox API – https://openjfx.io/javadoc/17/javafx.controls/javafx/scene/control/ComboBox.html
- TestFX GitHub Examples – https://github.com/TestFX/TestFX/tree/master/tests
- PlantUML Reference Guide – https://plantuml.com/class-diagram
- Material Design UI concepts – https://m3.material.io/
- Effective Java (Joshua Bloch) – Chapter on Enums and Lambdas
- JavaFX Circle class – https://docs.oracle.com/javafx/2/api/javafx/scene/shape/Circle.html
- JavaFX Scene Graph overview – https://openjfx.io/javadoc/17/javafx.graphics/javafx/scene/Node.html
- ChatGPT made my readme pretty because I 100% can't be bothered https://chatgpt.com/share/68534690-0388-8004-afdc-0520e14c7f80
- Handling correct quadrant overlays dynamically for different trig functions
- Implementing smooth and visually accurate triangle transformations
- Debugging GUI state for timed mode using TestFX headless test runners
- Ensuring consistent layout across resizes and DPI scaling
- Unit tests are in
src/test/java/ - UML source and image output are in
docs/ - Run
mvn javafx:runfor GUI launch, ormvn testfor CLI test runs - Tested on IntelliJ IDEA 2024.3 with JavaFX and Maven plugins
© 2025 Wesley Weaver. For educational use.
