Self-Inverting Klein Bottle Manifold Flow

A four-dimensional Klein bottle manifold of blue and magenta particles pours streams of glowing liquid energy through its intersecting neck in a closed loop.

Java EditionParticle ArtExpert21 commandsTested on a real 26.2 & 26.3 server
A glowing Klein bottle made of blue and purple particles floats above an obsidian pedestal at night. Download the GIF Video & GIF © www.9minecraft.net

Math CurvesSpaceMysticTechnologyBluePurplePinkLearningDecorationBlock displaysItem displaysGlowing outlinesRotation math21+ commands

Watch a four-dimensional mathematical curiosity come to life in your world. This command setup generates a translucent Klein bottle made of blue, violet, and magenta gradient particles that slowly rotates above a glowing obsidian pedestal. Because a Klein bottle has no distinct inside or outside, streams of cyan and white energy continuously pour out of the top handle, curve through the air, pierce the side wall of the vessel, and rise back up the central core in an endless self-inverting flow.

The effect uses synchronized orbiting marker entities and rotational local coordinates to trace the complex figure-8 immersion and the classic looped neck without needing data packs or hundreds of command blocks.

1. Setup - type these once 7 commands

  1. /scoreboard objectives add c9_t dummy
  2. /summon block_display ~ ~0.2 ~ {Tags:["c9_ent","c9_ped"],Glowing:1b,glow_color_override:39423,block_state:{Name:"minecraft:crying_obsidian"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,0.4f,1.6f],translation:[-0.8f,0f,-0.8f]}}
  3. /summon item_display ~ ~4.5 ~ {Tags:["c9_ent","c9_core"],Glowing:1b,glow_color_override:16711935,item:{id:"minecraft:amethyst_cluster",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.8f,1.8f,1.8f],translation:[0f,0f,0f]}}
  4. /summon marker ~ ~1.5 ~ {Tags:["c9_ent","c9_m","c9_m1"],Rotation:[0f,0f]}
  5. /summon marker ~ ~1.5 ~ {Tags:["c9_ent","c9_m","c9_m2"],Rotation:[90f,0f]}
  6. /summon marker ~ ~1.5 ~ {Tags:["c9_ent","c9_m","c9_m3"],Rotation:[180f,0f]}
  7. /summon marker ~ ~1.5 ~ {Tags:["c9_ent","c9_m","c9_m4"],Rotation:[270f,0f]}

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

  1. /execute as @e[tag=c9_m] at @s run tp @s ~ ~ ~ ~3 ~
  2. /execute as @e[tag=c9_m] at @s run particle dust_color_transition{from_color:[0.0,0.4,1.0],to_color:[0.5,0.0,1.0],scale:1.4} ^ ^1.0 ^2.6 0.1 0.1 0.1 0 2 force
  3. /execute as @e[tag=c9_m] at @s run particle dust_color_transition{from_color:[0.2,0.2,1.0],to_color:[0.8,0.0,1.0],scale:1.5} ^ ^2.8 ^3.2 0.15 0.2 0.15 0 2 force
  4. /execute as @e[tag=c9_m] at @s run particle dust_color_transition{from_color:[0.6,0.0,1.0],to_color:[1.0,0.0,0.6],scale:1.3} ^ ^4.6 ^2.0 0.1 0.15 0.1 0 2 force
  5. /execute as @e[tag=c9_m] at @s run particle dust_color_transition{from_color:[1.0,0.0,0.8],to_color:[0.0,0.8,1.0],scale:1.2} ^ ^6.2 ^0.8 0.08 0.1 0.08 0 2 force
  6. /execute as @e[tag=c9_m] at @s run particle dust_color_transition{from_color:[0.0,0.9,1.0],to_color:[1.0,1.0,1.0],scale:1.2} ^ ^3.2 ^0.3 0.05 0.4 0.05 0 3 force
  7. /execute at @e[tag=c9_m1] run particle soul_fire_flame ^ ^7.4 ^0.9 0.05 0.05 0.05 0.01 2 force
  8. /execute at @e[tag=c9_m1] run particle dust_color_transition{from_color:[0.0,1.0,1.0],to_color:[1.0,0.0,0.8],scale:1.6} ^ ^6.6 ^2.6 0.1 0.1 0.1 0 4 force
  9. /execute at @e[tag=c9_m1] run particle dust_color_transition{from_color:[1.0,0.0,0.8],to_color:[0.0,0.5,1.0],scale:1.6} ^ ^4.5 ^3.6 0.1 0.2 0.1 0 4 force
  10. /execute at @e[tag=c9_m1] run particle end_rod ^ ^2.4 ^2.0 0.08 0.08 0.08 0.02 3 force
  11. /execute at @e[tag=c9_m1] run particle witch ^ ^2.4 ^2.6 0.2 0.2 0.2 0.05 4 force
  12. /execute at @e[tag=c9_m3] run particle dust_color_transition{from_color:[1.0,0.2,0.9],to_color:[0.0,1.0,1.0],scale:1.4} ^ ^1.2 ^1.2 0.1 0.1 0.1 0 3 force
  13. /particle portal ~ ~4.5 ~ 1.5 2.5 1.5 0.6 15 force
  14. /execute as @e[tag=c9_core] at @s run tp @s ~ ~ ~ ~-6 ~

How it works

Frames from the test run

Self-Inverting Klein Bottle Manifold Flow - frame 1Self-Inverting Klein Bottle Manifold Flow - frame 2Self-Inverting Klein Bottle Manifold Flow - frame 3

Recorded on our own test server: 53 frames at about 8.7 fps. Our image check saw: A Klein bottle shape formed by blue, purple, and magenta particles floats above a glowing obsidian block at night, accompanied by glowing crystal and glass entities.

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. Enable command blocks on your world or server and switch to Creative mode.
  2. Stand at the center of a flat open area and run each of the 7 setup commands in chat one by one.
  3. Place a line of 14 Repeating Command Blocks set to Always Active nearby.
  4. Paste one loop command into each repeating command block.
  5. Set the time to night with /time set night to make the glowing cyan and magenta particle transitions stand out.

Use it with real players

To bind the Klein bottle manifold around a real player instead of the stage pedestal, add a command in a repeating block that teleports the markers to the player without overwriting their rotation: /execute at @p run tp @e[tag=c9_m] ~ ~ ~.

Remove it again 2 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_t

FAQ

Why does this creation stay lag-free even though it runs every tick?

Instead of summoning dozens of moving entities every second, it keeps a fixed total of only 6 entities and calculates the 3D manifold curves using local caret coordinates and rotation.

Can I change the colors or size of the Klein bottle?

Yes! Adjust the RGB decimals inside from_color and to_color in the loop commands to change the gradient, or increase the third caret number (^Z) to widen the vessel.

Commands used

/execute/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides