Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Represent a polyline with rounded corners
ResourceFunction["RoundedLine"][{p1,…,pn},r] represents a rounded polyline with points pi and rounding radius r. | |
ResourceFunction["RoundedLine"][{{p11,p12,…},{p21,…},…},r] represents a collection of rounded polylines. |
A rounded polyline:
| In[1]:= |
|
| Out[1]= |
|
| In[2]:= |
|
| Out[2]= |
|
Apply styling to a rounded polyline:
| In[3]:= |
|
| Out[3]= |
|
Multiple disconnected rounded polylines:
| In[4]:= |
|
| Out[4]= |
|
Use RoundedLine with Arrow:
| In[5]:= |
|
| Out[5]= |
|
Use RoundedLine with Tube:
| In[6]:= |
|
| Out[6]= |
|
If there are less than two points, a plain line is returned:
| In[8]:= |
|
| Out[8]= |
|
No rounding is done for 180° angles:
| In[9]:= |
|
| Out[9]= |
|
If the rounding radius is too large, RoundedLine may give unexpected results:
| In[10]:= |
|
| Out[10]= |
|
Use a smaller rounding radius:
| In[11]:= |
|
| Out[11]= |
|
A rounded dragon curve:
| In[12]:= |
|
| Out[12]= |
|
A rounded Hilbert curve:
| In[13]:= |
|
| Out[13]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License