LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determing a point out of an array of coordinates.

Hello, I'm having the following question:

I have got an array (1D with an cluster containing 2 digital indicators which are
standing for X and Y coordinates) containing X-Y coordinates (positive and negative) of
some points (10-20). These points determine the border of a room (global). However, one of
these points is lying in the plane, determined by the other points (for example in the middle
of the room. The room can have any shape. The reference point (0,0) is lying somewhere
in the room (between the outher points). I would like to determine the arrayindex or
the coordinates of this "special point".

Does someone have a sollution for this problem (or a part of it)?

Greetings,

B
art.
0 Kudos
Message 1 of 2
(2,691 Views)
Bart,

I'm confused about what you're trying to determine. It sounds like you've got an array of points defining the perimeter of a polygon, with one special point thrown in that is inside the boundary of the polygon.

You mention that the special point is "lying in the plane," but all of these X,Y points must by definition be lying in a single plane! A diagram might be helpful here to clarify things.

If I happened to understand you correctly, one quick, dirty, and not very reliable way to find the special point would be to calculate the centroid (average of all X,Y points) and see which point lies closest to it. This won't work at all though unless your polygon is roughly circular and the special point is not too close to the boundary.

Regards,
John Lum
National I
nstruments
0 Kudos
Message 2 of 2
(2,691 Views)