# Changing cross section of 3D plot of a 2D parametrization

I am working on a project where we are investigating the effect different shaped drum borders have on the sound the drum makes. It is relatively easy to do the mathematical calculations with different shaped borders, and in actuality, we can do them with almost any simple closed curve defined as the border that has a parametrization. Obviously we would like to compare our calculations with real world experiments, and so we would like to 3D print the borders we are using in Mathematica so that they can be the same shape. In order to maintain tension in the drum, we need these borders to have a 'wedge' side and a 'groove' side, so that they can pinch the drum.

Right now, I have a function that produces a 3D-printable object using ParametricPlot3D:

(* x,y are the HEADS of the parametric functions *)
print3Dborder[{{x_, y_}, {umin_, umax_}}, height_, thickness_] :=
ParametricPlot3D[{x[u], y[u], z}, {u, umin, umax}, {z, 0, height},
PlotStyle -> Thickness[thickness], PlotPoints -> 50, Mesh -> None, Boxed->False,Axes->False]


e.g Unit Circle: print3Dborder[{{Cos,Sin},{0,2Pi}},0.05,0.05] produces This works well, but it only gives me rectangular cross sections (height x thickness rectangles).

I need a way to transfer a 2D parametrization of a simple closed curve into a 3D-printable object that has cross sections similar to the ones shown below. (The printable object should be two separate halves.) Ideally, I would have as much variability as possible in the shape of the cross sections just in case the cross section is not meeting our needs.

• Have you seen this? – J. M. will be back soon Jul 11 '16 at 15:57
• No, I haven't. Thank you – Tom Jul 11 '16 at 16:09

You can try the code bellow:

print3Dborder[heigth_, radius_] := Block[{max, min, a, b, c, d},
height = 1.;
max = (radius + Cos[v]) Cos[u] /. u -> 0 /. v -> 0;
min = (radius + Cos[v]) Cos[u] /. u -> 2 Pi /. v -> Pi;
a = ParametricPlot3D[{(radius + Cos[v]) Cos[
u], (radius + Cos[v]) Sin[u], Sin[v]}, {u, 0, 2 Pi}, {v, 0,
Pi}, PlotPoints -> 50, Mesh -> None];
b = ParametricPlot3D[{min Cos[u], min Sin[u], z}, {u, 0,
2 Pi}, {z, -heigth, 0}, PlotPoints -> 50, Mesh -> None];
c = ParametricPlot3D[{max Cos[u], max Sin[u], z}, {u, 0,
2 Pi}, {z, -heigth, 0}, PlotPoints -> 50, Mesh -> None];
d = ParametricPlot3D[{(radius + Cos[v]) Cos[
u], (radius + Cos[v]) Sin[u], -heigth}, {u, 0, 2 Pi}, {v, 0,
Pi}, PlotPoints -> 50, Mesh -> None];
Show[a, b, c, d, PlotRange -> All]
]
print3Dborder[1, 5]