如何可视化地图? (图片)

发布于 2024-09-30 05:47:43 字数 205 浏览 8 评论 0原文

我想可视化这样的地图: http://www.time.com/time /covers/20061030/where_we_live/

我可以用 opengl 或processing 来做到这一点吗?如何?

I want to visualize a map like this: http://www.time.com/time/covers/20061030/where_we_live/.

Can I do this with opengl or processing? How?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

独孤求败 2024-10-07 05:47:43

就我个人而言,我建议使用面部网格,根据美国地图进行剔除,然后根据链接中的比例对每个点进行提升和着色。

我认为它实际上比 NielsK 概述的方法更简单,困难的部分只是以易于解析的格式获取所需的数据。

Personally I would recommend using a grid of faces, culling against the map of the united states, then raising and colouring each point according to the scale featured in your link.

I think it'll actually be simpler then the method outlined by NielsK, the difficult part will just be getting the data you need in an easy to parse format.

迷你仙 2024-10-07 05:47:43

我认为最简单的方法不是使用 3D,而是使用基本的等距技术和覆盖。

拿起你的地图,将其缩放到一半高度以建议视角,然后将其绘制在画布上。

现在,创建一个与原始地图一样大的空透明位图,并在地图上放置带有数据的淡粉色圆圈。将此位图也缩放到一半高度并将其绘制在原始地图上。

之后,创建另一个圆,但将圆的半径缩小 1 像素,并将颜色再偏向深红色。再次将其缩放到一半高度,并将其绘制在现有合成上,但在 y 方向上高一个像素。不断重复此步骤,直到地图上最大的圆达到 0 半径,从而绘制最高峰。

我认为这应该创建与示例中的地图非常相似的东西,而不需要复杂的 3D 几何图形。

从视觉上看,当出现以下情况时,它会更像时间图:

- 您使用反指数公式来减小每一步圆圈的大小。在所提出的算法中,尖峰将是相当无聊的线性(锥形)并且不会变得很高。

-您使用原始地图的轮廓作为透明蒙版来限制每个数据层。在缩放到一半高度之前执行此操作。这会将您的数据峰值限制在地图的形状内,并防止它们溢出边界进入大海。

当然,可以通过使用椭圆在半高度绘制数据层来优化该算法,并将它们直接绘制在地图上。圆形/图层方式更好地说明了基本技术,并且使轮廓限制步骤更容易。

I think the simplest way to do this is not in 3D, but just using basic isometric techniques and overpainting.

Take your map, scale it to half height to suggest perspective, and draw it on your canvas.

Now, create an empty transparent bitmap as large as the orginal map, and place pale pink circles with data as if on the map. Scale this bitmap to half height as well and draw it over the original map.

After this, create another, but make your circles 1 pixel smaller in radius, and shift the color one more tint toward dark red. Scale it to half height again, and draw it over the existing composition, but one pixel higher in the y-direction. Keep repeating this step until the largest circle on your map reaches 0 radius so the highest peak is drawn.

I think that should create something very much like the map in the example, without needing complex 3D geometry.

Visually it would resemble the TIME map even more when:

-You use an inverse exponential formula to reduce the size of the circles every step. In the proposed algorithm, the spikes would be rather boringly linear (cone-shaped) and wouldn't get very high.

-You use the outline of the original map as a transparency mask to restrict each data layer. Do this before scaling to half height. This restricts your data spikes to the shape of the map, and prevents them spilling over the borders into the sea.

Of course this algorithm can be optimised by drawing the data layers at half height already using ellipses, and draw them directly over the map. The circle / layer way illustrates the basic technique better though, and makes it easier to do the outline restriction step.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文