Swift version of code from book '3D Graphics with SceneKit'