You can view the code in the CodePen — https://codepen.io/mattway/pen/ayaXpx?editors=0010
For this example the manifold is a discrete set of inputs generated with x, y and rotation values. The next step is to disentangle a continuous, learned manifold — that’s what our next article will demonstrate. We have a write-up on learning these (entangled) manifolds here — https://medium.com/syntropy-ai/unsupervised-learning-of-a-useful-hierarchy-of-visual-concepts-part-1-13ab0d4e21ec