Function Repository Resource:

# CurvaturePlot

Plot a curve defined by its curvature

Contributed by: Sander Huisman
 ResourceFunction["CurvaturePlot"][f,{t,tmin,tmax}] plots the curve defined by its curvature f as a function of t. ResourceFunction["CurvaturePlot"][{f1,f2,…},{t,tmin,tmax}] plots several curves defined by their curvatures fi. ResourceFunction["CurvaturePlot"][…,{t,tmin,tmax},{{x0,y0},θ0}] starts the curves at {x0,y0} in the direction θ0.

## Details and Options

The default starting location is at {0,0} and in the direction θ0=0. The angle θ0 is defined as follows:
A constant curvature c draws a circle with radius 1/c.
ResourceFunction["CurvaturePlot"] has the same options as ParametricPlot and NDSolve.

## Examples

### Basic Examples (3)

Plot a curve with increasing curvature:

 In[1]:=
 Out[1]=

Plot a curve with a sinusoidally varying curvature:

 In[2]:=
 Out[2]=

Plot multiple curves:

 In[3]:=
 Out[3]=

### Scope (1)

Start at the point {5,7} in the left direction:

 In[4]:=
 Out[4]=

### Options (34)

#### AspectRatio (2)

By default, the AspectRatio comes from PlotRange:

 In[5]:=
 Out[5]=

Set a different AspectRatio:

 In[6]:=
 Out[6]=

#### Axes (1)

Draw no axes:

 In[7]:=
 Out[7]=

#### AxesLabel (1)

Specify labels for the x- and y-axes:

 In[8]:=
 Out[8]=

#### AxesOrigin (2)

Determine where the axes cross automatically:

 In[9]:=
 Out[9]=

Specify the axes origin at the point {0,0}:

 In[10]:=
 Out[10]=

#### ColorFunction (5)

Color the curve by scaled x-, y- or t-values:

 In[11]:=
 Out[11]=

 In[12]:=
 Out[12]=

ColorFunction has higher priority than PlotStyle:

 In[13]:=
 Out[13]=

Use red for the parameter t>2π:

 In[14]:=
 Out[14]=

Color by the absolute curvature:

 In[15]:=
 Out[15]=

#### ColorFunctionScaling (1)

Color the curve by the phase of the sine:

 In[16]:=
 Out[16]=

#### MaxRecursion (1)

Each level of MaxRecursion will adaptively subdivide the initial mesh into a finer mesh:

 In[17]:=
 Out[17]=

#### Mesh (1)

Show the initial and final sampling meshes:

 In[18]:=
 Out[18]=

#### PerformanceGoal (2)

Generate a higher-quality plot:

 In[19]:=
 Out[19]=

Emphasize performance, possibly at the cost of quality:

 In[20]:=
 Out[20]=

#### PlotLabels (5)

Specify the text to label the curves:

 In[21]:=
 Out[21]=

Place the labels above the curves:

 In[22]:=
 Out[22]=

Place the labels differently for each curve:

 In[23]:=
 Out[23]=

Use callouts to identify the curves:

 In[24]:=
 Out[24]=

Put labels relative to the outside of the curves:

 In[25]:=
 Out[25]=

Use None to not add a label:

 In[26]:=
 Out[26]=

#### PlotLegends (5)

No legends are used by default:

 In[27]:=
 Out[27]=

Create a legend with specific labels:

 In[28]:=
 Out[28]=

PlotLegends picks up PlotStyle values automatically:

 In[29]:=
 Out[29]=

Use Placed to position legends:

 In[30]:=
 Out[30]=

Place legends inside:

 In[31]:=
 Out[31]=

Use LineLegend to modify the appearance of the legend:

 In[32]:=
 Out[32]=

#### PlotPoints (1)

Use more initial points to get a smoother plot:

 In[33]:=
 Out[33]=

#### PlotRange (1)

Change the PlotRange:

 In[34]:=
 Out[34]=

#### PlotStyle (3)

Use different style directives:

 In[35]:=
 Out[35]=

By default, different styles are chosen for multiple curves:

 In[36]:=
 Out[36]=

Explicitly specify the style for different curves:

 In[37]:=
 Out[37]=

#### PlotTheme (1)

Use a marketing theme:

 In[38]:=
 Out[38]=

#### WorkingPrecision (2)

Evaluate functions using machine-precision arithmetic:

 In[39]:=
 Out[39]=

Evaluate functions using arbitrary-precision arithmetic:

 In[40]:=
 Out[40]=

### Possible Issues (2)

More steps may be needed in the integration:

 In[41]:=
 Out[41]=

Supply a larger MaxSteps option:

 In[42]:=
 Out[42]=

### Neat Examples (4)

Plot an increasingly-curvy curve:

 In[43]:=
 Out[43]=

Elementary function can lead to very complicated patterns:

 In[44]:=
 Out[44]=

Plot a bunch of connected circles:

 In[45]:=
 Out[45]=

Create intricate non-repeating patterns:

 In[46]:=
 Out[46]=

SHuisman

## Version History

• 1.0.0 – 26 July 2019