Instructions
The functions defined in this notebook will allow you to plot evolutes of plane curves.

The first thing you should do is compile the block of code immediately below this text cell.  You can do this either by clicking somewhere in the cell and then pressing ‘Shift+Enter’ or by right-clicking the long, thin bar on the right side of the cell and clicking ‘Evaluate cell.’  You should not edit this block of code, and you also don’t have to read it if you don’t want to.

Once you’ve compiled this block, you’ll have access to four functions, two of which will be useful to you:
  1. evoluteManipulate, which will produce a controllable animation of the normal line segments connecting your curve to its evolute;
  2. evoluteLines, which will plot your curve and its evolute, along with as many of the normal line segments as you want.

(*the following module accepts as input:
	a function g of a single variable, whose output has two components
	an independent variable t
*)
evolute[g_,t_]:=Module[{evg,x,y},
x[tt_]:=Part[g[tt],1];
y[tt_]:=Part[g[tt],2];
evg[tt_]:=Piecewise[{
{(*the following formulas are derived in the exploration*)
{x[tt]-((y'[tt]((((x'[tt]))^2)+(((y'[tt]))^2)))/(x'[tt]*y''[tt]-x''[tt]*y'[tt])),y[tt]+((x'[tt]*((((x'[tt]))^2)+(((y'[tt]))^2)))/(x'[tt]*y''[tt]-x''[tt]*y'[tt]))},
x'[tt]*y''[tt]-x''[tt]*y'[tt]≠0
},
(*if the curvature is zero, the evolute isn't defined.  instead, just output the point on the original curve*)
{{x[tt],y[tt]},True}
}];
Return[evg[t],Module];
];

curvature[g_,t_]:=((Part[g'[t],1]*Part[g''[t],2]-Part[g'[t],2]*Part[g''[t],1])/(((Norm[g'[t]]))^3));

(*the following module accepts as input:
	a function g of a single variable, whose output has two components
	a lower bound tMin for the independent variable
	an upper bound tMax for the independent variable
*)
evoluteManipulate[g_,tMin_,tMax_]:=Module[{evPlot,evMan},
evPlot=ParametricPlot[{g[t],evolute[g,t]},{t,tMin,tMax}];
evMan=Manipulate[Show[
evPlot,
ParametricPlot[g[tt]*s+(1-s)*evolute[g,tt],{s,0,1},PlotStyle->Green],
ListPlot[{g[tt],evolute[g,tt]},PlotStyle->{{Green,PointSize[0.025]}}]
],{tt,tMin,tMax}];
Return[evMan,Module];
];

(*the following module accepts as input:
	a function g of a single variable, whose output has two components
	a lower bound tMin for the independent variable
	an upper bound tMax for the independent variable
	an integer linecount, which tells us the number of line segments to plot
*)

evoluteLines[g_,tMin_,tMax_,linecount_]:=Module[{evPlot,evShow},
evPlot=ParametricPlot[{g[t],evolute[g,t]},{t,tMin,tMax}];
evShow=Show[
evPlot,
Table[
ParametricPlot[g[tt]*s+(1-s)*evolute[g,tt],{s,0,1},PlotStyle->Green],
{tt,tMin,tMax,((tMax-tMin)/linecount)}]
];
Return[evShow,Module];
];

Example
Now we’ll use the two useful functions defined above.  When creating your own code below, you can copy and paste the code you see here, then swap out the relevant functions and numbers.

First, let’s define an example curve.  To create more curves, copy the format seen here.  In particular, our example is a semi-cubical cusp.

testCurve[t_]:={(t^2),(t^3)};

Now we can use ‘evolute’ to produce an expression for the evolute of our curve.

evolute[testCurve,t]

Notice that our evolute has a weird definition at t=0.  That’s because our parametrization isn’t regular at this point.  Let’s ignore this for now.

We can create a Manipulate which allows us to control the normal line segments connecting the curve to its evolute.
In the following, ‘testCurve’ is the name of the curve we’ve defined above, without the variable, -1 is the lower bound for our independent variable, and 1 is the upper bound.  Replace these as needed.
The following cell will not compile until you have compiled the previous cell! That is, you must define the curve first (in addition to the Module ‘evoluteManipulate’). The same goes for later cells which call testCurve.

evolute[testCurve,t]
evoluteManipulate[testCurve,-1,1]

Finally, the function ‘evoluteLines’ plots your curve, its evolute, and as many of the normal line segments as you like.
We call this by writing evoluteLines[<curve>,<tMin>,<tMax>,<lineCount>], where <curve> is the name of your curve without the variable, <tMin> is the lower bound for the independent variable, <tMax> is the upper bound for the independent variable, and <lineCount> is the number of line segments you want to see.
For instance, assuming the above cells have been compiled, we can plot testCurve with t ranging from -1 to 1, along with 60 lines connecting our curve to its evolute.

evoluteLines[testCurve,-1,1,60]

Your code
Type your code below (or just copy the code from above and substitute as needed).
Remember that you can compile a code cell using ‘Shift+Enter’.
Warning: Don’t type code directly into this cell, as it only accepts text.  Type your code in a new cell below.