Proving that it's a cross with 12 coordinates?

nightninja

New member
Joined
Nov 12, 2014
Messages
1
Am looking for information regarding how do you prove that the shape formed is a cross shape, given 12 sets of coordinates, without using angles?

ie. (3,5),(3,7),(4,4),(4,5),(4,7),(4,8),(6,4),(6,5),(6,7),(6,8),(7,5),(7,7)

If you plot the points, you can see that it's a shape of a cross. But I'm looking for a way to prove that the given set of coordinates is a cross Without drawing it out/using angles. Reasoning being that I'm trying to figure out the logic and will be translating it to code format.

Any useful information (a link or even a reference book) will be gladly received with thanks.
 
Hello, nightninja!

Am looking for information regarding how do you prove
that the shape formed is a cross shape, given 12 sets of coordinates,
without using angles?

i.e. (3,5), (3,7), (4,4), (4,5), (4,7), (4,8), (6,4), (6,5), (6,7), (6,8), (7,5), (7,7)

If you plot the points, you can see that it's a shape of a cross.
But I'm looking for a way to prove that the given set of coordinates is a cross
without drawing it out or using angles.
Reasoning being that I'm trying to figure out the logic
and will be translating it to code format.

You have created problem that is virtually impossible to solve
in elementary steps.

If you started with a less ambitious problem,
you might have understood the difficulties.

Given four points, do they form a square?

. . Example #1: (-1,2), (2,2) (2,5) (-1,5)

. . Example #2: (3,1), (7,3), (5,7), (1,5)

Got any ideas?
 
Am looking for information regarding how do you prove that the shape formed is a cross shape, given 12 sets of coordinates, without using angles?

ie. (3,5),(3,7),(4,4),(4,5),(4,7),(4,8),(6,4),(6,5),(6,7),(6,8),(7,5),(7,7)
What do you mean by "angles", and in what way can you "not use" them?

I'm trying to figure out the logic and will be translating it to code format.
What, exactly, are you trying to do? Are you trying to develop coding which can check a given set of input points? It might help if you provided the full and exact text of the exercise, along with the complete instructions and a clear listing of what you've tried so far. Thank you! ;)
 
Am looking for information regarding how do you prove that the shape formed is a cross shape, given 12 sets of coordinates, without using angles?

ie. (3,5),(3,7),(4,4),(4,5),(4,7),(4,8),(6,4),(6,5),(6,7),(6,8),(7,5),(7,7)

If you plot the points, you can see that it's a shape of a cross. But I'm looking for a way to prove that the given set of coordinates is a cross Without drawing it out/using angles. Reasoning being that I'm trying to figure out the logic and will be translating it to code format.

Any useful information (a link or even a reference book) will be gladly received with thanks.

You will need to look at the points provided and decide on an algorythm which will gives you a cross.

For example:
-Consider the lowest (least) y value with the furthest right (least) x value in the list. Call this point 1, i.e. point (x1, y1) [in the example, point(4, 4), i.e. first least y, then least x]. Pull (x1, y1) from the original list O and start a new 'ordered' list N with (x1, y1) as its first point.
-Now consider the second most lowest y value with the furthest right x value in the list. Is the y value less that y1. If no, we don't have a cross and exit. If yes, call this point 3 and add point 3 to N in position 3, i.e. point (x3, y3) [in the example, point (3, 5), i.e. first do the second least y, then least x]. Delete point 3 from O.
-Next, is there a point in the list (x1, y3). If no, we don't have a cross and exit. If yes, call this point 2 and add point 2
...


Note, there are efficiencies you can make to the above and possible checks which should be made. Again, for example, suppose you had 14 points but there were two duplicates. Are you going to allow that? What if the original list is not empty after completing the algorythm?
 
Top