SOCR ≫ | TCIU Website ≫ | TCIU GitHub ≫ |
So far, we considered spacekime as 5D Euclidean space where the 2D kime is a flat space. Does it make sense to generalize kime to a non-Euclidean manifold and what is the rationale and meaning of a curved kime manifold?
We saw earlier the geometric representation of the flat spacekime using conical shapes. Let’s start with some visualization of the non-Euclidean 2D kime manifold representing the axial (transverse) planes, and the spatial dimensions are compressed into the 1D vertical axis.
library(plotly)
library(ggplot2)
# Define a vase-generating function (2D), which will be rotated to form curved kime manifold
<- data.frame( s=seq(0, 1.3, length.out = 200) )
kime.manifold $theta <- seq(0, 2*pi, length.out = 200)
kime.manifold<- function (t) { sqrt(t^3-2.09*t^2+1.097*t) }
g <- function (t) { t }
h
# rendering (u==s, v==theta) parametric surfaces requires x,y,z arguments to be 2D arrays
# In out case, the three coordinates have to be 200*200 parameterized tensors/arrays
<- g(kime.manifold$s) %o% cos(kime.manifold$theta)
x2 <- g(kime.manifold$s) %o% sin(kime.manifold$theta)
y2 <- h(kime.manifold$s) %o% rep(1, 200)
z2 #2D plot data
<- g(kime.manifold$s) %o% cos(kime.manifold$theta)
xx2 <- rep(0,200*200)
yy2 <- h(kime.manifold$s) %o% rep(1, 200)
zz2
# calculate the diameter of every circle
<-as.vector(xx2)
xxx2<-as.vector(zz2)
zzz2<-data.frame(zzz2,xxx2)
newdata<-as.matrix(zzz2)
zzzz2
#calculate every diameter
=vector()
afor(i in 1:200){
=max(newdata[which(zzz2==zzzz2[i,]),2])
t=c(a,t)
a
}#text the diameter and height of every circle
# phases
<- matrix(NA, nrow=200, ncol=200)
phi for (i in 1:200) {
for (j in 1:200) phi[i,j] <- kime.manifold$theta[j]
}
<- cbind(radius=a, height=zzz2[1:200], phi=phi[ ,1:200]); # tail(mytext)
mytext <- matrix(NA, nrow=200, ncol=200)
custom_txt for (i in 1:200) {
for (j in 1:200) {
<- paste(' x: ', round(mytext[i, 2], 3),
custom_txt[i,j] '\n r: ', round(mytext[i, 1], 3),
'\n phi: ', round(kime.manifold$theta[j], 3))
}
}
# Define kime-curve parameter
<- g(kime.manifold$s) * cos(kime.manifold$theta)
xCurve <- g(kime.manifold$s) * sin(kime.manifold$theta)
yCurve <- h(kime.manifold$s)
zCurve
<- data.frame(xCurve, yCurve, zCurve)
kimeCurve
#plot 2D into 3D and make the text of the diameter (time), height (r), and phase (phi)
<- list(family = "Courier New, monospace", size = 18, color = "black")
f <- list(title = "k1", titlefont = f)
x <- list(title = "k2", titlefont = f)
y <- list(title = "space (x)", titlefont = f)
z
plot_ly(kimeCurve, x = ~xCurve, y = ~yCurve, z = ~zCurve, type = 'scatter3d',
mode = 'lines', showlegend = F, # name="Kime-space curve projection on Kime-surface",
line = list(width = 22), name="SK curve") %>%
add_trace(x = ~xx2, y = ~yy2, z = ~zz2, type = "surface", name="Spacekime leaf",
text = custom_txt, hoverinfo = "text", showlegend = FALSE) %>%
add_trace(x=~x2, y=~y2, z=~z2, name="SK manifold",
colors = c("blue", "yellow"),type="surface",
opacity=0.5, showscale = FALSE, showlegend = FALSE) %>%
# trace the main Z-axis
add_trace(x=0, y=0, z=~zz2[, 1], type="scatter3d", mode="lines",
line = list(width = 10, color="navy blue"), name="Space(x)",
hoverinfo="none", showlegend = FALSE) %>%
layout(dragmode = "turntable", title = "Non-Euclidean Kime Manifold (1D space, 2D kime)",
scene = list(xaxis = x, yaxis = y, zaxis = z), showlegend = FALSE)