美文网首页
数据结构可视化

数据结构可视化

作者: 矮油不错哦_ab60 | 来源:发表于2018-09-10 22:37 被阅读8次

    前言:

    人是一种视觉动物,我们可以通过视觉来思考数据结构

    Visualizing Algorithms(算法可视化)

    1. The power of the unaided mind is highly overrated… The real powers come from devising external aids that enhance cognitive abilities. —Donald Norman

    独立思维的力量被高估了...... 真正的力量来自于设计提高认知能力的外部辅助手段。 - 唐纳德诺曼

    1. Algorithms are a fascinating use case for visualization. To visualize an algorithm, we don’t merely fit data to a chart; there is no primary dataset. Instead there are logical rules that describe behavior. This may be why algorithm visualizations are so unusual, as designers experiment with novel forms to better communicate. This is reason enough to study them.

    算法是可视化的一个迷人用例。为了使算法可视化,我们不仅仅将数据拟合到图表中; 没有主要数据集。相反,存在描述行为的逻辑规则。这可能是算法可视化非常不寻常的原因,因为设计师尝试使用新颖的形式来更好地进行交流。这是足以研究它们的原因。

    1. But algorithms are also a reminder that visualization is more than a tool for finding patterns in data. Visualization leverages the human visual system to augment human intellect: we can use it to better understand these important abstract processes, and perhaps other things, too.

    但算法也提醒人们,可视化不仅仅是一种查找数据模式的工具。可视化利用人类视觉系统来增强人类智力:我们可以用它来更好地理解这些重要的抽象过程,也可能是其他事物。

    1. Sampling
      Before I can explain the first algorithm, I first need to explain the problem it addresses.

    取样
    在我解释第一个算法之前,我首先需要解释它解决的问题。

    Van Gogh’s The Starry Night
    1. Light — electromagnetic radiation — the light emanating from this screen, traveling through the air, focused by your lens and projected onto the retina — is a continuous signal. To be perceived, we must reduce light to discrete impulses by measuring its intensity and frequency distribution at different points in space.

    光 - 电磁辐射 - 从这个屏幕发出的光,在空中传播,由你的镜头聚焦并投射到视网膜上 - 是一个连续的信号。要被察觉,我们必须通过测量空间中不同点的强度和频率分布来减少光到离散脉冲。

    1. This reduction process is called sampling, and it is essential to vision. You can think of it as a painter applying discrete strokes of color to form an image (particularly in Pointillism or Divisionism). Sampling is further a core concern of computer graphics; for example, to rasterize a 3D scene by raytracing, we must determine where to shoot rays. Even resizing an image requires sampling.

    这种简化过程称为抽样,对视力至关重要。你可以把它想象成一个画家应用不连续的颜色笔画形成一个图像(特别是在点彩派或分裂主义)。采样是计算机图形学的核心问题; 例如,要通过光线追踪光栅化3D场景,我们必须确定拍摄光线的位置。即使调整图像大小也需要采样。

    1. Sampling is made difficult by competing goals. On the one hand, samples should be evenly distributed so there are no gaps. But we must also avoid repeating, regular patterns, which cause aliasing. This is why you shouldn’t wear a finely-striped shirt on camera: the stripes resonate with the grid of pixels in the camera’s sensor and cause Moiré patterns.

    竞争目标使得抽样变得困难。一方面,样品应均匀分布,以便没有间隙。但我们还必须避免重复的常规模式,这会导致混叠。这就是为什么你不应该在相机上穿一件精美条纹的衬衫:条纹与相机传感器中的像素网格共振,并导致莫尔条纹。

    This micrograph is of the human retina’s periphery. The larger cone cells detect color, while the smaller rod cells improve low-light vision.
    1. The human retina has a beautiful solution to sampling in its placement of photoreceptor cells. The cells cover the retina densely and evenly (with the exception of the blind spot over the optic nerve), and yet the cells’ relative positions are irregular. This is called a Poisson-disc distribution because it maintains a minimum distance between cells, avoiding occlusion and thus wasted photoreceptors.

    人类视网膜有一个美丽的解决方案,采样感光细胞的位置。细胞密集均匀地覆盖视网膜(视神经上方的盲点除外),但细胞的相对位置不规则。这称为泊松圆盘分布,因为它保持了细胞之间的最小距离,避免了遮挡,从而浪费了光感受器。

    1. Unfortunately, creating a Poisson-disc distribution is hard. (More on that in a bit.) So here’s a simple approximation known as Mitchell’s best-candidate algorithm.

    不幸的是,创建Poisson-disc分布很难。(稍微详细一点。)所以这是一个简单的近似,称为米切尔的最佳候选算法。

    参考链接Visualizing Algorithms

    相关文章

      网友评论

          本文标题:数据结构可视化

          本文链接:https://www.haomeiwen.com/subject/hbwegftx.html