GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nabilkhondaker/MechGenPro: A procedural kinematics engine that generates, simulates, and optimizes mechanical linkages.

BranchesTags
Open more actions menu

Latest commit

 

History

57 Commits
57 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
src
src
 
 
tests
tests
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
conf.lua
conf.lua
 
 
main.lua
main.lua
 
 

Repository files navigation

MechGenPro

Engineered by Nabil Khondaker.

Lua LÖVE GLSL

A procedural kinematics engine that generates, simulates, and optimizes mechanical linkages.


Contents
  • 🚀 Engineering Overview
  • ✨ Key Features
  • 📁 Project Structure
  • 🛠️ Tech Stack
  • ⚙️ Quick Start
    • 1. Prerequisites
    • 2. Running the Application
  • 📊 Core Capabilities
  • 🎯 Use Cases
  • 👤 Author

🚀 Engineering Overview

MechGenPro is a real-time procedural kinematics engine built in Lua with LÖVE2D. It procedurally generates, simulates, and optimizes planar mechanical linkages (four-bar mechanisms and beyond), with interactive visualization, Grashof classification, trajectory tracing, and optimization tools.

Perfect for mechanical engineering education, mechanism design research, robotics prototyping, and creative procedural generation experiments.


✨ Key Features

  • Procedural Mechanism Generation: Automatic creation of valid four-bar linkages (Crank-Rocker, Double-Crank, Double-Rocker, etc.) using Grashof criteria.
  • Real-time Kinematic Simulation: Forward kinematics with velocity/acceleration analysis.
  • Interactive Visualizer: Pan, zoom, real-time animation with trajectory tracing and grid overlay.
  • GUI Inspector: Dynamic parameter tweaking and live feedback.
  • Optimization Module: Tools for optimizing link lengths and pivot positions.
  • Modular Architecture: Clean separation of core engine, generator, visualizer, and GUI layers.
  • Blueprint Aesthetic: Custom shaders and professional engineering-style UI.

📁 Project Structure

MechGenPro/
├── main.lua                   # App entry point (LÖVE2D standard)
├── conf.lua                   # Window and engine configuration
├── src/
│   ├── core/
│   │   ├── Engine.lua         # Main loop and state manager
│   │   ├── EventBus.lua       # Decoupled event messaging
│   │   └── config.lua         # Global constants
│   ├── math/
│   │   ├── Vector2.lua        # 2D Vector mathematics
│   │   ├── Matrix3x3.lua      # Transformations
│   │   └── Solvers.lua        # Newton-Raphson & numerical solvers
│   ├── kinematics/
│   │   ├── Linkage.lua        # Base class for all mechanisms
│   │   ├── FourBar.lua        # Four-bar solver & transmission angles
│   │   ├── CamFollower.lua    # Cam profile generation
│   │   ├── GearTrain.lua      # Epicyclic/planetary gear math
│   │   └── Joint.lua          # Revolute and prismatic joint definitions
│   ├── generator/
│   │   ├── ProceduralGen.lua  # Random generation using Grashof conditions
│   │   ├── RuleBuilder.lua    # Constraint logic for mechanisms
│   │   └── Validator.lua      # Checks for lockups/singularities
│   ├── optimization/
│   │   ├── GeneticOptimizer.lua # GA for path matching
│   │   ├── CostFunctions.lua  # Evaluates transmission angle & path deviation
│   │   └── KinematicHessian.lua # Advanced gradient descent
│   ├── visualizer/
│   │   ├── Renderer.lua       # Anti-aliased drawing of links/joints
│   │   ├── Camera.lua         # Pan/Zoom workspace camera
│   │   ├── Grid.lua           # Blueprint-style background
│   │   └── TraceGraph.lua     # Plots coupler curves and performance
│   ├── gui/
│   │   ├── imgui_impl.lua     # Bindings for Dear ImGui (UI)
│   │   ├── Timeline.lua       # Animation scrubber
│   │   └── Inspector.lua      # Property editor for link lengths
│   └── utils/
│       ├── Exporter.lua       # Exports CSV curve data / GIF frames
│       └── Logger.lua         # Console debugging
├── assets/
│   ├── shaders/
│   │   └── blueprint.glsl     # Custom shader for the workspace
│   └── fonts/
│       └── RobotoMono.ttf
└── tests/
    ├── test_fourbar_math.lua  # Unit tests for kinematics
    └── test_optimizer.lua

🛠️ Tech Stack

  • Language: Lua
  • Framework: LÖVE2D (Love2D)
  • Graphics: Custom GLSL shaders + immediate-mode rendering
  • Math: Custom vector/geometry library
  • UI: Built-in LÖVE GUI components + Inspector panel

⚙️ Quick Start

1. Prerequisites

  • LÖVE2D (version 11.5+ recommended)
  • Git

2. Running the Application

git clone https://github.com/nabilkhondaker/MechGenPro.git
cd MechGenPro

# Run with LÖVE
love .

Controls

  • Right-click + drag: Pan camera
  • Mouse wheel: Zoom in/out
  • UI Panel: Tweak parameters in real time

📊 Core Capabilities

  • Grashof-based synthesis of planar four-bar mechanisms
  • Real-time position, velocity, and acceleration analysis
  • Trajectory tracing and coupler curve visualization
  • Dynamic optimization of linkage performance
  • Extensible architecture for adding new mechanism types

🎯 Use Cases

  • Mechanical engineering education and demonstrations
  • Rapid prototyping of linkage-based mechanisms
  • Research in kinematic synthesis and optimization
  • Procedural content generation for games/tools
  • Interactive design tool for robotics and automation

👤 Author

Engineered by Nabil Khondaker

About

A procedural kinematics engine that generates, simulates, and optimizes mechanical linkages.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.