I have a shape given by

```
triangleTransform((Theta)_) :=
{2*Cos((Theta)) + Cos(2*(Theta)), 2*Sin((Theta)) - Sin(2*(Theta))};
triangle =
ParametricPlot(
triangleTransform((Theta)),
{(Theta), 0, 2*Pi}, PlotRange -> All, Axes -> None) /. L_Line :> GeometricTransformation(L, ScalingTransform({2, 1})) /. Line(l_List) :> {{LightGray, Polygon(l)}, {LightGray, Line(l)}}
```

I want to ‘extrude’ this shape along the path given by

```
path(u_) :=
{(5/6)*u*Sin(u), (5/6)*u*Cos(u), (5/18)*u};
{uStart, uEnd} = {0, 3*Pi};
gPath =
ParametricPlot3D(path(u), {u, uStart - 0.2, uEnd + 0.2});
```

I want the extrusion to taper from `0`

at the origin (i.e., the tightest part of the spiral) to some given scalar `s`

at the end of the line, with the sharpest vertex of the triangle pointing inwards at all times.

I am trying to build on the ticked answer here (link). I can build a new path easily enough, using the shape provided:

```
(*Create a path*)
path(u_) := {(5/6)*u*Sin(u), (5/6)*u*Cos(u), (5/18)*u};
{uStart, uEnd} = {0, 3*Pi};
gPath = ParametricPlot3D(path(u), {u, uStart - 0.2, uEnd + 0.2});
(*Build a straight-sided polygon - I CAN'T WORK OUT HOW TO APPLY MY triangle HERE.*)
list = {{0, 0}, {0, 15}, {7, 13}, {2, 13}, {2, 5}, {5, 5}, {5, 3}, {2, 3}, {2, 0}};
scale = 0.05;
transxy = {-0.05, -0.25};
(nlist = (Plus(transxy, #) & /@ (scale*list))) // Graphics({Black, Polygon(#)}, Axes -> True, AxesOrigin -> {0, 0}) &;
(*To extrude the polygon along the path, we need to rotate the 2D
polygon in the 3D space such that its (x,y) axes match respectively
the (normal, binormal) axes of the frenet trihedron along the curve.
The z axis will have to match the tangent of the curve in order this
tangent to be perpendicular to the polygon surface as requested by
the OP). We also need to translate the rotated polygon to its
corresponding position along the path. All this can be simply
achieved with:*)
frenet(u_) = FrenetSerretSystem(path(u), u)((2));
transform(u_) := Composition(TranslationTransform(path(u)),
FindGeometricTransform(frenet(u), {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}})((2)))
(*Number of extrusion points*)
nint = 100;
allpoints =
Table(transform(u) /@ (nlist /. {x_, y_} -> {x, y, 0}),
{u, uStart, uEnd, (uEnd - uStart)/nint});
(*You can attempt to draw directly the surface passing through all
the "extruded" points with the function BSplineSurface:*)
Graphics3D({FaceForm(GrayLevel(0.8)), Polygon(({First(#1), Last(#1)} & )(allpoints)),
(BSplineSurface(#1, SplineDegree -> 1) & ) /@
Partition(Transpose(Join(allpoints, List /@ allpoints((All,1)), 2)), 2, 1)},
Lighting -> "Neutral")
```

This produces the original 2D shape, now extruded over my chosen path:

My questions are:

- How do I replace the 2D shape with
`triangle`

?
- How to I create the taper from size
`0`

to `s`

?

Many thanks for all your help on this and other questions. I very much appreciate it: I’m enjoying learning from the masters!