Geometry
A Geogebra clone with an original mathematics engine
GeoGebra is a widely used, free software application that combines geometry, algebra, calculus, and other branches of mathematics into a single, interactive platform. It is particularly popular in educational settings for teaching and learning mathematics, as well as for exploring mathematical concepts visually and dynamically.
The Geometry project is a Python-based graphical application mainly built using Pygame and Numpy. Its goal is to create a 3D interactive geometric exploration tool inspired by GeoGebra. The tool features an original mathematics engine to handle advanced geometric transformations, projections, and object manipulations.
Main Features
- Interactive Visualization:
- A user-friendly Pygame interface with a resizable canvas for geometric visualization.
- An interactive coordinate axis that can respond to user actions like mouse clicks and drags.
- Mathematical Engine:
- Core mathematical functions include:
- Change of Basis: Converts vectors between arbitrary bases for advanced linear algebra operations.
- Translation: Moves points in space using specified directional vectors.
- Homothety: Scales objects relative to a center point with a specific ratio.
- Rotation: Supports 3D rotations using roll, pitch, and yaw angles.
- Projection: Projects 3D points into 2D space for visualization.
- Core mathematical functions include:
- Modular Object-Oriented Design:
- The code separates concerns through modules for rendering (
objects.py
), mathematical transformations (transformations.py
), and the main application logic (main.py
). - Scalability is inherent, allowing for the integration of new shapes or geometric tools.
- The code separates concerns through modules for rendering (
- Real-Time Updates:
- The application employs a delta-time loop to ensure smooth and consistent animation and interaction across different hardware.
- Customizable Geometry:
- Users can define, manipulate, and observe geometric entities like axes and vectors, allowing hands-on exploration of mathematical concepts.
Functionalities Available
- Axis Manipulation:
- The 3D coordinate axis is rendered dynamically. Users can click and drag to reposition it within the viewport.
- Projection to 2D:
- Points in 3D space are projected onto a 2D plane, offering insights into 3D-to-2D transformations.
- Advanced Transformations:
- Perform translations, rotations, and scalings on geometric entities with intuitive results.
- Event Handling:
- Responds to mouse clicks and movement for interactive geometry exploration.
Planned Enhancements
- Enhanced Shape Library:
- Add common geometric objects like circles, polygons, and curves for visualization.
- Dynamic Inputs:
- Implement input dialogs for users to provide equations, coordinates, or parameters dynamically.
- Educational Tools:
- Include step-by-step explanations and visualizations for transformations.
- Export Features:
- Save visualizations as image files or export data for further analysis.
- 3D Object Rendering:
- Extend the engine to render 3D objects with depth, lighting, and perspective.
Technological Highlights
- Python + Pygame:
- Delivers a simple yet powerful interactive graphics framework.
- Numpy Integration:
- Efficient mathematical computation and matrix manipulation.
- Object-Oriented Programming:
- Ensures modularity and extensibility.
Project Repository
- GitHub Repository provides access to the source code, detailed documentation, and examples.