Fit splines through 3d structures

12 views
Skip to first unread message

Paris Andrea

unread,
Nov 25, 2022, 3:57:28 AM11/25/22
to ttk-...@googlegroups.com

Dear all,

I was wondering if there is some functionality that enables "fitting" splines (or approximately center lines) to find the center of 3d tubes like the one you can find in the picture. I would be interested to reduce structure like that to just multiple lines if it's possible with any means.
https://arc.aiaa.org/cms/10.2514/1.J053697/asset/images/medium/figure2.gif


The Dragon Demo example looks fairly similar to what I want to do, with the difference that I don't need necessarily all the lines connected together(https://topology-tool-kit.github.io/examples/dragon/)

https://topology-tool-kit.github.io/img/gallery/dragon.jpg


Is there any way to do it?

Thanks a lot in advance


Andrea

Christopher Kappe

unread,
Nov 25, 2022, 9:03:49 AM11/25/22
to ttk-...@googlegroups.com

Hello Andrea,


maybe I have a biased view on this, but your problem reminds me of work I did during my PhD. I fitted splines (actually degree-n polynomials) to "3D" (spherical coordinates) lines. See e.g. the magenta curve in the attached image (Fig. 10 from https://www.sciencedirect.com/science/article/abs/pii/S009784932200036X).

Under https://bitbucket.org/kappe_c/pv-py-filters you will find RegressionForPolyline.py and SmoothPolyline.py

A PhD student's work this is not very polished and won't be applicable for you out-of-the-box but maybe it is a starting point.


Generally, the first one is based on

from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression

And the second one on

https://bitbucket.org/kappe_c/aaaown/src/master/map1dKd_smoothing.py

which is a moving window average approach.


Regards,
Chris

--
You received this message because you are subscribed to the Google Groups "ttk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ttk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ttk-users/bd86e8aa00494220b70098ad02552bfe%40student.ethz.ch.
1pctCO2-trajAndCont-zoomIc-rawAndReg3.png
Reply all
Reply to author
Forward
0 new messages