algorithmic modeling for Rhino
Hi Forum,
I've embarked a task to create a GH algorithm to find the best fitting cylinder given an initial surface or a cloud point.
So far I've been gathering information on how to tackle this and tried a couple of things with Galapagos (file attached). However, I quickly realised that that's not the best accurate way to solve this.
On the other hand, I've brushed up on some statistical skills and I am trying to use DODO now, given its suite of numpy-like components and manipulation of matrices, and (who knows) maybe a neural network could solve this.
I would like to start a discussion on this topic and any pointers on how to start this are very appreciated.
Some Resurces:
http://file.scirp.org/pdf/AJCM_2013043015404897.pdf
http://www.nlreg.com/cylinder.htm
http://www.mapleprimes.com/questions/146143-How-To-Fit-A-Cylinder-T...
http://www.mapleprimes.com/questions/146143-How-To-Fit-A-Cylinder-T...
Tags:
How much noise is there in your cloud/surface input? Is it guaranteed to be exactly on the cylinder you're looking for, or is there some error involved?
Hi David,
No assumption is made on the orientation or position in space of the surface from which the initial data set belongs to.
Noise should be accounted for as this should output a "best fitting" solution; and error is also involved, hence the statistical analysis approach.
Hope this can spark a good discussion.
Hi Tom Thanks for your input,
This is an initial experiment for a larger architectural purpose where the constraints and tolerances will dictate the "type" of best fitting solution.
I am working taking your advice into account, you can see on the file posted that I was tinkering with the idea of using best fitting circles as well.
Your solution works if we suppose that we have a weighted and sparse pointcloud input, from all sides of the cylinder;
I'm aiming to recreate the uncapped "best fit - min Deviation" cylinder from a portion of a surface, or cloud points describing a surface (see image above for desired solution ; the grey is the input surface and the red cylinder is optimal output solution. )
Hi David Valent, I don't have dodo installed (and you forgot to internalise your geometry), but - for the surface part of your question, have a look at the Surface.TryGetCylinder(Cylinder, Double) Method. For the pointcloud part of your question: I don't know.
Hi Pieter,
I've tried your solution (file attached) with the internalised geometry, Unfortunately it only works if the initial surface is part of an exact cylinder and I can't make it work with tolerance.
Hi Forum,
I'm posting the first stage of my solution:
in a nutshell,
This results into an acceptable solution to which continue or perform an optimisation process.
WIP :
The direction of the normal lines has to be automated, I've placed a toggle to do this for now.
The length and division of normal lines and how these groups are computed needs to be revised.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by