# How do I detected linear clusters of points in 3D data?

I have a list of 3D points.

data =
{{57.3333, 198.833, 1}, {2.40909, 180.045, 1}, {32.1842, 170.342, 1},
{195.25, 147.5, 1}, {85.7941, 143.735, 1}, {59.8333, 117.5, 1},
{5.83333, 100.167, 1}, {151.5, 95., 1}, {31.3, 88.1, 1},
{87.2222, 67.2222, 1}, {61., 39., 1}, ...}


• How can I color the points to indicate volumes of high point density?
• How can I draw lines through those clusters of points that look like linear structures, i.e., paths?
• the line detection is a real challenge, google "3d hough transform line detection". I dont think there is a straightforward built in method in mathematica. Commented Nov 6, 2017 at 23:16
• I don't know what the current state of the art is, but in the early 1990s I worked on this problem, trying to find good heuristics to solve it. I made some progress, but it turned out to be very difficult and I can't say I solved it. Maybe today machine learning could be a useful approach. One thing I learned is the problem is very sensitive to the data, so anyone who wanted to work on your problem would need your full data, not just a few points. Commented Nov 6, 2017 at 23:34
• Thanks, ill google it. Any idea for the points density? Or some way to visualise the poits distribution? :) Commented Nov 6, 2017 at 23:49
• Many cluster techniques tend to end up with clusters that look like ellipsoids but as you want clusters that are linear features you consider the following article: Clustering by fast search and find of density peaks. Alex Rodriguez and Alessandro Laio. Science 344, 1492 (2014).
– JimB
Commented Nov 7, 2017 at 0:59
• As far as visualizing the density goes, have you seen ListDensityPlot3D? Commented Nov 7, 2017 at 3:42