Generates synthetic datasets for two-pendulum elastic collision kinematics. The agent must simulate a pendulum experiment in which a released bob swings down and elastically collides with a stationary bob, then predict the post-collision motion of both — a textbook test of conservation of momentum and energy in continuous time.
Each sample pairs a task (first frame + prompt describing what needs to happen) with its ground truth solution (final frame showing the result + video demonstrating how to achieve it). This structure enables both model evaluation and training.
| Property | Value |
|---|---|
| Task ID | Multi-34 |
| Task | Elastic Collision (Two-Pendulum Kinematics) |
| Category | Continuous Physics |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | varies |
| Output | PNG images + MP4 video |
# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/Multi-34_elastic_collision_kinematics_data-generator.git
cd Multi-34_elastic_collision_kinematics_data-generator
# 2. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .# Generate 50 samples
python examples/generate.py --num-samples 50
# Reproducible generation with seed
python examples/generate.py --num-samples 50 --seed 42
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_dataset
# Without videos (faster, images only)
python examples/generate.py --num-samples 50 --no-videos| Argument | Description |
|---|---|
--num-samples |
Number of tasks to generate (required) |
--output |
Output directory (default: data/questions) |
--seed |
Random seed for reproducibility |
--no-videos |
Skip video generation (images only) |
[Scenario] The image displays two pendulums (Length=2.83m) under gravity g=9.8m/s². Ball A (Mass=11185g, Radius=48cm) is released from 62° to hit Ball B (Mass=10302g, Radius=46cm), which is initially at rest.
[Rules]
1. The collision between the two balls is perfectly elastic (e=1.0).
2. The motion of the pendulums must obey basic collision kinematics and gravity.
[Task] Generate a video simulating the motion of the pendulums. Animate Ball A swinging and hitting Ball B, and accurately show the resulting velocities and peak height of Ball B. Hold the final frame.
![]() |
![]() |
![]() |
| Initial Frame Left bob at release angle, right bob at rest |
Animation Swing-down, elastic collision, post-collision swings |
Final Frame Both bobs at their predicted post-collision states |
Simulate the full kinematics of two pendulums: the left bob is released from a tilt angle and swings down under gravity until it collides elastically with the right (stationary) bob; both bobs then swing according to post-collision velocities derived from conservation of energy and momentum.
- Pendulums: Two equal-length pendulums hanging side by side; bobs differ in mass and radius.
- Initial state: Left bob released from rest at a non-zero angle; right bob at rest at vertical.
- Gravity: 9.8 m/s² (configurable).
- Collision: Elastic with restitution e=1.0 — both energy and momentum exactly conserved.
- Post-collision velocities: Computed via the standard 1-D elastic collision formulas using mass ratio.
- Animation: Swing-down, instant collision, swing-up of both bobs.
- Real continuous physics: Pendulum trajectory follows nonlinear gravity-driven dynamics, not piecewise-linear bounces.
- Two conservation laws coupled: Post-collision velocities satisfy both
(1/2)mv²andmvsimultaneously — only one valid pair of speeds. - Mass-ratio sensitivity: Outcome (transmission, partial reflection, etc.) depends on mass ratio in non-monotonic ways.
- Visible per-phase ground truth: Swing-down, contact, and post-collision swings render distinctly for fine-grained evaluation.
data/questions/Multi-34_elastic_collision_kinematics_data-generator_task/Multi-34_elastic_collision_kinematics_data-generator_00000000/
├── first_frame.png # Initial pendulum configuration
├── final_frame.png # Post-collision pendulum states
├── prompt.txt # Task instruction with physics parameters
├── ground_truth.mp4 # Animation of full kinematics
└── question_metadata.json # Standardized VBVR task metadata
File specifications:
- Images: 1024×1024 PNG format
- Video: MP4 format, 16 fps, H.264 + yuv420p
- Metadata: VBVR canonical schema with
task_id,vbvr_task_code,media,parameters
elastic-collision pendulum conservation-of-momentum conservation-of-energy continuous-physics kinematics multi-step-reasoning
Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.


