logo

3차원 공간의 토러스의 좌표조각사상 📂기하학

3차원 공간의 토러스의 좌표조각사상

공식1

torus.png

중심에서 튜브까지의 거리가 $R$, 튜브의 지름이 $r$인 토러스좌표조각사상은 다음과 같다.

$$ \mathbf{x}(u_{1}, u_{2}) = \left( (R + r\cos u_{2})\cos u_{1}, (R + r\cos u_{2})\sin u_{1}, r\sin u_{1} \right) $$

이때 $(u_{1}, u_{2}) \in [0, 2\pi) \times [0, 2\pi)$이다.

코드

위의 그림을 그리는 줄리아 코드는 다으뫄 같다.

using Plots
Plots.plotly() 

r₁ = 3
r₂ = 1
N = 100
torus(u) = [(r₁ + r₂*cos(u[1]))cos(u[2]), (r₁ + r₂*cos(u[1]))sin(u[2]), r₂*sin(u[1])]
    
X = Vector(0:2pi/N:2pi)
Y = Vector(0:2pi/N:2pi)
U = [[X[i], Y[j]] for i∈1:N for j∈1:N]
xyz = zeros(3,N^2)
M = torus.(U)
for i ∈1:N^2
    xyz[:,i] = M[i]
end

scatter(xyz[1,:], xyz[2,:], xyz[3,:], label="", markersize=0.6, markeropacity=0.3, markercolor=:Black, camera=(0,16))
savefig("torus.html")

  1. Richard S. Millman and George D. Parker, Elements of Differential Geometry (1977), p86 ↩︎