Generative "leaf" geometry - position meshes along a tube

Hello folks,
I’m trying to make a simple generative “leaf” instead of modeling it in Blender and I’m stuck.

I did the following:

  1. generated a curve from points
  2. extruded a tube along the curve
  3. divided the curve in segments, from each segment point have a “leaf” feathering out (a thin cylinder as a single leaf base geom)

My question is - how to rotate the leaves properly so they “feather” outwards like a leaf might?

I know it has to do with the tangent and normal at every point where the cylinders are placed, but no idea how to move on.

Will be thankful for any tips!

This is where I am so far:
https://jsfiddle.net/vrug72L5/

A rough sketch below of what I have in mind:
leaf1

Please check the link above, this is what I have now:
leaf2

I needed corresponding calculations in my addon THREEg. Maybe you can take something from there.

https://github.com/hofk/THREEg.js/blob/c0f2e8063922465a32e2887d3f79a9c24c84d5bf/THREEg.js from line 3776
see code from line 3978 …

see also Addon to create special / extended geometries
https://hofk.de/main/threejs/WallTHREEg/WallTHREEg.html

1 Like

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)

2020-08-26 21.23.50

1 Like

Thanks, @hofk, after playing with it for a while I can say your addon is very impressive.
I’m tinkering with other tools as well for now, hoping there is still a simpler solution:)

With the Addons you can not solve your problem directly. That’s clear.

But the calculations there with normal, binormal and tangent and the vector equation of the circle in 3D space could be a basis. It is a matter of mathematics. You have to add the desired angle between stem and leaf. Otherwise the vertex normals are only 90° like in the Addon.