Detect circular flow pattern?

   855   2   1
User Avatar
Member
24 posts
Joined: June 2019
Offline
Hi guys,

I would like to detect a circular flow pattern. This hand-painted demo should make it clear:


The measure SOP doesn't do this well. I guess it's because it only looks to the immediate neighbour points to determine the curvature:


Is it possible to do this?

Cheers,
Edited by Forests - Feb. 24, 2020 17:32:02

Attachments:
Screenshot 2020-02-21 at 20.58.26.png (332.7 KB)
Screenshot 2020-02-21 at 20.57.30.png (323.6 KB)
curvQuestion-sfq.hipnc (2.5 MB)

User Avatar
Member
472 posts
Joined: July 2005
Offline
Hi,

you can try to calculate something like a local winding number for example.

For each vertex get the neighbour vertices +- a number, like (…,vtx - 2, vtx - 1, vtx, vtx + 1, vtx + 2,…). Next step is to calculate the local center of these neighbours.
After this you can use the center to loop over the vertices and accumulate over the angles. The angles should be big near the curls.

Here is an example (using some wrangles). The result attribute is a vertex attribute called @w. This can be used to determine the local curl. But the results will strongly depend on the input (like local vertex density, planarity etc …).

Attachments:
curvQuestion-sfq_.hipnc (2.5 MB)

User Avatar
Member
24 posts
Joined: June 2019
Offline
Thank you very much, Aizatulin. That's a wonderful solution, that math principle.
  • Quick Links