Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 added 27 characters in body
source | link

Japt, 1010 9 bytes

-1 byte thanks to @Shaggy

ñ_íV'-ñ_íaV m²x

Takes points as an array of three-item arrays and the base point an a single array, in that order. Does not take the size argument.

Try it online!Try it online! or run the huge test casehuge test case with -R to output one x,y,z per line.

Explanation

ñ_            Sort the input array as if each item were mapped through the function...
  í V         Pair the x,y,z in the current item with those in the base point, V
   a          Take the absolute different from each pair
      m²      Square each of the 3 differences
        x     Sum those squares
              Sorted array is implicitly returned

Japt, 10 bytes

ñ_íV'- m²x

Takes points as an array of three-item arrays and the base point an a single array, in that order. Does not take the size argument.

Try it online! or run the huge test case with -R to output one x,y,z per line.

Japt, 10 9 bytes

-1 byte thanks to @Shaggy

ñ_íaV m²x

Takes points as an array of three-item arrays and the base point an a single array, in that order. Does not take the size argument.

Try it online! or run the huge test case with -R to output one x,y,z per line.

Explanation

ñ_            Sort the input array as if each item were mapped through the function...
  í V         Pair the x,y,z in the current item with those in the base point, V
   a          Take the absolute different from each pair
      m²      Square each of the 3 differences
        x     Sum those squares
              Sorted array is implicitly returned
1
source | link

Japt, 10 bytes

ñ_íV'- m²x

Takes points as an array of three-item arrays and the base point an a single array, in that order. Does not take the size argument.

Try it online! or run the huge test case with -R to output one x,y,z per line.