opensource-latinamerica/henoc
Physics Simulation Software based on user sketches running a pattern recognition agent, this app is able to animate a physics sketch, from a blackboard.
Henoc: Physics Sketch Animator
Henoc is a sophisticated physics simulation software that brings user-drawn sketches to life. By leveraging a pattern recognition agent, Henoc can interpret and animate physics sketches from a simple blackboard interface, providing a dynamic and interactive way to visualize physics principles.
Overview
The core of Henoc is its ability to transform static, hand-drawn sketches into moving simulations. Users can draw various shapes and objects on a virtual blackboard, and Henoc's engine will apply physics rules to animate them. This makes it an excellent tool for educational purposes, rapid prototyping of physics-based scenes, or simply for creative exploration.
What’s New (Latest Changes)
- Native ODE pipeline (dWorld + dSpace + geoms) for robust collisions and contacts.
- ENMARCA frame now acts as solid environment limits; objects can’t pass through.
- 1:1 OpenGL projection (origin at top‑left) aligned to editor pixels.
- Per‑object physics parity (mass, friction, bounce) and theta‑based colors.
- World‑level tunables: Fill Brightness Factor, Density Scale, Line Thickness preset + custom.
- Object dialog presets: Collision/Friction masks (All/None/Group 1–8/Custom) with two‑way sync.
- Per‑line thickness controls (presets + custom), live status bar readout, and context‑menu quick set.
- Branding assets added at top‑level
branding/(+ export script and CI action for PNGs).
Dependencies & Versions
Minimum/recommended versions to build and run Henoc:
- C++ compiler: g++/clang with C++11 support (g++ 7+ recommended).
- Qt 5 (Widgets, OpenGL, XML): Qt 5.12+ (tested with Qt 5.15.x).
- GNU Make and autotools (ODE submodule bootstrap): make, autoconf/automake/libtool.
- OpenGL headers/libs (Mesa on Linux).
Optional (branding export):
- Inkscape (preferred) or
rsvg-convert(librsvg) or ImageMagickconvert.
Third‑Party Libraries
- Open Dynamics Engine (ODE)
- Integrated as a Git submodule:
src/HenocUniverse/ode - Upstream: https://bitbucket.org/odedevs/ode.git
- The build uses the pinned submodule commit. You can check with:
git submodule status src/HenocUniverse/ode
- Integrated as a Git submodule:
Getting the Source (with Submodules)
git clone <this-repo-url>
cd henoc
git submodule update --init --recursiveExample Dependencies
Debian/Ubuntu
sudo apt install -y \
autoconf automake libtool build-essential \
mesa-common-dev libglu1-mesa-dev \
qtbase5-dev qt5-qmake qtbase5-dev-tools \
inkscape librsvg2-bin imagemagick # optional asset toolsFedora/RHEL
sudo dnf install -y \
autoconf automake libtool make gcc-c++ \
mesa-libGL-devel mesa-libGLU-devel \
qt5-qtbase-devel qt5-qttools-devel \
inkscape librsvg2-tools ImageMagick # optional asset toolsArch Linux
sudo pacman -S --needed \
autoconf automake libtool base-devel \
mesa glu \
qt5-base qt5-tools \
inkscape librsvg imagemagick # optional asset toolsBuild (Autotools, recommended)
Two ways to build: without images (faster) or with images (generate PNGs from branding/*.svg).
Prerequisites: see Dependencies above, plus autoconf, automake, libtool.
Without images
- Initialize submodules:
git submodule update --init --recursive
- Generate the build system:
bash ./autogen.sh
- Configure (Qt5 qmake auto-detected; override with
--with-qmake=/path/to/qmake-qt5if needed):./configure
- Build the app (also builds ODE on first run):
Note: the
make
assetstarget is disabled by default. If you need PNGs, either
re-configure with--enable-assetsand runmake assets, or use the
fallback scriptbranding/export.sh. - Run:
./src/henoc
With images (generate PNG assets during make)
- Initialize submodules and generate the build system (same as above).
- Configure with assets enabled:
./configure --enable-assets # optional: --with-qmake=/path/to/qmake-qt5 - Generate PNGs from
branding/*.svg(sizes: 16/32/64/128/256):Notes: requires one ofmake assets
inkscape(preferred),rsvg-convert(librsvg), or ImageMagickconvert. - Build the app:
make
- Run:
./src/henoc
Tips
- Override qmake at configure time with
--with-qmake=…, or at build time withmake QMAKE=/path/to/qmake-qt5. - ODE is built into
src/HenocUniverse/ode_installby default; override with./configure --with-ode-prefix=/abs/path. make assetsis only available when configured with--enable-assets.
Quick start
git submodule update --init --recursive
bash ./autogen.sh
./configure # or: ./configure --enable-assets
make assets # only if configured with --enable-assets
make
./src/henocConfigure options
--with-qmake=/path/to/qmake-qt5: force a specific Qt5 qmake.--with-ode-prefix=/abs/path: where ODE will be installed/built.--enable-assets: enable Makefile-based SVG→PNG generation.
Building the Project (legacy src-only)
The project also includes a legacy src/Makefile build that automates compiling the ODE submodule (Open Dynamics Engine) and the Henoc application.
To build the Henoc application, follow these steps:
-
Navigate to the source directory:
cd src -
Run the make command:
make
This compiles ODE (if needed) and the Henoc app, producing the henoc executable in src/.
Notes:
- If you see autotools warnings while bootstrapping ODE, they are generally harmless.
- On first build, ODE may be configured/built automatically; subsequent builds will be faster.
Running Henoc
Once the build is complete, you can run the application from the src directory:
./henocCleaning the Project
- Top-level (Autotools):
make clean # delegates cleaning into src/ make distclean # also removes configure results
- Legacy (src-only):
cd src && make clean
Branding Assets
SVG sources and export live at the repository top level:
branding/
export.sh # exports all SVGs to PNG (16/32/64/128/256) into branding/png/
README.md # asset documentation
*.svg # icon/wordmark/lockups
Export locally (two options):
- Via Makefile (recommended when configured with assets):
./configure --enable-assets
make assets- Via script (fallback when not using --enable-assets):
cd branding && ./export.shNote: If you run make assets without --enable-assets, it will fail with a
message explaining how to enable it or use branding/export.sh.
Further Reading
docs/USAGE_AND_EXAMPLES.md– usage examples and tutorials.docs/USER_GUIDE.md– step-by-step walkthrough of the UI, configuration dialogs, and troubleshooting.docs/ARCHITECTURE.md– system architecture, wiring, and workflows.docs/CLASS_DIAGRAMS.md– consolidated ASCII class diagrams.docs/TROUBLESHOOTING.md– Qt version tips and common fixes.docs/CONTRIBUTING.md– contribution workflow, coding style, and PR expectations.docs/TODO.md– pending tasks and future work.
Authors
- Román Cisneros José Eduardo
- Soto Escobar Álvaro Antonio
- Valdez Guzmán Rubén
- Villanueva Cortez Eder
License
MIT license LICENSE Copyright (c) 2022 - Henoc authors.
Also, have the following in mind.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.