programing 4x4x4 led cube

I just built a 4x4x4 led cube and got it working . i used 16 pnp transistor to run the columns . i am new to this audrino world and find it very fasinatiing. i am using the gigitalwrite and delay commands to test everything out . i find that doing any animations this way will take a long time to write the program. Is there an easier way to write animations?? I read a little about binary numbers but find it confusing .i also tried to copy a code that will randomly light eash led just to see everything work but i couldnt get it to work... any help will be helpful..

Big O

If you write some functions for drawing lines and such, building new animations might be a lot faster.

i dont know what you mean i am new to this world.. i want to learn do you mean writing batch files ??

Not quite.

Imagine for example you were doing an animation consisting of making the top layer of your cube light up and moving this lit layer up and down again and again. Instead of re-writing everything for each layer, you use a function that holds the repetitive commands and feed it with a number to indicate which of the 4 layers should light up.

So

terribly long squence of digitalWrite() and delay()

would be turned into something like:

light_up_layer(1);
delay(500);
light_up_layer(2);
delay(500);
...