Also there I have a similar calculation
https://github.com/hofk/THREEf.js/blob/7b76151f112779f48f16878c571541d44b00a70b/THREEf_90/THREEf.js line 2052
from line 2135
see also
Addon. Produces almost infinite many time-varying geometries with functions https://hofk.de/main/threejs/sandboxthreef/
UPDATE:
This is not a leaf, but the vertex normals show an orthogonal orientation. You can change that. (… sandboxthreef)