# How to define a "tubular" region in 2D which follows a parametrically defined path

If I have a parametric function in 2D e.g. v[t_]:={Cos[t],Sin[t]} how can I build a ribbon-like Region which is defined by "Extruding" this path a small distance d normal to the path on either side? In the case of a circular path one would get a thin ring like region, but the method to create the ribbon needs to deal with more complex paths e.g.

 v[t_] := {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]}


I can find ways to compute the normal fields along the curve but how can one find a way to make a region between the outer and inner curves

ParametricPlot[v[t], {t, 0, 2 \[Pi]}]

normalArrowsout =
Table[Arrow[
TranslationTransform[{v[\[Theta]][[1]], v[\[Theta]][[2]]}] /@ {{0,
0}, -0.1 Cross[
Normalize[{v'[\[Theta]][[1]],
v'[\[Theta]][[2]]}]]}], {\[Theta], 0, 360 \[Degree],
4 \[Degree]}];

normalArrowsin =
Table[Arrow[
TranslationTransform[{v[\[Theta]][[1]], v[\[Theta]][[2]]}] /@ {{0,
0},
0.1 Cross[
Normalize[{v'[\[Theta]][[1]],
v'[\[Theta]][[2]]}]]}], {\[Theta], 0, 360 \[Degree],
4 \[Degree]}];

ParametricPlot[v[t], {t, 0, 2 \[Pi]}, Epilog -> normalArrowsout]
ParametricPlot[v[t], {t, 0, 2 \[Pi]}, Epilog -> normalArrowsin]

normalcoordsout =
Table[TranslationTransform[{v[\[Theta]][[1]],
v[\[Theta]][[2]]}] /@ {-0.1 Cross[
Normalize[{v'[\[Theta]][[1]], v'[\[Theta]][[2]]}]]}, {\[Theta],
0, 360 \[Degree], 4 \[Degree]}];

normalcoordssin =
Table[TranslationTransform[{v[\[Theta]][[1]],
v[\[Theta]][[2]]}] /@ {0.1 Cross[
Normalize[{v'[\[Theta]][[1]], v'[\[Theta]][[2]]}]]}, {\[Theta],
0, 360 \[Degree], 4 \[Degree]}];

ListLinePlot[{Flatten[normalcoordsout, 1],
Flatten[normalcoordssin, 1]}]

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Jun 22, 2023 at 0:08

• Method-1
Clear[reg];
reg = Polygon[
Flatten[normalcoordsout, 1] -> Flatten[normalcoordssin, 1]];
reg // Area
RegionQ[reg]
Graphics[reg]


1.34202.

True

• Method-2
Clear[reg];
reg=ListLinePlot[{Flatten[normalcoordsout, 1],
Flatten[normalcoordssin, 1]}] // BoundaryDiscretizeGraphics
reg//Area


1.34202

• Method-3
Clear[v, plot, reg, dist];
v[t_] = {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
plot = ParametricPlot[v[t], {t, 0, 2 π}];
reg = DiscretizeGraphics[plot];
dist = RegionDistance[reg];
dreg = DiscretizeRegion[ImplicitRegion[dist@{x, y} <= .1, {x, y}]]
dreg // Area


1.34372.

• Method-4
Clear[plot, reg, dist, contours];
v[t_] = {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
plot = ParametricPlot[v[t], {t, 0, 2 π}];
reg = DiscretizeGraphics[plot];
dist = RegionDistance[reg];
contours =
ContourPlot[dist@{x, y} == .1, {x, -2, 2}, {y, -2, 2},
PlotPoints -> 50, MaxRecursion -> 4]
contours // BoundaryDiscretizeGraphics

• Method-5
Clear[plot, reg, dist, domain];
v[t_] = {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
plot = ParametricPlot[v[t], {t, 0, 2 π}];
reg = DiscretizeGraphics[plot];
dist = RegionDistance[reg];
domain =
ContourPlot[dist@{x, y}, {x, -2, 2}, {y, -2, 2}, PlotPoints -> 50,
MaxRecursion -> 4, Contours -> {.1},
DiscretizeGraphics[domain]
% // Area

• Method-6
Clear[plot, reg];
v[t_] = {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
plot = ParametricPlot[v[t], {t, 0, 2 π}];
reg = DiscretizeGraphics[plot];
RegionDilation[reg, .1] // RegionPlot

• Method-7
v[t_] = {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
{τ, ν} = Last[FrenetSerretSystem[v[t], t]] // Simplify;
ParametricPlot[{1 - s, s} . {v[t] - .15 ν, v[t] + .15 ν}, {t,
0, 2 π}, {s, 0, 1}, MeshFunctions -> {#3 &}, Mesh -> 80,
Frame -> False, Axes -> False]


• I am leaving this here to remind myself to upvote - I capped off the max today. Very nice both of them!
– bmf
Commented Jan 11, 2023 at 14:15
• @bmf Thanks! Happy New Year 2023! Commented Jan 11, 2023 at 14:17
• Best wishes for a happy 2023!
– bmf
Commented Jan 11, 2023 at 14:17

This can be achieved very easily using "PlotStyle":

v[t_] := {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};
ParametricPlot[v[t], {t, 0, 7}, PlotStyle -> {Green, Thickness[0.03]}]


v[t_] := {(1 + .2*Cos[3 t])*Cos[t], (1 + .2*Sin[3 t])*Sin[t]};