Sphere Morphing in Processing

Simon is trying to write a program for Sphere Morphing in Processing, first making a test code in p5.js (available here: https://alpha.editor.p5js.org/simontiger/sketches/S1zcwevkz)

In the video below, Simon is explaining the challenge using Magformers triangles:


Unfortunately, the test code doesn’t quite work yet: Simon is getting three infinite triangles around the circle.