Grid of Points - how to find corners? - Сообщения
Need some conceptual ideas on how to find corners of a grid of points represented by XY coordinates. Any input is appreciated. Thanks!
DotGrid ID.sm (54 КиБ) скачан 41 раз(а).
WroteHi Alex,
Try this:DotGrid ID.sm (54 КиБ) скачан 52 раз(а).
I'm not sure that's your's expected answer.
Best Regards,
Ioan
Hi Ioan, thats a good start :-). My aplogies for not wording my request more clearly. I need to identify following points programmatically.
For any generic array of XY data there are (in my case always 4) corner points that I need to find and identify.
The issue that I faced is that for some of 4 corners the coordinates are not always MIN/MAX of the entire array... I have tried setting up a function based on MIN/MAX that does not work if a corner point is not defined by XY extremity value.
Really what i need is the concept, I can and will do the function myself (since I do not want to take much of anyones time).
However consider that a line build by points is straigth depending on the precision you use.
An idea could be to check if for a group of 3 points, the middle point lays on the segment between the other 2 points (or better: is close enough). In this way, you can check all the points considering each one the middle point of a group.
Wrote@Alex,
I'm not sure that this is better or not. DotGrid_ID2.sm (116 КиБ) скачан 44 раз(а).
My idea is to keep trace for each min/max of each column
Best Regards,
Ioan
WroteMy solution, based on this code
DotGrid_dist.sm (66 КиБ) скачан 74 раз(а).
Thank you very much guys, both codes identify the points correctly (and point out that my plot is not correct actually). You have just identified the most heavily loaded piles in a pile group, something that till now I always had to do by hand when automating per-pile demand calculation.
Ioan, your code will need a small tweak to identify points 16 & 17 instead of just 16.
Davide, it will take me sometime to digest the formula you are using; it seems to be quite general and applicable to any? point cloud, which is great!
Wrote@Davide,
Very interesting your solution.![]()
But in fact your solution gives almost the same results as mine's - one position exception:
Now, it's Alex's turn to use or to unvalidate.
Best Regards,
Ioan
Both solutions seem to work for my purpose. Ioan's solution is simple, while Davide's has a potential to be very general, which I will test by feeding it some data
Frankly I am EXTREMELY thankful to both of you guys to take your time and help a less mathematically gifted dweller of this forum (not for the 1st time either).

WroteDavide, it will take me sometime to digest the formula you are using; it seems to be quite general and applicable to any? point cloud, which is great!
The function looks if a point is "far" from the segment that connects the adjacent points near the one investigated, assuming last point is adjacent to the first (closed path); if you are looking in a perimeter, using sorted points and a correct tolerance parameter, this formula should be ok. If the matrix contains an array of piles/elements (meaning there are also inner elements, f.e. a 3rd row of piles in your example), this function can't be used (not directly).
doing the effort of understanding. Whatever,
You can change the shape at will and preserve
finding the corners as you first asked for.
Forum Corners.sm (23 КиБ) скачан 54 раз(а).
WroteThis collection is much too weird for me
doing the effort of understanding. Whatever,
You can change the shape at will and preserve
finding the corners as you first asked for.
Forum Corners.sm (23 КиБ) скачан 54 раз(а).
Thanks, Jean
-
Новые сообщения
-
Нет новых сообщений