3D Golf Model Repository
3D Golf Model Repository
UpstreamDrift(opens in a new tab) (navigation only; not pinned to a specific commit) is a Python simulation and analysis platform for the golf swing. It runs the same model definitions through several independent physics engines so that a result can be checked against a second implementation rather than taken on trust, and wraps that core in a desktop application, a REST API, and a web interface.
Authority snapshot. The statements on this page describe UpstreamDrift at protected
main commit
98165272(opens in a new tab),
reviewed 2026-09-02. The upstream repository is the live authority; these are software facts and
support tiers, not evidence of biomechanical validity or fitness for coaching or clinical use.
Overview
UpstreamDrift covers forward and inverse dynamics, inverse kinematics with nullspace optimization, trajectory optimization across candidate swing objectives, kinematic force decomposition (Coriolis, centrifugal, gravitational), motion-capture retargeting, and cross-engine comparison that reports the deviation between engines. Models range from two-degree-of-freedom pendulums and flexible-shaft formulations up to full-body and muscle-driven musculoskeletal models, with parametric humanoid generation and URDF export.
Physics Engines and Support Tiers
Support tier states what continuous integration validates, not what is implemented.
Supported: MuJoCo (required on every pull request)
Extended: Drake, Pinocchio (nightly cross-engine validation)
Experimental: OpenSim, MyoSuite (best-effort local validation)
Experimental, differentiable: JaxSim, a JAX-based backend kept in
src/engines/physics_engines/jaxsim with its own upgrade guard; it has no launcher tile
and is not part of the published support-tier contract.
The tier contract is
docs/engines/support_tiers.md(opens in a new tab).
Architecture
Entry point: python launch_upstream_drift.py starts the local API on port 8000
and opens the web interface; --classic opens the PyQt6 desktop launcher and
--api-only runs the server alone.
API: a versioned FastAPI service (src/api) with REST and WebSocket routes.
Web UI: React with Vite, packaged as a Tauri desktop shell (ui/).
Rust kernels: physics kernels in rust_core/ (the upstream-physics
crate, built with maturin) sharing a tools-core crate pinned from the Tools repository.
Tooling: standalone tools under src/tools/, including Pose Studio, the
Model Explorer, and the launch-monitor analytics workbench.
Pipelines and Workbenches
Motion pipeline: video to tracked motion through OpenPose or MediaPipe, with C3D, CSV,
and JSON import and retargeting onto the simulation models
(motion pipeline guide(opens in a new tab)).
Launch-monitor analytics: import, monitor comparison, dispersion, and longitudinal
trends built on a single canonical model layer shared with the Tools repository
(ADR-0046(opens in a new tab)).
BunkerShot3D: a designer workbench for sand shots and sole geometry
(ADR-0032(opens in a new tab)).
Visualization and export: real-time 3D rendering with force-torque overlays, more than
ten plot types, and CSV/JSON export.
History
The project began as a MATLAB/Simulink Simscape Multibody model of the golf swing. Those models are
still in the repository under src/engines/Simscape_Multibody_Models/, maintained as research
references rather than production artifacts, and are the subject of the
Simulink Models page. Everything described above is the
Python platform that grew around them.
Requirements and Access
Windows, macOS, and Linux. Python 3.11 and 3.12 are the tested interpreter minors; Git LFS is required
because model assets are stored in LFS. MATLAB R2023a or later is needed only for the historical
MATLAB models.
View on GitHub →(opens in a new tab) (navigation only; not pinned to a specific commit)
Clone with Git:
git clone https://github.com/D-sorganization/UpstreamDrift.git
Related Resources
See the Overview for the pinned quick start and API example, the Programming Companion Catalog for the engine, program, and workflow inventory, and the Golf Modeling Suite for the AffineDrift link map.
Citation
@online{untitled,
author = {},
title = {3D {Golf} {Model} {Repository}},
url = {https://affinedrift.com/repositories/repositories-3d-model.html},
langid = {en}
}