Skip to content

Instantly share code, notes, and snippets.

@stephensekula
Created June 23, 2017 16:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephensekula/09b8050efd066e33b86b1073f620552f to your computer and use it in GitHub Desktop.
Save stephensekula/09b8050efd066e33b86b1073f620552f to your computer and use it in GitHub Desktop.
A visualization of circle-compactified 5-D Kaluza-Klein extra dimensions.
from vpython import *
import math
# Create a display
scene2 = canvas(title='Kaluza-Klein Extra Dimensions - 5D',
x=0, y=0, width=1024, height=768,
center=vector(0,-20,0), background=vector(0,0,0))
# Draw a series of parallel lines in the xy plane
gridlines=[]
L=100
H=0.1
W=0.1
for y0 in range(-25,26):
x0=0
z0=0
gridlines.append(box(pos=vector(x0,y0,z0), length=L, height=H, width=W))
for x0 in range(-25,26):
y0=0
z0=0
gridlines.append(box(pos=vector(x0,y0,z0), axis=vector(0,1,0), length=L, height=H, width=W))
# Now draw the curled up extra dimension at each grid point
extradimensions=[]
for y0 in range(-25,26):
for x0 in range(-25,26):
z0=0.40
T=0.05
R=abs(z0-T)
extradimensions.append(ring(pos=vector(x0,y0,z0), axis=vector(0,1,0), radius=R,thickness=T))
@stephensekula
Copy link
Author

stephensekula commented Jun 23, 2017

This code generates this image. In the current incarnation of this code, the visualization appears in a browser window. One can then zoom and rotate to get a nice view. Here is an example of one, screen-captured and cropped.
extradimensions_5d_visualized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment