Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a random chord of a circle
ResourceFunction["RandomCircleChord"][type] returns a random chord of type type. | |
ResourceFunction["RandomCircleChord"][type,n] returns n random chords of type type. | |
ResourceFunction["RandomCircleChord"][type,n,format] returns n random chords of type type with the output format format. |
Generate a random circle chord:
In[1]:= |
Out[1]= |
Generate 100 random circle chords and visualize:
In[2]:= |
Out[2]= |
Retrieve all types:
In[3]:= |
Out[3]= |
By default, the chords are returns as a list of Line objects::
In[4]:= |
Out[4]= |
Get the endpoints of the chord:
In[5]:= |
Out[5]= |
Represent the chords as a single Line object:
In[6]:= |
Out[6]= |
Get the midpoints of each chord:
In[7]:= |
Out[7]= |
Generate 50 chords and return a single Line object:
In[8]:= |
Out[8]= |
Find the chance of each slice of a pie getting a candle given that the two candles are randomly placed and the cake randomly cut:
In[9]:= |
Out[10]= |
Compare the distribution of midpoints visually:
In[11]:= |
Out[13]= |
Find the radial distribution of the midpoints:
In[14]:= |
Out[15]= |
Check the Bertrand paradox for a variety of ways of generating random chords:
In[16]:= |
Out[18]= |
This work is licensed under a Creative Commons Attribution 4.0 International License