[Question]
  [
Given (in any *structure*; flat list, two lists of lists, a tuple of matrices, a 3D array, complex numbers,…) the coordinates for two non-degenerate triangles `ABC=[[Ax,Ay],[Bx,By],[Cx,Cy]]` and `PQR=[[Px,Py],[Qx,Qy],[Rx,Ry]]`, determine if they are similar, that is,
> 
> they both have the same shape, or one has the same shape as the mirror image of the other. More precisely, one can be obtained from the other by uniformly scaling (enlarging or reducing), possibly with additional translation, rotation and reflection.[[Wikipedia]](https://en.wikipedia.org/wiki/Similarity_(geometry))
> 
> 
> 
You may assume that all coordinates are integers.
You must either return a truthy/falsey value indicating similar/dissimilar respectively, or two consistent values; please state your choice.
Failing on some cases due to limitations in floating point precision is acceptable so long as the algorithm is correct in principle.
**Bonus task:** Add a comment to this post stating whether you would like the same challenge generalised to polygons in N-space.
## Walked-through example case
`ABC=[[0,0],[1,0],[0,1]]` and `PQR=[[1,0],[-1,0],[1,-2]]`
1. Reflect `ABC` in the x-axis: `[[0,0],[-1,0],[0,1]]`
2. Reflect in the y-axis: `[[0,0],[-1,0],[0,-1]]`
3. Enlarge by a factor of 2: `[[0,0],[-2,0],[0,-2]]`
4. Translate right by 1 unit: `[[1,0],[-1,0],[1,-2]]`
This gives us `PQR`.
## Test cases
### Similar
`[[8,4],[5,-5],[0,0]]` and `[[-4,-1],[5,-1],[-1,5]]`
`[[-2,1],[4,-2],[6,2]]` and `[[-1,-1],[2,-1],[-1,1]]`
`[[-1,0],[1,0],[0,2]]` and `[[-2,5],[2,5],[0,1]]`
### Dissimilar
`[[0,0],[-1,0],[0,1]]` and `[[1,0],[-1,0],[2,-3]]`
`[[2,1],[4,2],[6,2]]` and `[[-1,-1],[2,-1],[-1,1]]`
`[[-1,0],[1,0],[0,3]]` and `[[-2,5],[2,5],[0,1]]`
  
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~15~~ 12 bytes
```
,i4:)d|S]/da
```
The program inputs two 3×1 vectors of complex numbers representing the coordinates; and outputs `0` for similar, `1` for not similar.
[Try it online!](https://tio.run/##y00syfn/XyfTxEozpSY4Vj8l8f//aAttkywFU13TLAUDbYOsWK5oXRNdQ5AIkNA11DbNigUA) Or [verify all test cases](https://tio.run/##y00syfmf8F8n08RKM6UmOFY/JfG/uq6ueoRLyP9oC22TLAVTXdMsBQNtg6xYrmhdE11DkAiQ0DXUNgULGWkDeSa6RlkKZtpGYBFDkLwRVJEhRAioXwFMGEAVGQG1K4AJA4gakBUKulA1YBFDhIiRrjFIBGKXNvF2GWOzCwA).
### Explanation
The code checks if the side lengths, sorted for each triangle, are proportional between the two triangles.
```
,      % Do twice
  i    %   Take input: 3×1 vector of complex numbers
  4:)  %   Modular index to repeat 1st number after the 3rd. Gives a 4×1 vector
  d    %   Consecutive differences
  |    %   Absolute value, element-wise
  S    %   Sort
]      % End
/      % Divide, element-wise
d      % Consecutive differences
a      % Any: gives 0 if and only if all values are 0
       % Implicit display
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
*Port of [Luis Mendo's MATL answer](https://codegolf.stackexchange.com/a/194143/6484).*
Outputs 1 for similar, 0 otherwise.
```
vyĆüαnO{}/Ë
```
[Try it online!](https://tio.run/##yy9OTMpM/f@/rPJI2@E95zbm@VfX6h/u/v8/OjraQsckVifaVEfXFEgZ6BjExuooREfrmujoGkLEQZSuoY5pbGwsAA "05AB1E – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ṁ4IAṢ)÷/E
```
A monadic Link accepting a list of two triangles - lists of complex numbers (coordinates on the Cartesian plane). Similar triangles yield `1`, dissimilar ones yield `0`. 
**[Try it online!](https://tio.run/##y0rNyan8///hzkYTT8eHOxdpHt6u7/r/cNvD3d2H2///j46OttBRMInVUYg21VHQNQUxDHQUDGJBjGhdE6CYIUwSzNA11FEwjY2NBQA "Jelly – Try It Online")** (includes footer to translate from coordinate pairs for ease of use)  
Or see the [test-suite](https://tio.run/##y0rNyan8///hzkYTT8eHOxdpHt6u7/r/cNvD3d2H2zX//49WUFYIzszNzEks4lJQiI6OVjDQUTCI1VGIVjCEMYAihrEgFkJM1xChStcoNjaWSwes2UJHwQQsbKqjawrTbADRrGuio2sIkzSEmWIK16xrBLIHJG8CMlNBJ1rBTEfBCKrZEKbZCEmzIUgz0AcumcXFUE/ooHhClzhPAM00RngCyR1A60EMotwRCwA "Jelly – Try It Online").
### How?
```
ṁ4IAṢ)÷/E - Link: list       [[a, b, c], [d, e, f]]
     )    - for each:
ṁ4        -   mould like 4   [[a, b, c, a], [d, e, f, d]]
  I       -   deltas         [[b-a,c-b,a-c],[e-d,f-e,d-f]] (i.e. vectors of sides as complex numbers)
   A      -   absolute value (i.e. side lengths)
    Ṣ     -   sort           (ordered side lengths = [[G, H, I], [J, K, L]])
       /  - reduce by:
      ÷   -   division       [G÷J, H÷K, I÷L]
        E - all equal?
```
[Answer]
# [J](http://jsoftware.com/), ~~39~~ ~~34~~ 32 bytes
```
1=[:#@~.%&([:/:~#:@3 5 6|@-/@#])
```
[Try it online!](https://tio.run/##dY1LC4JAFIX38ysOSaaQo@OLGBCkoFW4qKXJEKGkFEK5DP/6dH3UrsXlwD33@26jF3xVIZFYYQ0Pksbh2B0Pey2SXBppz5emlUtX9oZMA0SI36njpkZha5uxrnx1CUcuUV5vLSrTUj4a7p5RUJttOU71o75fnmyDkGAV0QMPAwYVQolhJ8ZkRAo6oojhzydj5c8pJmPWdj/rIKNmCDEh4rshKmCT8r9RfwA "J – Try It Online")
Takes input as 3 complex numbers for each triangle.
For each triangle, we get each possible pair of points using a boolean mask filter. Ie, `#:@3 5 6` translates 3, 5, and 6 to their binary representations, and each row selects one possible pair:
```
0 1 1
1 0 1
1 1 0
```
We then get the euclidean distances between of each of these pairs `|@-/` and then sort them `/:~`.
Finally we pairwise divide the 3 sorted sides of the triangle `%`, take the length of the unique elements of that result `#@~.` and test if it equals one `1=`.
[Answer]
# JavaScript (ES7), ~~122 120 117~~ 112 bytes
Takes input as `(a)(b)`, where both parameters are in the format used in the challenge.
Returns *false* for similar or *true* for dissimilar.
```
a=>b=>(g=a=>a.map((c,i)=>(h=j=>(c[j]-a[-~i%3][j])**2)(0)+h(1)).sort((a,b)=>a-b))(a).some((x,i)=>a-(a=x/g(b)[i]))
```
[Try it online!](https://tio.run/##jY/BboMwDIbvfYpdJtmdAyQt1S7pi0Q5GEppEJQKqqmnvTozZK0mrZN2sa3f@f74b/iDx3IIl6s694dqOtqJ7b6we6itDJx0fAEoKaBIJ9tILV3jFTv1GV43XmZcrw1Chm8n0IjJ2A9XAKZCCFYFIvAsdhXAbbFhBWxvaQ0FuuARpzR9GUMXWh5WZX8e@7ZK2r6GIzj3TltPLieVS8so8x5FVVtSOupzU5pyWeAvWhma9/LaSNuR@cZ15MwD189xLR@SizV70IbyBY4nRXQlGQ5h/CtGtliou5OOTvqnKsdsnl5xz/CfCNMX "JavaScript (Node.js) – Try It Online")
### Commented
```
a => b =>                    // a[] = 1st triangle; b[] = 2nd triangle
  ( g = a =>                 // g is a helper function that computes the squared lengths
                             // of the sides of the triangle a[] and sorts them:
      a.map((c, i) =>        //   for each pair c[] of coordinates [x,y] at position i:
        ( h = j =>           //     h is a helper function that computes ...
          ( c[j] -           //       ... the difference between either x(i) and x(i+1)
            a[-~i % 3][j]    //           or y(i) and y(i+1) (in a circular way)
          ) ** 2             //       and squares it
        )(0)                 //     compute (x(i) - x(i+1))²
        + h(1)               //     add (y(i) - y(i+1))²
      )                      //   end of map()
      .sort((a, b) => a - b) //   sort the results in numerical order
  )(a)                       // computes the squared lengths for a[]
  .some((x, i) =>            // for each squared length x at position i:
    a -                      //   compute the difference between the previous ratio
    (a = x / g(b)[i])        //   and the new ratio defined as x / g(b)[i]
                             //   (always NaN for the 1st iteration)
  )                          // end of some()
```
[Answer]
# [Python 3](https://docs.python.org/3/), 85 bytes
```
lambda a:len({i/j for i,j in zip(*[sorted(map(abs,[p-q,q-r,r-p]))for p,q,r in a])})<2
```
[Try it online!](https://tio.run/##lY1BDoIwEEX3nqLLYmciLWCM0ZNUFiVIbAOlFDZqPDtSMTERN25@ZjLvzXfX4dLaZKyOp7FWTVEqovb12dK73hhStZ5oMERbctOOrmXf@uFc0kY5qooepMMOOvTg0eVRFHAHHfggqDx6RAcxOq/tQCsq5Y6lBjLMDMQ5SEyRh3UK5Cwz@fRg9YFRsOmSojCwZcIEgQdWvAW@EDhwmEExvYNXLKgYAhcoHiaByTcx97L/epOfveMT "Python 3 – Try It Online")
*-17 bytes thanks to [FlipTack](https://codegolf.stackexchange.com/users/60919/FlipTack)*
*-7 bytes thanks to [tsh](https://codegolf.stackexchange.com/users/44718/tsh)*
Takes a list of lists of coordinates represented by complex numbers as input. Calculates the distances between all points in each set and sorts by magnitude. Then, it checks for all pairs of distances between the two sets if there is a common scaling factor. If so, the triangles are similar.
[Answer]
# APL+WIN, 40 bytes
Prompts for the co-ordinates of each triangle as a 4 x 2 matrix with first row repeated as last row. Confirmed with OP that this is compliant with the input rules
```
 0=+/2-/(y[⍋y←⍎c])÷x[⍋x←⍎c←'+/(-2-⌿⎕)*2']
```
[Try it online! Courtesy of Dyalog Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcjzra0/4b2GrrG@nqa1RGP@rtrgSKP@rtS47VPLy9AiRQARUAUura@hq6RrqPevYDTdDUMlKP/Q804H8al4mC0aPeLRYKJgqmCofWmyoYKBhAxQ6tNwGKGILFDSEsrjS4nJGCoQJI3kjBTMEILgpRZwTXYQjXATQXLAKiDaFihnAxkA5juFqI2YRM5gIA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 84 bytes
```
lambda*M:len({x/y for x,y in zip(*[sorted(abs(3*x-sum(l))for x in l)for l in M])})<2
```
[Try it online!](https://tio.run/##lc3RCoIwFAbg@55il5s7I7dpRNQj@ATmhWKSY05RAy169uU0gqSbbg7/2T7O34z9tTbSFqez1WmV5akXHfTF4MewHVFRt2iAEZUG3csGe3FXt/0lx2nWYekNrLtVWBMyM4f0HLWLUUKe5Chs05amxwWO9zRQELJQgZ9AzALG3ToNxmmoEkI2H8oEnd4DJhTsqFCOcyfFm/MV58BhYWI6BfNYGR@ccoa7JJj8/l8a6T@N8lejfQE "Python 3 – Try It Online")
Takes input as 3 complex numbers. Outputs True for similar, False for dissimilar. The first test case fails due to a float precision issue with two extremely close float values being unequal; the challenge allows this.
This uses a bit of a different method than other answers that fingerprint congruent triangles by their edges having equal length. Instead of taking the distance between pairs of vertices, we use the distance between each vertex and the center-of-mass of the three vertices, that is their average.
To demonstrate that a unique triangle satisfies this up to congruence, note that the three vectors emanating from the center of mass to the vertices must add by zero by definition, which means these vectors must themselves be able to make a triangle. Since their lengths are fixed and we only get to choose their angles (slopes), this is the same as arranging three sticks as the edges of a triangle, which as noted before is unique up to congruence.
To check similarity, we sort the respective distances and check that their ratios are all equal.
This alternative method is shorter, but I haven't proved that it doesn't give false positives.
**79 bytes**
```
lambda a,b:g(a)==g(b)
g=lambda l:{abs((x-y)/(3*x-sum(l)))for x in l for y in l}
```
[Try it online!](https://tio.run/##lY/NToQwFIX3PEUTN62047TAxBB5C3c4McUpWCy0aasCxmdHyox/Ezdubu7Pl3PONaN/1H0y18XdrHhXHTjguMobyFFRNLBCUVOc9ip/45WDcCAjuoLJ5UDccwcVQqjWFgxA9kCB0I5r@z5fgFvhPODGWD2AF2Gd1D3wGnCl9CuoleYeyM5Y8SDDyUVOW3//JMZPyymH08YKrvC0kR1vUFQXP1IuOrAMmUKkGyrIbvUf8JpgkgYGQXGA4R2Ev4ZqybxHUWSs7D2sYXkdpy3OSNbi7R6XJCU0jEshNM7aPULfKGHxsk8Ja/EuZm3AaSDZCadnOMUUHzG2SOG1nDFbHKjA0NAxkvy@Hx3j/zgmfznOHw "Python 3 – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~23~~ 21 bytes
```
{{{⊇Ċ-^₂}ᶠ}ᵐz+ᵐo}ᵐz/ᵛ
```
-2 bytes thanks to Unrelated String
A predicate that only accepts similar triangles. 
Note that for negative values you have to type `_1` instead of `-1`
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pfXfVw64RyJQVdOwWlcnsQp/pR24ZHTc2POpYrlRSVpuop1YCYaYk5xUB27cNdnbVARf@rq6sfdbUf6dKNe9TUVPtw2wKQaJU2kMgHs/Qfbp39/3@0QnR0tIWOSaxOtKlOvCmQMtAxiI3VAQrHm@jEG0LEQVS8oY5pLEQGrAYsYgDWYAgRNkQWNdKJN4YpjzfSAZkANM8ISJnpGEEtMISYbAS3wBCmA6aBCPUKsf8B "Brachylog – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~87 82 77~~ 74 bytes
```
->*a{a.map!{|a,b,c|x,y,z=[a-b,b-c,a-c].map(&:abs).sort;[x/z,y/z]}.uniq!=a}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf104rsTpRLzexQLG6JlEnSSe5pkKnUqfKNjpRN0knSTdZJ1E3ORYkr6FmlZhUrKlXnF9UYh1doV@lU6lfFVurV5qXWahom1j7v0AhLTraQEfBEIgyY3UUooEMXRBH1ygzNpYLLK1rmIlLwX8A "Ruby – Try It Online")
Given the 2 triangles as vectors of 3 complex numbers, calculate length of the three sides as distance between points, sort ascending, then check if a/b and a/c are the same for both.
[Answer]
# [Julia 1.0](http://julialang.org/), 65 bytes
```
!x=sort(abs.(diff(push!(x,x[1]))))
g(a,b,z=!a./!b)=all(z.≈z[1])
```
Revised to not abuse the "any input structure" statement, as people seemed down on that. Found extra golfing, so it's only 1 byte longer. The input is two vectors of complex numbers. `!` is a helper function that appends the first element to the end of each input list and returns the result, then takes the difference ob subsequent elements, elementwise absolute value, and sorts. Then calculate the ratios of the sorted lengths of the sides and check that they are all approximately equal. It costs the same number of bytes to compare square side lengths (replace `abs` with `abs2` and `≈` by `==`).
[Try it online!](https://tio.run/##bY9NDoIwEIX3nALCpqQt0grGTRP/btGwKBKkBoKhEgkn0Gt6EWwbERZ2Mcl782a@6bWrpCD9OHo9U017ByJTIchlUYBbp0oP9KjnJA30cy5AoAwNzBPhyssCJqoKDOH79RxMYvSVrGUlWkenGN/CWNYowYmuEYxknSKX4xgT65qKCdTN1DmjnHFMofFiTHXdQGryHBMbpFOcmLifSzWR9ujAuN1u2pFFETtKlibFazN5RCfGvxy44Lj/QTtVNg/Xfjr4CX3sLDR@Fnp7MH4A "Julia 1.0 – Try It Online")
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 38 bytes
```
Equal@@Sort/@PolygonAngle/@Polygon/@#&
```
~~[Try it online!](https://tio.run/##nZBBC4IwGIbv/g3D0zfcposuxTp0F4Iu4WGEmqAbmR1i@NuXbk4K6tJl43v3vNvDWtFfi1b09UWYcmsOt4doOD@qro95pppnpeReVk2xTDEPI5N1tezPIdqVPMyjmOtAa40BD6CJXTGQYdzmCZH5CNFhjCd4A@mYMEDM0tjSKAVEXExcjXkeUZiidLoC9BqoKxBH0qVAlgL50Jl5CszizDs6GL9rfnUfX0g87VX@M0l@mQRD4P51dSq6e61kbl4 "Wolfram Language (Mathematica) – Try It Online")~~
Takes a list containing two lists of coordinates.
Checks if the two triangles' angles are equal. As [`PolygonAngle`](https://reference.wolfram.com/language/ref/PolygonAngle.html) was introduced in version 12.0, this code does not (yet) work on TIO.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 46 bytes
```
≔ＥＡＥιΣＸＥλ⁻ν§§ι⊕μξ²θＵＭθ×⟦⌊ι⌈ιΣι⟧Σ§θ¬κ⬤⊟θ⁼ι§§θ⁰κ
```
[Try it online!](https://tio.run/##XU47a8MwEN77Kzye4AROiCGQyZQOHloC6WY8CFskotL5ITn1v1dOCunQG/Tdne579De19KOyMdbemyvBp5qgoWkNILBIg8Hisjo4j796yb@W94ZWD4RFHRoa9AYv5OOG@kU7TUEP4ASLbCK9e5FhFqc3FnkfnVM0wIzFt3HaQ8uSxrGPybbbX3/J2D2blw3TvsYAP0mTBc@LoQC1tZxygplZH/OqrE9x/idkaskHmXqKseU64qHDtkJZMZRYdgytPKDcPdcJ5A6rjivKu30A "Charcoal – Try It Online") Link is to verbose version of code. Outputs `-` for similar, nothing for dissimilar. Accepts triangles in any N-dimensional space. Explanation:
```
≔ＥＡＥιΣＸＥλ⁻ν§§ι⊕μξ²θ
```
Input the two triangles and calculate the squared lengths of their sides.
```
ＵＭθ×⟦⌊ι⌈ιΣι⟧Σ§θ¬κ
```
Calculate the shortest, longest and sum of the squared sides of each triangle, then scale by the sum of the squared sides of the other triangle.
```
⬤⊟θ⁼ι§§θ⁰κ
```
Check that the shortest and longest and sum of the squared sides are equal. (The middle squared side is the difference between the sum and the other two sides individually, so if they are all equal then the middle squared sides are also equal.)
[Answer]
# [Zsh](https://www.zsh.org/), ~~156 122~~ 116 bytes
```
s(){m=
for a b x y;m+=($[(a-x)**2+(b-y)**2])
n+=(${(n)m})}
s $=1
s $=2
((r=(n[1]+0.)/n[4],r*n[5]-n[2]||r*n[6]-n[3]))
```
~~[Try it online!](https://tio.run/##jY7BboMwEETv/oo5INkLcYsNVFUk1PwHciVSJc3FRAJUkSb@drqGVFFvvXh3dvfN@Hs4zUdFSgyHEXqaB0VXX4uxVsl1t31v@8@vgMSQOJ57tNhjwgW8q8etCeQzvmtUqydKU5upvb7ExpHw0UB15AMFMSDZNWZTONHx2FMcsHsZhFJ9rbrGuCx/omfPzaZPfWOd7vi53aIooigc0cy/gMQrSglZQVdccuQSgNQltGGNaq3aAJUUh4/TGclb5LRFXPCd5fICu3LmztkHZx5cBJeIZZEvgWYBcde/82hQ/Alc81AC/w@cfwA "Zsh – Try It Online")
[Try it online!](https://tio.run/##jVLBbuIwEL37K0Y0UuwSlzhAVYGi7mEve969Rd7KLUmJljgodlVYyrezY5vQsKcaMvbMm/dm4sxfsz5VlFFiSgt8dzKUHZqcVG0HCp5hB/tlM85pVFDFd@z2NhvTZ753B8lIg8CBatYc2ZEYiHJBNIYa5p2MUNrlVBdCjtM7NmnwkHS3TZFJrtF8fDhn6pypZOzESAXxA8xgDnweTHr@YTQGXDGfARcOO5uB45CYlC/rFqJHJ8UzEKiGmzf3EB4Xjp2UZ2cXg/9PM5RyWq4JDJ9NCuL8pL4tiMUVjnrTYNC76im0lPmnbyj0E17vyz3dwLvSFpq2K8GWxsKLMqV5xPi2K7cKo9u21tbAe23XYNe1WZAQebLtk@pe3YcmrugNWPWnNH1@rUFtmhYVld4DzkGjrM/zA8IhOuTR4dtkUvwuFqv6tbYLecflBI5Hn/WmXZ7qOu@5MXIjFCq5hYgbpx1Ee/CWeSiQEczpKMKtmCYik@CPIsnkCEJYzBMu@jjmzOSIkSPx8@qvgXqhuCi4SFKZFMGmKCHxhVaAQJbMMRRsmggp457zkMwwhiUClH5yZq6sh9yG2vMBDRVdFHMy3O6HtUQgZBfesFzqe@N9i@JCE0MAudMBqa/1xVJsCavWc6@/PkTuugLQIQB8A3HuVwyjX/1ELUIeXv8PvX2zC3/zI0@rK6i8u8TxKvXlCwe5@HttTN3UG9WF1suNKeH/pJ/DjKomq1aXp38 "Zsh – Try It Online")~~
[Try it online!](https://tio.run/##jVLBbuIwEL3nK0Y0UmyISxwIqkBR97CXPe/eLG/llqRESxwUpyos5dvZsU1o2FMDHmfmzXszseev2ZxLQklgig7Y/mwIPdZ5UDYtKHiGPRxW9SQnoSCK7el4nE7IMzvYF0kDbZEj0bQ@0VNgIMy5s2lASJsTLbicJPd0qsVcxu1Yi0wyLVL58WGdhXVmktIzDUqIHmAOGbDMm@Tyw2gE@ERsDoxb7GIGjkWioHjZNBA@WimWAkc13JxZgF82HFkpx06vBv@fZihltWwTGL6YBPhlJa4tiPgNjnozb9C76cm3lLrVN@T78Z/35Z7u4F3pDuqmLaArTAcvyhTmEeO7ttgpjO6aSncG3qtuA92mMsvAR5665km1r/aKA1v0Djr1pzB9fqVBbesGFZU@AE5ArTqX50aDQXjMw@O36VT8Fst19Vp1S3nP5BROJ5f1pm2ealvn2QGyw@Mr2QcROy57CA/gLHWQJyOYk1GIm5jFPJXgXnmcyhH4MM9ixvs45szliAanwE2qOwbihCIhGI8TGQtvE5SQ@EFrQCCNMwx5m8RcyqjnPMQ4oQJLeCj55MxtWQfZDbWzAQ0VbRRzUtwWw1rcE9Irb1gucb2xvkV@pfEhgNzZgNTX@mIpuoJ147i3tw@hPS4PtAgA20KUuyeC0a9@opY@D4//h969dUt38iNHq0oonbvC8Sr09Ya9XPS9Mqaqq61qfevF1hTwf9LPYUZZBetGF@d/ "Zsh – Try It Online")
Saves 34 bytes by abusing "any structure" for input. Given a pair of triangles:
```
[[1,2],[3,4],[5,6]] and [[7,8],[9,10],[11,12]]
```
The input should be the two strings:
```
'1 2 3 4 3 4 5 6 5 6 1 2' '7 8 9 10 9 10 11 12 11 12 7 8'
```
I believe this is within the rules; there is no calculation done beforehand, simply duplication. No sorting criteria is applied either.
I provide a helper function in the TIO link to prepare an argument list from a string in almost any format (it removes all non-numeric characters and splits).
Here is the first **156 byte** answer, which takes the input in a less abusive format. The abusive format removes line 2 in `s`, and reduces line 3:
```
s() { # helper function, calculates squares and sorts them for one triangle
    m=                             # unset m in case it was already used
    t=(${@:^argv} $1)              # t=('x1 y1' 'x1 y1' 'x2 y2' 'x2 y2' 'x3 y3' 'x3 y3' 'x1 y1'
    for a b x y (${=t:1})          # Remove first element of $t, and split on spaces:
        m+=($[(a-x)**2+(b-y)**2])  # (a b x y): (x1 y1 x2 y2) (x2 y2 x3 y3) (x3 y3 x1 y1)
    m=(${(n)m})                    # sort squared lengths in numeric order
}
s $@[1,3]                          # run s with the first three arguments
n=($m)                             # save first result in n
s ${@:4}                           # run s with the last three arguments
((r=(n[1]+0.)/m[1], r*m[2]-n[2] || r*m[3]-n[3]))  # returns truthy if not similar
```
]