/usr/share/doc/mathomatic/tests/pyth3d.in is in mathomatic 15.8.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 | ; This arrives at the distance between two points in 3D space from the
; Pythagorean theorem (distance between two points on a 2D plane).
; The coordinate of point 1, 2D: (x1, y1), 3D: (x1, y1, z1).
; The coordinate of point 2, 2D: (x2, y2), 3D: (x2, y2, z2).
distance2D^2=(x1-x2)^2+(y1-y2)^2 ; Distance formula for a 2D Cartesian plane.
distance3D^2=distance2D^2+(z1-z2)^2 ; Add another leg.
eliminate distance2D ; Combine the two equations.
distance3D ; Solve to get the distance in 3D Cartesian space.
|