HELP PLEASE !!!!

HELP me. Its very important for me
I have 3d cube and I need algorithm which clip pieces of edges that shouldn’t be visible. It may be simplest. But i need it as fast as possible (i’ve to give my program for 8 hour). HELP PLEASE. My mail is danielma@go2.pl
Thanks