2D particles playground
Project description
Hienoi is a framework offering an intuitive visual programming experience based around simple 2D particle physics.
Features
2D particle simulation.
GUI with viewport.
user-friendly API.
support for per-particle user attributes.
fast when directly operating particles through NumPy.
compatible with both Python 2 and Python 3.
Usage
>>> import hienoi.application
>>> from hienoi import Vector2f
>>> def initialize_particle_simulation(sim):
... sim.add_particle(position=Vector2f(25.0, 0.0))
>>> def update_particle_simulation(sim):
... particle = sim.particles[0]
... particle.force -= particle.position
>>> hienoi.application.run(
... particle_simulation={
... 'initialize_callback': initialize_particle_simulation,
... 'postsolve_callback': update_particle_simulation,
... })
More commented examples can be found in the demos folder.
Installation
$ pip install hienoi
Demos
intro
equilibrium
trail
orbit
Hotkeys
space + LMB |
move view |
space + RMB |
zoom view |
d |
change the display mode of the particles |
f |
fit the view to the scene |
g |
show/hide the grid |
r |
reset the view |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hienoi-0.1.0.tar.gz
(44.7 kB
view hashes)
Built Distribution
hienoi-0.1.0-py2.py3-none-any.whl
(40.4 kB
view hashes)
Close
Hashes for hienoi-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2162d3ed8955f6db4dbb19cba205c1f6c859153598f846a167260f7a12935bc1 |
|
MD5 | 5f825db0ed53d02b786999bcad9bced9 |
|
BLAKE2b-256 | 9aec7476d7f318022744935bfb0178a19545d0d3f4fd2b84e7bb2404f0eb1795 |