TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Spherical Trigonometry, Circle Packing, and Lead Generation – A Journey

43 点作者 shayanjm大约 10 年前

5 条评论

mturmon大约 10 年前
Hmm. I think generating the centers is not so hard. All the centers for one triangular section lie along the points<p><pre><code> (x,y) = i * u1 + j * u2 </code></pre> where (i,j) are nonnegative integers and the basis vectors u1 and u2 are:<p><pre><code> u1 = (1,0) u2 = (1&#x2F;2, sqrt(3)&#x2F;2) </code></pre> There is a 1:1 correspondence of (i,j) to centers, so you could generate all centers with a nested for loop.<p>If you want to generate all centers in the hexagon (not just the triangle) and still preserve the 1:1 nature of the map from (i,j) to (x,y), you could just rotate 6 times by 60 degrees each time.<p>Doing just this would introduce duplicates along the edges, where the triangular segments abut each other. You could eliminate those by insisting that i&gt;0 rather than just i&gt;=0.<p>You could get the same effect as rotation by introducing a third basis vector u3, but then there would be duplicates in the map from (i,j,k) -&gt; (x,y).
评论 #9436051 未加载
skadamat大约 10 年前
The animations are incredible, more quantitative posts should have illustrations like the ones in this post!
评论 #9435870 未加载
lorddoig大约 10 年前
Hexagonal packing is good but hexagonal packing into a hexagon appears to be leaving the edges of your search radius uncovered.<p>The packing density is about aligning on a hexagonal lattice, the points of which are a simple function of the inner circle&#x27;s radius - the points in each row are 2r apart and every other row is horizontally offset by 2r * tan(60) (I hope that&#x27;s right). Could you not build a row of circles out from the center to the right edge and copy it to the rows above, offsetting as required? The length of any given row is then half of the chord it sits on i.e. sqrt(r^2 - d^2) where d is the distance from the center, in this case 2r * row-index -- with this you can then filter out which circles are outside the containing circle for that row. This fills the top-right quarter segment of the circle, and the whole thing can be filled by flipping the coordinates along x to get the bottom right, and flipping all of that along y to get the other half, then dedup the cross that forms in the middle.<p>I think, in terms of coverage, this must always be at least as good as a hexagon built out from the center, but that should be a rare case and most of the time it&#x27;d be better.<p>Evidently I&#x27;m not a mathematician. Am I being stupid here?
vitd大约 10 年前
Very neat idea, and as others have said, cool animations! However, I&#x27;m not sure I buy the premise that &quot;Social media signals can be used to give a rough picture of foot traffic around places of business,&quot; at least in general.<p>I can believe it for restaurants, hotels and popular hang-outs. But thinking about churches, strip clubs, the urologist, etc., I wonder if there are &quot;blind spots&quot; or other areas of low-quality data. Or even areas of poor cell coverage?<p>Maybe in most cities there are enough other places around that people frequent to cover over any blind spots? I&#x27;d be interested to know whether they&#x27;ve found any places like that?
评论 #9436233 未加载
ayylmaokai大约 10 年前
Pretty interesting read; I also love the graphics!