Play around with the variables and it will change the cube according to the variable value. Have Fun, and you can copy the code if you want.
Thanks to @MathMathMath for the 3d engine