Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
piotrjaw
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
piotrjaw
4y ago
Sure! It's pretty straightforward actually. The first approach (which is a simplification) uses the usual way to calculate a distance between two points on a FLAT plane, which using is the Pythagorean Theorem. So d = √((y1 - y2)^2 + (x
2.
▲
by
piotrjaw
4y ago
Same here, we use GeoJSON for floor plans and it works great. Yeah, too bad that Turf is geographical only, but it still has some nice helpers that are agnostic to the shape of the plane.
3.
▲
by
piotrjaw
4y ago
Hey, that was the idea for the next article...
4.
▲
by
piotrjaw
4y ago
Indeed, I added a couple of paragraphs in the end explaining the difference and the actual results. As a side note, I actually got slightly different numbers, but maybe that's because of the lower quality of data that I used.
5.
▲
by
piotrjaw
4y ago
I've actually added this to the article, thank you again!
6.
▲
by
piotrjaw
4y ago
You're correct, this is just a synthetic value used to rank the distances.
7.
▲
by
piotrjaw
4y ago
Damn, this is a great point, thank you!
8.
▲
by
piotrjaw
4y ago
That is correct, but - as pointed in the article - we work on floor plans, which are flat, so I wanted to simplify this a bit to not create too much issues to solve in one article. That said, it was probably an oversimplification, since act
9.
▲
by
piotrjaw
4y ago
Impressive, thank you for sharing!
10.
▲
by
piotrjaw
4y ago
Indeed, but the convex hull approach also works for multiple sets of points, in any order. As for [2], in the article the data is separated into 16 polygons, so the interior lines are actually shared between polygons. It's still possib
11.
▲
Calculating the maximum diagonal distance in a given set of points
(piotrjaworski.medium.com)
58 points
by
piotrjaw
4y ago
|
42 comments
12.
▲
GammaCV: A simple custom operation example
(piotrjaworski.medium.com)
9 points
by
piotrjaw
4y ago
|
1 comments
13.
▲
by
piotrjaw
4y ago
I wrote a new blog post about Computer Vision in JavaScript - if you want to learn how to create a simple operation pipeline and a custom operation using GammaCV (a JavaScript Computer Vision library), check it out!
14.
▲
Microfront ends – should I care?
(medium.com)
2 points
by
piotrjaw
5y ago
|
0 comments
15.
▲
How to create a musical instrument using Computer Vision in JavaScript
(medium.com)
2 points
by
piotrjaw
6y ago
|
0 comments
16.
▲
How to create a musical instrument with no notes using JavaScript
(medium.com)
1 points
by
piotrjaw
6y ago
|
0 comments
17.
▲
Microfront ends – should I care?
(medium.com)
2 points
by
piotrjaw
6y ago
|
0 comments