Generates synthetic datasets for training and evaluating vision models on physics prediction and trajectory reasoning tasks. Each sample contains a ball with initial direction that must bounce off walls following reflection laws to hit a target position.
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 | G-35 |
| Task | Hit Target After Bounce |
| Category | Knowledge |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | ~5 seconds |
| Output | PNG images + MP4 video |
# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/G-35_hit_target_after_bounce_data-generator.git
cd G-35_hit_target_after_bounce_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
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_dataset
# Reproducible generation with seed
python examples/generate.py --num-samples 50 --seed 42
# Without videos (faster)
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) |
The scene shows a ball with an arrow indicating its initial direction, and several empty target positions (hollow circles) on the right side. Simulate the ball moving along this direction and bouncing off walls following the law of reflection (the angle of reflection equals the angle of incidence). The ball will follow a complete trajectory and eventually align exactly with and completely overlap one of the target positions.
![]() |
![]() |
![]() |
| Initial Frame Ball with arrow showing direction, target positions visible |
Animation Ball bounces off walls following reflection laws |
Final Frame Ball overlaps with one target position |
Predict ball trajectory with wall bounces following physics laws to determine which target position will be hit.
- Ball: Circular object with directional arrow showing initial velocity
- Targets: Multiple hollow circles on right side (possible end positions)
- Walls: Frame boundaries that cause reflections
- Physics law: Angle of incidence = Angle of reflection
- Initial state: Ball positioned with clear trajectory indicator
- Background: White with clear visibility
- Goal: Simulate complete trajectory to find which target is hit
- Physics-based trajectory prediction
- Multiple wall bounces (reflections)
- Law of reflection (mirror angle bouncing)
- Multiple target options (requires trajectory calculation)
- Tests spatial reasoning and physics understanding
- Deterministic trajectory with exact target alignment
- Visual variety: 20 distinct ball colors for diverse visual appearance
data/questions/hit_target_after_bounce_task/hit_target_after_bounce_00000000/
├── first_frame.png # Ball with direction arrow and target positions
├── final_frame.png # Ball aligned with correct target
├── prompt.txt # Trajectory prediction instruction
├── ground_truth.mp4 # Animation of complete bounce trajectory
└── question_metadata.json # Task metadata
File specifications:
- Images: 1024×1024 PNG format
- Video: MP4 format, 16 fps
- Duration: ~5 seconds
physics trajectory-prediction reflection spatial-reasoning bounce law-of-reflection


