<!Logo Code!>    to square :a repeat 4 [forward :a left 90]  end 

to unfoldCube :a :b
square :a right 90 up :b
square :a forward :a up :b
square :a forward:a up :b
square :a right 90 up :b
square :a right  180 up :b
forward:a up :b
right 90 forward :a left 90 square :a
end

cg
unfoldCube 30 0



<!Scene State !>
 functions: { unfoldcube 30 0 }
cameraPos: {0 -5.329070518200751e-15 200}
character: {Bird}
<!Sliders State !>
#yes#fid: {0} fname: {unfoldcube} values: {30,0,}min-max-step {15,60,1}min-max-step {0,180,1}<!Notes !>
{Move the "b" slider to fold the cube}