Harmonic Pendulum Wave Array

Twenty glowing sea lantern orbs suspended on chains swing at offset speeds, drifting through serpentine waves, double helices, and chaos before realigning.

Java EditionComplex Contraptions & CinematicsMedium24 commandsTested on a real 26.2 & 26.3 server
Twenty glowing sea lanterns swing in a harmonic pendulum wave pattern inside a dark frame. Download the GIF Video & GIF © www.9minecraft.net

SimulationsTechnologyMysticCyanGoldWhiteLearningDecorationServer LobbyBlock displaysSmooth animation (interpolation)Riding & passengersBlock building (fill/setblock/clone)Rotation math21+ commands

The Harmonic Pendulum Wave Array recreates the classic physics demonstration inside Minecraft using twenty block display entities. Suspended from a dark oak and gold overhead gantry, each glowing sea lantern orb hangs from an iron chain and swings back and forth at a slightly faster frequency than the one before it.

As the pendulums swing, their phase differences create shifting optical illusions: travelling serpentine waves, alternating double helices, and apparent chaos, before all twenty orbs smoothly realign into a single straight row. Colored dust particles and musical chimes mark each time an orb crosses the center line.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_phase dummy
  2. /scoreboard objectives add c9_freq dummy
  3. /scoreboard objectives add c9_dir dummy
  4. /scoreboard objectives add c9_tmp dummy
  5. /fill ~-10 ~11 ~ ~10 ~11 ~ dark_oak_wood
  6. /fill ~-10 ~ ~-3 ~-10 ~11 ~3 stripped_dark_oak_log
  7. /fill ~10 ~ ~-3 ~10 ~11 ~3 stripped_dark_oak_log
  8. /fill ~-9 ~ ~-2 ~9 ~ ~2 polished_blackstone_slab[type=bottom]
  9. /summon marker ~-9.5 ~11 ~ {Tags:["c9_spawner"]}
  10. /scoreboard players set #next_freq c9_freq 280

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

  1. /execute as @e[type=marker,tag=c9_spawner] at @s if score #next_freq c9_freq matches ..394 run summon block_display ~ ~ ~ {Tags:["c9_pend","c9_init"],Glowing:1b,glow_color_override:65535,teleport_duration:1,interpolation_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:[0.7f,0f,0f,-0.35f,0f,0.7f,0f,-6.85f,0f,0f,0.7f,-0.35f,0f,0f,0f,1f],Passengers:[{id:"minecraft:block_display",Tags:["c9_pend","c9_chain"],interpolation_duration:1,block_state:{Name:"minecraft:chain"},transformation:[0.3f,0f,0f,-0.15f,0f,6.5f,0f,-6.5f,0f,0f,0.3f,-0.15f,0f,0f,0f,1f]}]}
  2. /execute as @e[type=block_display,tag=c9_init] at @s run setblock ~ ~ ~ gilded_blackstone
  3. /execute as @e[type=block_display,tag=c9_init] run scoreboard players operation @s c9_freq = #next_freq c9_freq
  4. /execute as @e[type=block_display,tag=c9_init] run scoreboard players set @s c9_phase -5000
  5. /execute as @e[type=block_display,tag=c9_init] run scoreboard players set @s c9_dir 1
  6. /execute if entity @e[type=block_display,tag=c9_init] run scoreboard players add #next_freq c9_freq 6
  7. /execute if entity @e[type=block_display,tag=c9_init] as @e[type=marker,tag=c9_spawner] at @s run tp @s ~1 ~ ~
  8. /tag @e[type=block_display,tag=c9_init] remove c9_init
  9. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] if score @s c9_dir matches 1 run scoreboard players operation @s c9_phase += @s c9_freq
  10. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] if score @s c9_dir matches -1 run scoreboard players operation @s c9_phase -= @s c9_freq
  11. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] if score @s c9_phase matches 5000.. run scoreboard players set @s c9_dir -1
  12. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] if score @s c9_phase matches ..-5000 run scoreboard players set @s c9_dir 1
  13. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] at @s store result entity @s Rotation[1] float 0.008 run scoreboard players get @s c9_phase
  14. /execute as @e[type=block_display,tag=c9_pend,tag=!c9_chain] at @s rotated ~ 0 positioned ^ ^-6.5 ^1.8 run particle dust{color:[0.2,0.9,1.0],scale:0.9} ~ ~ ~ 0.05 0.05 0.05 0 1 force

How it works

Frames from the test run

Harmonic Pendulum Wave Array - frame 1Harmonic Pendulum Wave Array - frame 2Harmonic Pendulum Wave Array - frame 3

Recorded on our own test server: 53 frames at about 7.5 fps. Our image check saw: Twenty glowing sea lantern block displays swing in a harmonic wave pattern inside a dark oak and gilded blackstone frame, though no iron chains are visible.

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. Stand at the center of a flat open area with at least 12 blocks of clearance on all sides and 15 blocks of air above.
  2. Run each of the 10 setup commands once in chat to build the dark oak gantry frame, scoreboard objectives, and spawner marker.
  3. Place 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks), all set to Always Active.
  4. Paste the 14 loop commands in order into the command blocks.
  5. Watch the spawner populate the 20 pendulums along the top beam and immediately begin the harmonic wave cycle.
  6. Switch the time to night for the best contrast with the glowing sea lantern orbs and cyan particle trails.

Remove it again 7 commands

  1. /kill @e[tag=c9_pend]
  2. /kill @e[tag=c9_spawner]
  3. /fill ~-10 ~ ~-3 ~10 ~11 ~3 air
  4. /scoreboard objectives remove c9_phase
  5. /scoreboard objectives remove c9_freq
  6. /scoreboard objectives remove c9_dir
  7. /scoreboard objectives remove c9_tmp

FAQ

How do both the chain and the orb swing without teleporting them every tick?

Both the orb and the chain have their display transformation offset downward from the entity's pivot point on the top beam. Rotating the parent display entity's pitch swings the offset model in a clean arc.

Can I change the speed or widen the swing arc of the pendulums?

Yes. Increase the 0.008 multiplier in loop command 13 to widen the swing angle, or adjust the #next_freq step in loop command 6 to change how quickly the waves drift apart.

Commands used

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

Similar creations

Join 9Minecraft News & Guides