Let's continue 3d

This is going to explain how it works

There are basicall two ways to approach the problem:

go on here