Metadata-Version: 2.0
Name: hienoi
Version: 0.2.0
Summary: 2D particle playground
Home-page: https://github.com/christophercrouzet/hienoi
Author: Christopher Crouzet
Author-email: christopher.crouzet@gmail.com
License: MIT
Keywords: 2D particles OpenGL nani NumPy
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Dist: PyOpenGL
Requires-Dist: PySDL2
Requires-Dist: nani
Requires-Dist: numpy
Provides-Extra: dev
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: tox; extra == 'dev'

Hienoi
======

.. image:: https://img.shields.io/pypi/v/hienoi.svg
   :target: https://pypi.python.org/pypi/hienoi
   :alt: PyPI latest version

.. image:: https://img.shields.io/pypi/l/hienoi.svg
   :target: https://pypi.python.org/pypi/hienoi
   :alt: 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
-----

.. code-block:: python

   >>> 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
------------

.. code-block:: bash

   $ pip install hienoi


Demos
-----

intro
^^^^^

.. image:: img/intro.gif
   :alt: intro


equilibrium
^^^^^^^^^^^

.. image:: img/equilibrium.gif
   :alt: equilibrium


trail
^^^^^

.. image:: img/trail.gif
   :alt: trail


orbit
^^^^^

.. image:: img/orbit.gif
   :alt: 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 <https://christophercrouzet.com>`_>


