Generates synthetic tasks where a ball bounces off walls in a bounded area. The goal is to predict and animate the complete trajectory path based on initial position and velocity, stopping after a specified number of bounces.
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 | O-15 |
| Task | Ball Bounces Given Time |
| Category | Knowledge |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | ~5 seconds |
| Output | PNG images + MP4 video |
# Clone the repository
git clone https://github.com/VBVR-DataFactory/O-15_ball_bounces_given_time_data-generator.git
cd O-15_ball_bounces_given_time_data-generator
# Install dependencies
pip install -r requirements.txt# Generate 100 samples
python examples/generate.py --num-samples 100
# Generate with specific seed
python examples/generate.py --num-samples 100 --seed 42
# Generate without videos
python examples/generate.py --num-samples 100 --no-videos
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_output| Argument | Type | Description | Default |
|---|---|---|---|
--num-samples |
int | Number of samples to generate | 100 |
--seed |
int | Random seed for reproducibility | Random |
--output |
str | Output directory | data |
--no-videos |
flag | Skip video generation | False |
A ball is placed at the initial position with a direction arrow indicating its movement direction. Simulate the ball bouncing 4 times off the boundary walls following elastic collision physics (angle of incidence equals angle of reflection). The ball stops after the 4th bounce, with its final position at the wall where the last collision occurs.
![]() |
![]() |
![]() |
| Initial Frame Ball with direction arrow |
Animation Ball bounces off walls along trajectory |
Final Frame Ball stops at wall after Nth bounce |
Predict and animate the trajectory of a ball bouncing off walls in a bounded rectangular area, stopping after a specified number of bounces.
- Bounded Area: Rectangular region with four walls
- Initial State: Ball at starting position with direction arrow indicating movement direction
- Bounce Count: Specified number of bounces (typically 2-6)
- Physics: Elastic collisions with walls (angle of incidence = angle of reflection)
- Stopping Condition: Ball stops immediately after the Nth bounce, final position at the collision wall
- Trajectory prediction: Tests understanding of ball motion and bouncing physics
- Elastic collision: Angle of incidence equals angle of reflection at walls
- Multi-bounce simulation: Ball bounces multiple times off different walls
- Velocity preservation: Ball maintains speed (elastic collisions)
- Stopping criterion: Ball stops at wall after exact number of bounces
- Path visualization: Complete trajectory path shown in animation
- Visual variety: 20 distinct ball colors for diverse visual appearance
data/questions/ball_bounces_given_time_task/ball_bounces_given_time_00000000/
├── first_frame.png # Initial state (ball with direction arrow)
├── final_frame.png # Final state (ball after specified bounces)
├── prompt.txt # Task instructions
├── ground_truth.mp4 # Solution video (16 fps, H.264)
└── question_metadata.json # Task metadata
File specifications: Images are 1024×1024 PNG. Videos are MP4 at 16 fps, approximately 5 seconds long.
physics-simulation trajectory-prediction bouncing-ball elastic-collision multi-bounce path-prediction kinematics


