2D particle playground.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
benchmarks Initial commit. May 9, 2017
demos Add an extension to the executables, cuz Windows Aug 6, 2017
hienoi Bump to v0.2.0 Aug 6, 2017
img Initial commit. May 9, 2017
tests Initial commit. May 9, 2017
.gitignore Initial commit. May 9, 2017
CHANGELOG.rst Bump to v0.2.0 Aug 6, 2017
LICENSE Initial commit. May 9, 2017
MANIFEST.in Initial commit. May 9, 2017
Makefile Initial commit. May 9, 2017
README.rst Mention OpenGL May 20, 2017
setup.cfg Initial commit. May 9, 2017
setup.py Initial commit. May 9, 2017
tox.ini Initial commit. May 9, 2017

README.rst

Hienoi

PyPI latest version License

Hienoi is a framework offering an intuitive visual programming experience based around simple 2D particle physics.

Features

  • 2D particle simulation.
  • GUI with OpenGL 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

intro

equilibrium

equilibrium

trail

trail

orbit

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

Author

Christopher Crouzet <christophercrouzet.com>