Flowing Klein Bottle Surface Mesh

Build a self-intersecting 4D Klein bottle projection in Minecraft using rotating command markers and color-shifting particle streams without any mods.

Java EditionParticle ArtExpert24 commandsTested on a real 26.2 & 26.3 server
Multicolored particle streams trace a geometric shape hovering above a glowing obsidian pedestal at night. Download the GIF Video & GIF © www.9minecraft.net

Math CurvesSpaceMysticTechnologyRainbowWhitePurpleLearningDecorationServer LobbyItem displaysSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

A Klein bottle is a non-orientable four-dimensional surface where the inside seamlessly flows into the outside. In this command creation, a rotating 3D figure-8 immersion of a Klein bottle hovers above an obsidian pedestal, woven from eight glowing, color-shifting particle streams that trace the manifold in real time.

By combining local ^ ^ ^ caret coordinates with synchronized rotation speeds and phase-shifted scoreboard timers, four invisible tracer entities sweep out a continuous topological mesh of cyan, magenta, gold, and lime gradients while a central 4D core pulses at the self-intersection point.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /scoreboard objectives add c9_phase dummy
  3. /fill ~-2 ~ ~-2 ~2 ~ ~2 minecraft:crying_obsidian
  4. /setblock ~ ~ ~ minecraft:sea_lantern
  5. /summon minecraft:marker ~ ~7 ~ {Tags:["c9_kb","c9_core"],Rotation:[0f,0f]}
  6. /summon minecraft:marker ~ ~7 ~ {Tags:["c9_kb","c9_u","c9_u0"],Rotation:[0f,-90f]}
  7. /summon minecraft:marker ~ ~7 ~ {Tags:["c9_kb","c9_u","c9_u1"],Rotation:[90f,0f]}
  8. /summon minecraft:marker ~ ~7 ~ {Tags:["c9_kb","c9_u","c9_u2"],Rotation:[180f,90f]}
  9. /summon minecraft:marker ~ ~7 ~ {Tags:["c9_kb","c9_u","c9_u3"],Rotation:[-90f,0f]}
  10. /summon minecraft:item_display ~ ~7 ~ {Tags:["c9_kb","c9_disp"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:amethyst_Cluster",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,-0.4f,0f],scale:[1.6f,1.6f,1.6f]}}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /scoreboard players add @e[tag=c9_kb] c9_t 1
  2. /execute as @e[tag=c9_core,scores={c9_t=1}] run scoreboard players set @e[tag=c9_u0] c9_phase 0
  3. /execute as @e[tag=c9_core,scores={c9_t=1}] run scoreboard players set @e[tag=c9_u1] c9_phase 30
  4. /execute as @e[tag=c9_core,scores={c9_t=1}] run scoreboard players set @e[tag=c9_u2] c9_phase 60
  5. /execute as @e[tag=c9_core,scores={c9_t=1}] run scoreboard players set @e[tag=c9_u3] c9_phase 90
  6. /execute as @e[tag=c9_u] run scoreboard players add @s c9_phase 1
  7. /execute as @e[tag=c9_u,scores={c9_phase=120..}] run scoreboard players set @s c9_phase 0
  8. /execute as @e[tag=c9_u,scores={c9_phase=0..59}] at @s run tp @s ~ ~ ~ ~4 ~3
  9. /execute as @e[tag=c9_u,scores={c9_phase=60..119}] at @s run tp @s ~ ~ ~ ~4 ~-3
  10. /execute as @e[tag=c9_u] at @s rotated ~ 0 positioned ^ ^ ^3.4 rotated as @s run particle minecraft:dust_color_transition{from_color:[0.0,0.95,1.0],to_color:[0.95,0.1,1.0],scale:1.4} ^ ^ ^1.7 0.05 0.05 0.05 0 2 force
  11. /execute as @e[tag=c9_u] at @s rotated ~ 0 positioned ^ ^ ^3.4 rotated as @s run particle minecraft:dust_color_transition{from_color:[0.95,0.1,1.0],to_color:[0.0,0.95,1.0],scale:1.4} ^ ^ ^-1.7 0.05 0.05 0.05 0 2 force
  12. /execute as @e[tag=c9_u] at @s rotated ~ 0 positioned ^ ^ ^3.4 rotated as @s run particle minecraft:dust_color_transition{from_color:[1.0,0.85,0.1],to_color:[0.1,1.0,0.45],scale:1.3} ^ ^1.7 ^ 0.05 0.05 0.05 0 2 force
  13. /execute as @e[tag=c9_u] at @s rotated ~ 0 positioned ^ ^ ^3.4 rotated as @s run particle minecraft:dust_color_transition{from_color:[0.1,1.0,0.45],to_color:[1.0,0.85,0.1],scale:1.3} ^ ^-1.7 ^ 0.05 0.05 0.05 0 2 force
  14. /execute as @e[tag=c9_u] at @s rotated ~ 0 positioned ^ ^ ^3.4 rotated as @s run particle minecraft:end_rod ^1.1 ^ ^ 0 0 0 0.01 1 force

How it works

Frames from the test run

Flowing Klein Bottle Surface Mesh - frame 1Flowing Klein Bottle Surface Mesh - frame 2Flowing Klein Bottle Surface Mesh - frame 3

Recorded on our own test server: 55 frames at about 9.1 fps. Our image check saw: Colorful curving particle streams and a horizontal white particle ring hover and rotate above a crying obsidian pedestal with a sea lantern center at night.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Create a flat clearing and stand where you want the center of the Klein bottle pedestal to be.
  2. Run each command from the Setup list once in chat (or place them in a chain of impulse command blocks) to create the scoreboards, obsidian base, and 4D projection markers.
  3. Place 14 Repeating Command Blocks (or 1 Repeating Command Block leading into 13 Chain Command Blocks), all set to Always Active.
  4. Paste the Loop commands in order into the command blocks.
  5. Set the time to night (<code>/time set midnight</code>) to see the glowing cyan, magenta, gold, and lime particle streams weave the self-intersecting surface.

Use it with real players

To make the Klein bottle mesh follow a player as an arcane 4D aura, add a repeating command block running /execute at @p run tp @e[tag=c9_kb] ~ ~3 ~ without overriding the entities' rotation (use /execute as @e[tag=c9_kb] at @p run tp @s ~ ~3 ~ ~ ~).

Remove it again 4 commands

  1. /kill @e[tag=c9_kb]
  2. /fill ~-2 ~ ~-2 ~2 ~ ~2 minecraft:air
  3. /scoreboard objectives remove c9_t
  4. /scoreboard objectives remove c9_phase

FAQ

Why does the loop reverse pitch every 60 ticks instead of rotating continuously?

Minecraft hard-clamps entity pitch between -90 degrees (straight up) and +90 degrees (straight down). Bouncing pitch smoothly between -90 and +90 over 120 ticks while yaw rotates continuously produces the exact cosine elevation wave needed for a figure-8 Klein bottle immersion.

Will this lag my server if I leave it running?

No. The entire surface mesh uses only 6 entities total (5 invisible markers and 1 glowing crystal core), and all particles decay naturally within a couple of seconds.

Commands used

/execute/fill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides