Ulrich's solution fully answers the question, however, there's a problem with the surface created by BSpliceFunction
. Notice that the surface is not a torus, and there's a break at the interior radius (there's a sharp shadow which should be smooth). Use pts6
from Ulrich's solution, and f
from the question.
pts6 = Table[{(2 + Cos[t])*Cos[s], (2 + Cos[t])*Sin[s], Sin[t]}, {s,
Subdivide[-Pi, Pi, 6]}, {t, Subdivide[-Pi, Pi, 6]}];
f = BSplineFunction[pts6, SplineClosed -> {True, True}];
g1 = Show[Graphics3D[{PointSize[Large], Black, Map[Point, pts6]}],
Graphics3D[{Thick, Gray, Line[pts6], Line[Transpose[pts6]]}],
ParametricPlot3D[f[s, t], {s, 0, 1}, {t, 0, 1}]]

The view from above shows the mesh is unevenly spaced and the surface is not a torus. The cross-section is not circular.
ParametricPlot3D[f[s, t], {s, 0, 1}, {t, 0, 1},
ViewPoint -> {0, 0, \[Infinity]},
PlotLabel -> "non-toroidal surface"]

ParametricPlot3D[f[s, t], {s, 0, 1}, {t, 0, 1},
RegionFunction -> Function[{x, y, z, u, v}, 0 <= y <= 2],
BoundaryStyle -> Black, Axes -> True,
PlotLabel -> "non-circular cross-section"]

When we use the BSplineFunction
with the SplineClosed
option, the control points must not be closed. BSpineFunction
completes the surface by connecting the boundaries. Fix the problem by redefining the spline function as f2
to remove the redundant end points. The result is a torus.
f2 = BSplineFunction[Most[pts6][[All, ;; -2]], SplineClosed -> {True, True}];
ParametricPlot3D[f2[s, t], {s, 0, 1}, {t, 0, 1}, ViewPoint -> {0, 0, \[Infinity]}

Here's the corrected view of the control points with the torus, compared to the original graphic.
g2 = Show[Graphics3D[{PointSize[Large], Black, Map[Point, Most@pts6]}],
Graphics3D[{Thick, Gray, Line[pts6], Line[Transpose[pts6]]}],
ParametricPlot3D[f2[s, t], {s, 0, 1}, {t, 0, 1}]]
