# The Lapacian on the 2-Torus

In this blog post I want to describe the explicit computation of the Laplacian on differential forms on the $$2$$-Torus $$T^2\subset \mathbb{R}^3$$. This surface can be obtained by rotating the circle $$(x-a)^2+y^2=r^2$$ around the $$z$$-axis ($$0<r<a$$). Locally, this surface can be parametrized by the equations $x = (a+r\cos u)\cos v,\\ y = (a+r\cos u)\sin v,\\ z = r\sin u,$

where $$0<u,v<2\pi$$.

Remark: Note that, topologically, $$T^2$$ can be identified with the product of two circles. In particular, it is a Lie group.

## Visualization

Let us use this local parametrization to visualize the 2-torus for $$a=4$$ and $$r=1$$.

a <- 4
r <- 1

# Parameter defining how many points to take.
frac_density <- 0.03
# Get parameter grid.
u_seq <- seq(from = 0, to = 2*pi, by = frac_density)
v_seq <- seq(from = 0, to = 2*pi, by = frac_density)

# Generate surface from local coordinates.
local_parametrization <- function(a, r, u, v) {

x <- (a + r*cos(u))*cos(v)
y <- (a + r*cos(u))*sin(v)
z <- r*sin(u)

local_chart <- list(x = x, y = y, z = z)
local_chart_df <- data.frame(local_chart)

return(local_chart_df)
}

coordinates_df <- expand.grid(... = u_seq, v_seq)
colnames(coordinates_df) <- c("u", "v")

local_parametrization_list <- apply(
X = coordinates_df,
MARGIN = 1,
FUN = function(x) {local_parametrization(a = a, r = r, u = x[1] , v = x[2])}
)

local_parametrization_df <- do.call(what = rbind, args = local_parametrization_list)
rownames(local_parametrization_df) <- c(1:nrow(local_parametrization_df))

Now we use a 3d-scatter plot:

library(plotly)

p <- plot_ly(
data = local_parametrization_df,
x = ~ x,
y = ~ y,
z = ~ z,
color = ~ z
)

layout(p = p, scene = list(zaxis = list(range = c(-4,4))))