3D CPP Code