B Check if two points are symmetrics/asymmetric

  • B
  • Thread starter Thread starter Andsello
  • Start date Start date
  • Tags Tags
    Points
AI Thread Summary
The discussion focuses on developing an Android app that allows children to draw freehand while checking for symmetry in their drawings. The challenge lies in comparing lines and shapes that may not be identical in size or angle but still exhibit symmetry. Suggestions include mapping endpoints of line segments, using linear interpolation to compare points, and employing a second canvas to visually assess similarity by counting pixel differences. The complexity of computations increases significantly with multiple segments, raising concerns about the app's performance on tablets. Overall, achieving an effective symmetry check requires balancing accuracy with computational efficiency.
Andsello
Messages
2
Reaction score
0
I'm working on an Android app which let's a group of child to draw whatever they want in a specific area. I need to check if the lines and figure that they draw are symmetric. The problem is that since the app is designed to let them draw freehand, I don't know how to compare the lines by considering a certain flexibility. For example, I would consider symmetric these two "triangles" in the image: Image even if they have not the same inclination and the same length. Do you have any suggestion? These are the points of the two shapes, do you notice any constant or something similar I can use to find what I need?
Triangle on the top:
1303.9062, 245.88171
1306.9531, 239.48767
1309.055, 234.89392
1309.9219, 231.82782
1312.2241, 231.00659
1312.8906, 228.64291
1312.8906, 226.54477
1315.9375, 227.98535
1315.9375, 231.00659
1319.2817, 236.99414
1319.9219, 243.00916
1322.1042, 244.02539
1322.8906, 248.47485
1322.8906, 251.52356
1322.8906, 255.54462
1324.9263, 256.98926
1325.9375, 260.74615
1325.9375, 265.4226
1325.9375, 267.45148
1325.9375, 269.0193
1330.1698, 269.0193
1328.9062, 275.0343
1328.9062, 275.9956
1328.9062, 279.01685
1328.9062, 281.98315
1331.9531, 285.0044
1331.9531, 285.0044
Triangle in the bottom:
1133.9062, 950.9956
1133.9062, 955.37256
1136.1552, 959.9429
1136.9531, 965.0901
1138.6583, 968.71606
1139.9219, 972.3617
1142.586, 976.9783
1143.9062, 982.42285
1146.608, 985.6449
1146.9531, 990.5189
1149.9219, 999.83105
1149.9219, 1002.55286
1153.7056, 1005.82275
1152.8906, 1010.1306
1154.862, 1011.9697
1155.9375, 1016.5016
1155.9375, 1018.0122
1155.9375, 1020.9785
1155.9375, 1024.9885
1159.9219, 1024.9885
1163.43, 1017.47314
1162.8906, 1013.48035
1165.9375, 1008.792
1167.0302, 1000.8804
1168.9062, 995.6416
1171.9531, 990.8357
1175.2189, 986.532
1175.9375, 981.4552
1178.9062, 975.46765
1181.9531, 970.21094
1181.9531, 966.84827
1186.4062, 966.9807
1184.9219, 962.5906
1184.9219, 960.99316
1187.8906, 960.99316
1187.8906, 956.98315
1187.8906, 956.98315
 
Mathematics news on Phys.org
As they draw could you draw the symmetric lines too so they see them?
 
Unfortunately I can't. I tried to divide all the points in group of 3-4 and then calculate the difference between the triangles, but it seems to not work because its too approximate
 
I think this is a very tough problem to solve and may stress the computing power of your tablet too.

I suppose you could map the endpoints of each line segment to another which means you'd need to scale the second line segment and then compute how close the points in between are to one another.

To make things easier you could consider a line segment to be X number of points and then adjusting the other line segment using linear interpolation to insert additional points inside it and to then compare point A_n of line segment A to point B_n of line segment B to see how close they are perhaps by summing the differences and dividing by the total number of points in segment A.

As you can see the computation starts to explode when you have say 5 segments then you have to 4! comparisons times the number of points interpolated in and their differences.

Another strategy would be to have a second canvas where you draw one line over another scaling one segment to match the other and matching endpoints meet. Count the number of pixels used by the first segment and then again after adding the second segment. A smaller pixel difference means they are similar. Although again this could be computationally costly.
 
  • Like
Likes Pi-is-3 and Andsello
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
2
Views
1K
Back
Top