Hey,
I have a set of points which should lie on a cylinder but are not fairly distributed on it. I need to get the optimal parameter values that can describe such a cylinder.
Does anybody have an idea or a pointer to solve this problem?
Thanks!
Hey,
I have a set of points which should lie on a cylinder but are not fairly distributed on it. I need to get the optimal parameter values that can describe such a cylinder.
Does anybody have an idea or a pointer to solve this problem?
Thanks!
“not fairly distributed on it”
I assume it means that all points are not placed randomlny ON cylinder’s surface but NEAR cylinder’s surface.
If they’re just near the cylinder then you can try simple genetic algorithm. One such algorith could look like that:
You need to find two points - center of cylinder’s top and center of cylinder’s bottom.
You do that by creating two random points and calculating how good is your current solution.
If it’s not good enough then modify one or more coordinates and see if it got any better. Keep doing that until you are satisfied. As your solution gets better, modify your point’s coordinates by lesser and lesser values.
Very easy so far, but now the hard part - we need a function that will tell us how good is our current solution.
Using cylindrical coords :
theta = RAND
x = RAND
et voila
EDIT: Ok, I misunderstood the inputs and the outputs wanted …
mmm… Well… i think the genetic algorithm sounds like a good idea… since I need to optimize the cylinder radius and center axis… I just hoped there could be a more straight forward regression-type method…
Many Thanks!