Animated Dual Helix Sine Wave Visualizer

A glowing double helix of sea lanterns and amethyst rolls across the sky, driven by a scoreboard oscillator that computes sine and cosine values each tick.

Java EditionHolograms & Display EntitiesMedium21 commandsTested on a real 26.2 & 26.3 server
Glowing cyan and magenta block strands twist into a double helix between two basalt posts at night. Download the GIF Video & GIF © www.9minecraft.net

Two glowing strands, one of cyan sea lanterns and one of magenta amethyst, twist around a golden axis line seven blocks above the stage. They form a double helix that keeps rolling from one basalt post to the other. Seen from the side, each strand traces a clean sine wave that rises and falls about four blocks.

The motion uses real maths. Four scoreboard commands run a tiny spring simulation, a harmonic oscillator, that produces sine and cosine values every tick. Each new block display gets those values written into its transformation, so the wave shape comes from the numbers and not from a fixed pattern.

1. Setup - type these once 7 commands

  1. /scoreboard objectives add c9_v dummy
  2. /scoreboard players set #y c9_v 40000
  3. /scoreboard players set #v c9_v 0
  4. /scoreboard players set #k c9_v 23
  5. /summon minecraft:text_display ~ ~13.5 ~ {Tags:["c9_label"],billboard:"center",background:1073741824,brightness:{sky:15,block:15},text:{text:"y = A sin(ωt - kx)",color:"aqua",bold:true},transformation:{scale:[2.0f,2.0f,2.0f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /summon minecraft:block_display ~-12.25 ~ ~-0.25 {Tags:["c9_pillar"],brightness:{sky:15,block:15},block_state:{Name:"minecraft:polished_basalt"},transformation:{scale:[0.5f,6.7f,0.5f],translation:[-0.5f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  7. /summon minecraft:block_display ~12.25 ~ ~-0.25 {Tags:["c9_pillar"],brightness:{sky:15,block:15},block_state:{Name:"minecraft:polished_basalt"},transformation:{scale:[0.5f,6.7f,0.5f],translation:[0.5f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}

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

  1. /scoreboard players operation #t c9_v = #y c9_v
  2. /scoreboard players operation #t c9_v /= #k c9_v
  3. /scoreboard players operation #v c9_v -= #t c9_v
  4. /scoreboard players operation #y c9_v += #v c9_v
  5. /summon minecraft:block_display ~-12 ~6.725 ~-0.275 {Tags:["c9_node","c9_a","c9_new"],Glowing:1b,glow_color_override:65535,teleport_duration:1,brightness:{sky:15,block:15},block_state:{Name:"minecraft:sea_lantern"},transformation:{scale:[0.55f,0.55f,0.55f],translation:[-0.275f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /summon minecraft:block_display ~-12 ~6.725 ~-0.275 {Tags:["c9_node","c9_b","c9_new"],Glowing:1b,glow_color_override:16711935,teleport_duration:1,brightness:{sky:15,block:15},block_state:{Name:"minecraft:amethyst_block"},transformation:{scale:[0.55f,0.55f,0.55f],translation:[-0.275f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  7. /execute as @e[type=block_display,tag=c9_a,tag=c9_new] store result entity @s transformation.translation[1] float 0.0001 run scoreboard players get #y c9_v
  8. /execute as @e[type=block_display,tag=c9_a,tag=c9_new] store result entity @s transformation.translation[2] float 0.00048 run scoreboard players get #v c9_v
  9. /execute as @e[type=block_display,tag=c9_b,tag=c9_new] store result entity @s transformation.translation[1] float -0.0001 run scoreboard players get #y c9_v
  10. /execute as @e[type=block_display,tag=c9_b,tag=c9_new] store result entity @s transformation.translation[2] float -0.00048 run scoreboard players get #v c9_v
  11. /tag @e[type=block_display,tag=c9_new] remove c9_new
  12. /execute as @e[type=block_display,tag=c9_node] at @s run tp @s ~0.5 ~ ~
  13. /execute at @e[type=block_display,tag=c9_a] run particle minecraft:dust{color:[1.0,0.85,0.2],scale:0.9} ~ ~0.275 ~0.275 0 0 0 0 1 force
  14. /execute positioned ~12 ~-5 ~-10 run kill @e[type=block_display,tag=c9_node,dx=8,dy=30,dz=20]

How it works

Frames from the test run

Animated Dual Helix Sine Wave Visualizer - frame 1Animated Dual Helix Sine Wave Visualizer - frame 2Animated Dual Helix Sine Wave Visualizer - frame 3

Recorded on our own test server: 51 frames at about 8.5 fps. Our image check saw: Two glowing strands of cyan-outlined sea lanterns and magenta-outlined amethyst blocks twist in a double helix around a golden particle line between two basalt posts at night, shifting phase across frames.

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. Find a flat open area and stand where you want the middle of the wave. The wave runs 12 blocks to each side along the x axis and reaches about 12 blocks high.
  2. Run the seven setup commands in chat, or in command blocks placed at that centre point.
  3. Place 14 repeating command blocks set to Always Active, and paste the loop commands in the listed order. A chain of repeating and chain blocks also works.
  4. If your command blocks are not at the centre, start each loop command with <code>execute positioned X Y Z run</code> using the centre coordinates.
  5. Look at the wave from the north or south side to see the sine shape best. At night the glowing outlines stand out the most.
  6. Change <code>#k</code> to make the wave faster or slower: a smaller number gives a quicker, shorter wave.

Remove it again 4 commands

  1. /kill @e[type=block_display,tag=c9_node]
  2. /kill @e[type=block_display,tag=c9_pillar]
  3. /kill @e[type=text_display,tag=c9_label]
  4. /scoreboard objectives remove c9_v

FAQ

How can Minecraft calculate a sine wave without functions?

It simulates a spring. Each tick the speed is pushed back toward zero in proportion to the position, and the position then moves by the speed. This repeated update produces sine motion in #y and cosine motion in #v, using only scoreboard maths.

Can I make the helix bigger or use other blocks?

Yes. Raise the start value of #y for a wider helix. If you do, keep the cubes inside your build area and raise the cosine scale of 0.00048 in the same proportion. To change the look, swap sea_lantern or amethyst_block in the two summon commands for any other block.

Commands used

/execute/kill/particle/scoreboard/summon/tag/tp

Similar creations

Join 9Minecraft News & Guides