토러스의 제어 망
Oct 27 2020
토러스의 완전한 제어 망을 만들고 싶습니다. 그러나 그물은 닫혀 있지 않습니다. 누구든지이 문제를 해결할 수 있습니까?
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]]
답변
2 creidhne Nov 04 2020 at 00:27
Ulrich의 솔루션은 질문에 완전히 답하지만 BSpliceFunction. 표면이 토러스가 아니고 내부 반경에 끊어짐이 있습니다 (부드러워 야하는 날카로운 그림자가 있음). pts6Ulrich의 솔루션과 f질문에서 사용하십시오 .
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}]]
위의 뷰는 메쉬의 간격이 고르지 않고 표면이 토러스가 아님을 보여줍니다. 횡단면이 원형이 아닙니다.
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"]
옵션 BSplineFunction과 함께 를 사용할 때 SplineClosed제어점을 닫으면 안됩니다. BSpineFunction경계를 연결하여 표면을 완성합니다. f2중복 된 끝점을 제거하기 위해 스플라인 기능을 재정 의하여 문제를 해결합니다 . 결과는 토러스입니다.
f2 = BSplineFunction[Most[pts6][[All, ;; -2]], SplineClosed -> {True, True}];
ParametricPlot3D[f2[s, t], {s, 0, 1}, {t, 0, 1}, ViewPoint -> {0, 0, \[Infinity]}
다음은 원본 그래픽과 비교하여 원환 체가있는 제어점의 수정 된보기입니다.
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
제어점의 정의가 잘못되었습니다. {s,-Pi,Pi}inside 는 마지막 점을 포함하지 않는 Tables-grid {_pi,-Pi+1,-Pi+2,...}를 만듭니다 Pi.
제어점을 다음으로 재정의하십시오.
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]}]