ຕົວຄິດໄລ່ໄລຍະທາງລະຫວ່າງຈຸດສອງຈຸດ
ຊອກຫາໄລຍະທາງເສັ້ນກົງລະຫວ່າງສອງຈຸດໃນແຜ່ນດິນໄຫວ
ຜົນການຄົ້ນຫາຈະຖືກອັບເດດເມື່ອທ່ານພິມມັນຂຶ້ນມາ ។
ກ່ຽວກັບເຄື່ອງຄິດໄລ່ນີ້
This calculator finds the straight-line distance between two points (x₁, y₁) and (x₂, y₂) using the distance formula, and also reports the horizontal change (Δx), the vertical change (Δy), and the midpoint of the segment, with a plot of the two points.
The distance formula, d = √((x₂ − x₁)² + (y₂ − y₁)²), is simply the Pythagorean theorem applied to a grid: the horizontal and vertical gaps are the two legs of a right triangle and the distance is the hypotenuse. Between (0, 0) and (3, 4), Δx = 3 and Δy = 4, so d = √(3² + 4²) = √(9 + 16) = √25 = 5. Because the differences are squared, the order of the points does not change the result, and negative coordinates work fine.
This is the everyday tool for map distances, the length of a line segment, the magnitude of a vector, and nearest-neighbour comparisons in data. Any two points on a plane have exactly one straight-line distance between them.
ຄໍາຖາມທີ່ຖາມເລື້ອຍໆ
ວິທີການຄິດໄລ່ໄລຍະທາງແມ່ນຫຍັງ?
ໄລຍະຫ່າງລະຫວ່າງ (0,0) ແລະ (3,4) ແມ່ນ √(9 + 16) = √25 =5.
ມັນກ່ຽວຂ້ອງກັບທັດສະນະ Pythagorean ແນວໃດ?
ພື້ນທີ່ຫວ່າງທາງລຸ່ມ ແລະ ທາງເທິງ ປະກອບເປັນສອງຂາຂອງສາມຫຼ່ຽມມົນ, ແລະ ໄລຍະຫ່າງແມ່ນ hypotenuse ຂອງ - ດັ່ງນັ້ນ ຮູບຮ່າງໄລຍະຫ່າງແມ່ນ Pythagoras ຢູ່ໃນກຣາຟ.
ຫຍັງຄື Δx ແລະ Δy?
ພວກເຂົາແມ່ນຄວາມແຕກຕ່າງດ້ານລຸ່ມແລະດ້ານເທິງລະຫວ່າງຈຸດ, x₂ - x₁ ແລະ y₂ - y₁ - ສອງຂາຂອງສາມຫຼ່ຽມມົນທີ່ຢູ່ເບື້ອງຫຼັງໄລຍະຫ່າງ.
ເຄື່ອງມືຈະສະແດງຈຸດກາງໄດ້ບໍ່?
ຖືກ. ນອກຈາກໄລຍະທາງທີ່ມັນໃຫ້ຈຸດກາງ, ໂຄຈອນແມ່ນເຄິ່ງທາງລະຫວ່າງຈຸດສອງຈຸດຢ່າງແນ່ນອນ.
ລະຫັດຂອງຈຸດແມ່ນສຳຄັນບໍ?
ບໍ່. ຄວາມແຕກຕ່າງແມ່ນເປັນກຸນແຈ, ສະນັ້ນການປ່ຽນຈຸດສອງຈຸດຈະໃຫ້ໄລຍະຫ່າງທີ່ເທົ່າກັນ.
ມັນສາມາດຈັດການກັບໂຄທັສລົບໄດ້ບໍ?
ຍອມຮັບ. ໂຄຈອນທີ່ຈິງໃດໆກໍ່ເຮັດວຽກ, ລວມທັງຕົວລົບ ແລະ ຕົວຮ້ອຍ - ການເຮັດໃຫ້ສີ່ຫຼ່ຽມມີໄລຍະທາງທັງໝົດເປັນຕົວບວກ.
API — ໃຊ້ເຄື່ອງຄິດໄລ່ນີ້ຈາກໂປຣແກຣມ
ໂທເຄື່ອງຄິດໄລ່ນີ້ເປັນຈຸດຈົບ JSON ຟຣີ - ບໍ່ຕ້ອງການກູໂກ. ສົ່ງຄ່າພື້ນທີ່ຂ້າງລຸ່ມນີ້ເປັນປາຣມາຕິກຄໍາຖາມ ຫຼື JSON. ທຸກສິ່ງທີ່ທ່ານລົບອອກ ຈະໃຊ້ຕົວອັກສອນທີ່ໜ້ານີ້ໄດ້ຕື່ມໄວ້ກ່ອນ; ພາຣາມິເຕີທີ່ບໍ່ຮູ້ແມ່ນ 400, ບໍ່ແມ່ນສະກຸນທີ່ບໍ່ມີສຽງເລີຍ. ອ່ານເອກະສານ API ເຕັມ →
ຈຸດສຸດທ້າຍ
GET https://calculator.free/api/v1/distance-two-points/
curl
curl "https://calculator.free/api/v1/distance-two-points/?x1=0&y1=0&x2=3&y2=4"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/distance-two-points/?" + new URLSearchParams({
"x1": "0",
"y1": "0",
"x2": "3",
"y2": "4"
}));
const data = await r.json();
console.log(data.results);
ຜົນໄດ້ຮັບແມ່ນຄາດຄະເນສໍາລັບຄໍາແນະນໍາທົ່ວໄປເທົ່ານັ້ນ, ບໍ່ການເງິນ, ຄໍາແນະນໍາທາງການແພດຫຼືພາສີ.