06-02-2009 10:18 AM
elset191 wrote:
You can just do a rotation of all the points ...
That sounds a little easier said than done.
Is there an easy way to do that?
06-02-2009 10:22 AM
Mathematics -> Geometry -> 2D Cartesian Coordinate Rotation.
Of course when I did it way back when I didn't know about this VI so wrote it myself.
06-02-2009 10:45 AM - edited 06-02-2009 10:47 AM
Hi Cory,
I think that with
Center x-value = [(max x-value)+(min x-value)] / 2
Center y-value = [(max y-value) + (min y-value)] / 2
you wil calculate the center point of the minimum circumscribed BOX, not circle!
If by any luck, your box is a square then it's ok but I'm pretty sure that it will never be the case 😞
06-02-2009 05:00 PM
You should be able to pose this as a sort of constrained optimization problem. The LS circle is just the unconstrained solution (minimize the LS distance between the datapoints and the circle). For the maximum inscribed circle the constraint is that no datapoint should lie inside the circle (distance from any datapoint to the circle center must be greater than the circle radius). For the minimum circumscribed circle all datapoints should lie inside the circle (distance from any datapoint to the circle center must be less than the circle radius). The constrained nonlinear optimization.vi should be able to solve this problem.
06-03-2009 12:40 AM
I found a way to calculate MCC
Start the VI and.......................have a break 🙂
So now I need a) a super computer or b) valuable data reduction
I'll go for the last one and also a way to find MIC & MZC, keep you posted guys ... ... ...
I took a rough look at the constrained nonlinear optimization.vi but I don't know yet how to translate the constraints you mentioned into LV code 😞
Can you help a little bit more DSPGuy?
Regards
Alain
06-03-2009 03:17 PM
06-04-2009 12:15 AM
Thanks DSPGuy for your efforts!
I'll have to install V8.6 first, I have the CD's somewhere but......... can't find them right now
Forget about my version because there's an inadmissible error in the both centre point and radius.
it looks good on a graph but when zooming in it isn't anymore 😞
I have a dataset with known values for centerpoint and radius and the error I get is too large 😞
As soon as I have V8.6 installed I will test your code with the same dataset and let you know the outcome!
Thanks for your help so far
Regards
Alain
06-04-2009 01:48 PM
06-05-2009 12:16 AM
Thanks for the "earlier" version but I already have 8.6 installed and translated to V8.5. I
also did some caculations.
A first sight it's ok but with some objects I don't get an answer for MIC or MCC or even both.
It seems that how the more unround a shape is or the more spread there is in the data, the more critical it is to set correct start parameters.
I'll make a vi with some datasets to explain the above.
To be continued... ...
06-05-2009 10:54 AM
As promised a vi with some datasets that genereates errors instead of answers
I'll have a closer look at that vi in the week-end ...