Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Show the trajectory of a ball bouncing in a regular n-sided polygon
ResourceFunction["BilliardPolygon"][sides,pos,θ,t] gives the trajectory of a ball in a regular n-sided polygon starting from position pos with an angle θ for t steps. |
Start with a triangle with a hundred steps:
In[1]:= |
Out[1]= |
15 steps in the evolution for several geometries:
In[2]:= |
Out[2]= |
Increment gradually the initial position in y-axis:
In[3]:= |
Out[3]= |
A higher number of steps:
In[4]:= |
Out[4]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License