Generates synthetic datasets for multi-bounce trajectory prediction. The agent must trace a ball as it travels in straight lines and reflects off vertical walls multiple times following the law of reflection, ultimately identifying which of several target circles is hit — testing chained physical reasoning over many sequential reflections.
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-32 |
| Task | Multiple Bounces to Target |
| 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-32_multiple_bounces_target_data-generator.git
cd Multi-32_multiple_bounces_target_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 scene shows a black ball with an arrow indicating its initial direction, and several empty target positions (hollow circles) on the right side.
[Rules]
1. The ball moves in straight lines.
2. When hitting the vertical walls, the ball reflects following the law of reflection (the angle of reflection equals the angle of incidence).
[Task] Generate a video tracking the ball's unique trajectory. Simulate the ball moving and bouncing off walls step by step until it aligns exactly with and completely overlaps one of the target positions. Hold the final frame.
![]() |
![]() |
![]() |
| Initial Frame Ball + initial direction arrow + walls + targets |
Animation Ball traverses + bounces off walls multiple times |
Final Frame Ball at hit target; full trajectory visible |
Trace the ball's deterministic trajectory under the law of reflection across multiple wall bounces, and identify which of the available target circles in the lower-right region the ball ultimately strikes.
- Ball: A black ball with a printed initial direction (shown as an arrow).
- Walls: Two vertical walls bounding the trajectory; ball reflects off both per the standard reflection law.
- Targets: Several red hollow circles in the lower-right area; exactly one is the true hit.
- Reflection law: Angle of incidence = angle of reflection (measured from the wall normal).
- Solver: Closed-form ray-marching with reflection produces the unique trajectory and hit target.
- Sequential reflections: Each bounce changes the direction; the trajectory after N reflections depends on every preceding angle calculation.
- Error compounding: An angular miscalculation early in the trajectory amplifies after multiple bounces — exact arithmetic is essential.
- Multiple-choice discrimination: Distractor targets are placed in close proximity, so coarse trajectory estimation fails.
- Visible trajectory: Each segment renders sequentially, providing per-bounce intermediate state for evaluation.
data/questions/Multi-32_multiple_bounces_target_data-generator_task/Multi-32_multiple_bounces_target_data-generator_00000000/
├── first_frame.png # Ball + initial arrow + walls + targets
├── final_frame.png # Trajectory drawn + hit target
├── prompt.txt # Task instruction
├── ground_truth.mp4 # Animation of the bouncing trajectory
└── 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
reflection-law multi-bounce trajectory-prediction continuous-physics chained-reasoning multiple-choice multi-step-reasoning
Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.


