A real-time 3D visualization engine with PyOpenGL.
Project description
PhalcoPulse Engine
PhalcoPulse is a lightweight, real-time 3D visualization engine for Python, built on PyOpenGL. It is designed for the rapid prototyping of scientific simulations, physics-based animations, interactive art, and educational tools.
The engine provides a clean scene-based architecture and a modern, interactive GUI overlay, allowing you to focus on your simulation logic while the studio handles the rendering and user interaction.
✨ Key Features
- Real-Time 3D Rendering: Leverages the power and speed of PyOpenGL for smooth, interactive 3D graphics.
- Interactive Camera: Built-in mouse controls for orbit (rotate), pan, and zoom.
- Modern GUI Overlay: An elegant and customizable UI with interactive widgets like buttons and sliders to control your scene in real-time.
- Extensible Scene Architecture: Simply inherit from the
PhalcoPulseFXclass to define your own scenes, separating your logic from the engine's boilerplate. - Helpful Environment: Comes with a dynamic, adaptive grid and reference axes that make 3D space intuitive to work with.
⚙️ Installation
Prerequisites
Before you begin, ensure you have the following installed on your system:
- Python 3.8 or newer
pip(Python's package installer)git(for cloning the repository)
Installation Steps
It is highly recommended to install the package in a virtual environment to isolate project dependencies.
-
Clone the Repository Open your terminal and clone the project's source code:
git clone https://github.com/PhalcoAi/PhalcoPulse cd PhalcoPulse
-
Create and Activate a Virtual Environment From the project's root directory, create and activate a new environment.
# Create the environment python3 -m venv .venv # Activate it (on macOS and Linux) source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
-
Install the Package Install
PhalcoPulsein "editable" mode. The-eflag links the installation to the source code, so your changes are reflected immediately.pip install -e .
🚀 Quick Start Example
Creating a new visualization is simple. The following script creates a scene with a ball that bounces under gravity.
Save it in the examples/ folder and run it.
# File: examples/bouncing_ball.py
from phalcopulse import PhalcoPulseStudio, PhalcoPulseFX, pgfx
from phalcopulse.ui import Label, Button, TextInput, ToggleSwitch
class BouncingBall(PhalcoPulseFX):
"""A clean example scene that draws a single, bouncing ball."""
def setup(self):
self.position = 2.0 # Initial height
self.velocity = 0.5 # Initial upward velocity
self.gravity = -0.98 # Gravity acceleration
self.e = 0.95 # Coefficient of restitution
def loop(self, delta_time):
# Update position and velocity
self.velocity += self.gravity * delta_time
self.position += self.velocity * delta_time
# Bounce off the ground
if self.position < 0.5:
self.position = 0.5
self.velocity = -self.velocity * self.e
pgfx.draw_sphere(
radius=0.5,
color=(0.2, 0.6, 0.9),
center=(0, self.position, 0)
)
if __name__ == '__main__':
# Instantiate the example scene and the studio engine
my_scene = BouncingBall()
studio = PhalcoPulseStudio(scene_fx=my_scene)
# Run the main loop
studio.run()
📦 Dependencies
The core dependencies are managed by pip during installation.
- PyOpenGL: The core OpenGL wrapper for Python.
- Pygame (Community Edition): Used for window creation and event handling.
- NumPy: Used for various numerical calculations.
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page of the repository.
📜 License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phalcopulse-0.1.2.tar.gz.
File metadata
- Download URL: phalcopulse-0.1.2.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4b97343841743b4669d2d27f29c67be9d277febc49d2e57bca0874da0835db3
|
|
| MD5 |
ae5c0b4595cf3bbdfed2241b18b745a2
|
|
| BLAKE2b-256 |
89dddadc564a632fac21dbdd05c6cef61f82cd92e7ce015e0fa6479d01e88c41
|
Provenance
The following attestation bundles were made for phalcopulse-0.1.2.tar.gz:
Publisher:
python-publish.yml on PhalcoAi/PhalcoPulse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phalcopulse-0.1.2.tar.gz -
Subject digest:
b4b97343841743b4669d2d27f29c67be9d277febc49d2e57bca0874da0835db3 - Sigstore transparency entry: 543772500
- Sigstore integration time:
-
Permalink:
PhalcoAi/PhalcoPulse@e1a7c7823156fbcec5f099b20dfb3422bc8c28d1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/PhalcoAi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1a7c7823156fbcec5f099b20dfb3422bc8c28d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file phalcopulse-0.1.2-py3-none-any.whl.
File metadata
- Download URL: phalcopulse-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a33f49e0c205eb5538604b29902085ea54b090ac93cdd4f872a2242ec849ab6
|
|
| MD5 |
8fa9a3e6c742a0f7c13e3179df67b1ac
|
|
| BLAKE2b-256 |
4a653fa8cf6157e915b69361156715f0bb7602bfd88f4b938790f131d27913eb
|
Provenance
The following attestation bundles were made for phalcopulse-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on PhalcoAi/PhalcoPulse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phalcopulse-0.1.2-py3-none-any.whl -
Subject digest:
9a33f49e0c205eb5538604b29902085ea54b090ac93cdd4f872a2242ec849ab6 - Sigstore transparency entry: 543772502
- Sigstore integration time:
-
Permalink:
PhalcoAi/PhalcoPulse@e1a7c7823156fbcec5f099b20dfb3422bc8c28d1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/PhalcoAi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1a7c7823156fbcec5f099b20dfb3422bc8c28d1 -
Trigger Event:
release
-
Statement type: