kontrol bersih dari torus

Oct 27 2020

Saya ingin membuat jaring kendali penuh torus. Namun, jaring tidak ditutup. Adakah yang bisa memecahkan masalah ini?

pts6 = Table[{(2 + 1 Cos [s])*Cos [t], (2 + 1 Cos [s])*Sin[t], 1 Sin[s]},
  {s, -Pi, Pi}, {t, -Pi, Pi}];
f = BSplineFunction[pts6, SplineClosed -> {True, True}];
Show[
  Graphics3D[{PointSize[Large], Black, Map[Point, pts6]}],
  Graphics3D[{Gray, Line[pts6], Gray, Line[Transpose[pts6]]}],
  ParametricPlot3D[f[s, t], {s, 0, 1}, {t, 0, 1}, AxesLabel -> Automatic]]

] 1

Jawaban

2 creidhne Nov 04 2020 at 00:27

Solusi Ulrich sepenuhnya menjawab pertanyaan tersebut, namun, ada masalah dengan permukaan yang dibuat oleh BSpliceFunction. Perhatikan bahwa permukaannya bukan torus, dan ada jeda pada radius interior (ada bayangan tajam yang seharusnya mulus). Gunakan pts6dari solusi Ulrich, dan fdari pertanyaan.

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}]]

Pemandangan dari atas menunjukkan jarak jala tidak rata dan permukaannya bukan torus. Penampang tidak melingkar.

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"]

Saat kami menggunakan opsi BSplineFunctionwith SplineClosed, titik kontrol tidak boleh ditutup. BSpineFunctionmelengkapi permukaan dengan menghubungkan batas-batas. Perbaiki masalah dengan mendefinisikan kembali fungsi spline f2untuk menghilangkan titik akhir yang berlebihan. Hasilnya adalah torus.

f2 = BSplineFunction[Most[pts6][[All, ;; -2]], SplineClosed -> {True, True}];
ParametricPlot3D[f2[s, t], {s, 0, 1}, {t, 0, 1}, ViewPoint -> {0, 0, \[Infinity]}

Berikut tampilan titik kontrol yang dikoreksi dengan torus, dibandingkan dengan grafik aslinya.

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}]]

1 UlrichNeumann Oct 27 2020 at 18:08

Definisi titik kendali salah. {s,-Pi,Pi}inside Tablemembuat s-grid {_pi,-Pi+1,-Pi+2,...}yang tidak berisi titik terakhir Pi.

Tentukan ulang titik kontrol menjadi

pts6 = Table[{(2 + 1 Cos[s])*Cos[t], (2 + 1 Cos[s])*Sin[t],1 Sin[s]}, {s, Subdivide[-Pi, Pi, 10]}, {t,Subdivide[-Pi, Pi, 10]}]