Visualise Billiard¶
![]()
Display ยท Billiard
Trace rays from the scene's sources and play them as balls, like a 3D billiard: each ball travels along its ray at the speed of sound and changes colour at every reflection. Press Play to set them going; the same button reads Pause while playing and holds them where they are, Rewind goes back to the start, the time slider scrubs and Speed sets how fast they move. Nothing is drawn before Play or a time. The Preview button shows or hides the balls.

Inputs¶
| Name | Type | Access | Default | Description |
|---|---|---|---|---|
scene |
ghdoc | item | Acoustic scene object. | |
source_idx |
int | item | Index of the source to play from, in the order of the scene's sources. Empty (default): every source. Optional. | |
n_balls |
int | item | 500 |
Number of balls per source, one per traced ray. Optional. |
max_order |
int | item | 10 |
Highest reflection order traced per ball. Optional. |
direction |
vector | item | Axis of a spotlight cone to send the balls into, apex at each source. Empty (default): all directions. Needs angle. Optional. | |
angle |
float | item | Half angle of the spotlight cone in degrees. Empty (default): all directions. Needs direction. Optional. | |
order |
int | item | Play only the first reflections of each ball: a ball ends at that order. Empty (default): all traced orders. Optional. | |
time |
float | item | Time in ms. Alone: the balls where sound has travelled at that time (a slider scrubs). With Play: where playback stops (default: the end). Optional. | |
speed |
float | item | Playback speed, a factor of the default, which plays the whole field in 10 s: 0.5 is half as fast, 2 twice. Optional. |
Outputs¶
| Name | Description |
|---|---|
particles |
The position of every ball that has not ended yet at the time, as points. |