This is a NURBS surface demonstration on a webpage: https://peterpolgar.github.io/NURBS-surface-demo
Programmed in an iterative way instead of recursion.
surface.js and surface_drag.js (mouse controlled) contain some explanatory comments to better understanding the code.
surface_drag.min.js is the hosted version which is the minified form of surface_drag.js.
Acknowledgement to bohnacker for the addScreenPositionFunction.js: https://github.com/bohnacker/p5js-screenPosition