双语阅读,一条裙子引网上热议

当光线照射在雪上,雪花的众多冰晶表面会将其反射回去,通常是在各表面间来回反射,也正因为如此,反射进我们眼睛中的光线就呈现出了白色。这就是为什么近看或放大看雪花,颜色是透明的,但是在实际生活中肉眼看上去却是白色的。

“We are always making decisions about the quantity of light that comes into our retina,” said Cedar Riener, associate professor of psychology at Randolph-Macon College。“进入视网膜的光线有多少,一直以来都是我们自己决定的,”兰道尔夫-麦肯学院心理学副教授凯达瑞纳这样说。

in vec3 vert;

带着对大地的向往

首先,“不存在两片完全相同的雪花”这一说法是假的。1988年,一名科学家发现了两个完全相同的雪结晶,而且这两片雪花都是在美国威斯康星州的一场雪暴中形成的。

Each person brings a different set of experiences and expectations, as well as attention levels and particular eye movements。每个人有不同的经历和预期,同样的,每个人注意力集中的水平和特别的眼球运动也都不一样。

out vec4 finalColor;

都跟着阳光走了   

而且还有一个人尽皆知的常识是,如果把毛剃光,北极熊的皮肤是黑色的。原因是,黑色可以锁住最多的热量,也就是说,北极熊这身皮毛不仅是一个完美的伪装,还是一个超好的保暖服。

This light, called luminance, is always a combination of how much light is shining on an object and how much it reflects off of the object’s surface, he added。这种光线叫做亮度,一直都有两部分组成:物体表面的光线和物体表面反射的光线。

cos(  0°) =  1.00 (100% of maximum brightness)

是否修成了正果

As an interesting bonus fact, the fur of Polar Bears is actually made up of translucent fibers, trapping light between its many surfaces and making the Polar Bear look white, when in actuality if you were to examine a single piece of Polar Bear fur up close it would look clear – just like a snowflake.

“In the case of the dress, some people are deciding that there is a fair amount of illumination on a blue and black (or less reflective) dress. Other people are deciding that it is less illumination on a white/gold dress (it is in shadow, but more reflective)。”“在服装的例子里,有些人认为在蓝黑服装上有相当数量的亮度(反射光线更少)。其他人则认为白色或金色的服装上的亮度更少(服装处于阴影中,反射光线更强)。

float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal));

你飞向我的怀抱    融入我的心中

1. No two snowflakes are the same

(沪江英语)

dot(v1,v2)/(length(v1)*length(v2)) == cos(angle)

不过    我懂    我懂

When light hits a snowflake, it gets reflected back from the snowflake’s many surfaces, often bouncing between these surfaces, and because of this that light is reflected back to our eyes as the color white. This is why, up close or magnified, a snowflake always looks clear, yet in reality appears as white.

必威 1一条裙子引网上热议蓝黑还是白金

Calculating The Angle Between Two Vectors: The Dot Product

那些无数次

Second biggest myth, snow isn’t white. It’s actually colorless. Snow is made up of ice particles, and ice is translucent, which means that light does not pass through it easily, but rather it gets reflected.

This is just like the famous Adelson checkerboard optical illusion. In the image below, square A is exactly the same shade as square B, but they look totally different。这个例子和著名的阿德尔森棋盘错觉是一样的。在如下的图像中,方块A和方块B的色度是一样的,但是他们看起来完全不同。

} light;

梅的颜色 

2. Snow is white

For example, what you looked at just before you looked at the dress could influence the way your brain perceived it, Borghi added. “It could also be that you’ve seen dresses (or fabric) with the same texture or shape before, which could also affect your perception。” This general phenomenon is called priming。例如,你在看这条裙子之前所看到的事物可能会影响你大脑对裙子感知的方式,波尔基补充说。“也可能,你之前已经看到过同样纹理和形状的裙子或布料,这样也会影响你的感知。”这种常见现象叫做激发效应。

线性代数计算

一声不响地走了

雪看起来总是白色的

小编引言:谁都没想过一条裙子的颜色,居然能在网上掀起惊涛骇浪~白金?蓝黑?傻傻分不清——分成两大派系的颜色争论让多少人开始怀疑人生“敢情我活了这么多年都不知道自己是色盲?!”……其实是这张照片暗藏玄机哦!就让科学解释为你探探究竟吧!

颜色理论

这是一个寒冷的季节

Likewise, snow can sometimes appear pink in mountainous regions or coastal Polar Regions due to it containing cryophilic fresh-water algae that have a red pigment in them.

Interestingly, scientists don’t know much about individual differences in perception, Riener said。有趣的是,科学家们对个人感知的差异并不是很了解,瑞纳说。

环境光+漫反射+高光 环境光觉得更应该理解为固有色;

I can live forever in dreams

First of all, it’s a myth that no two snowflakes are the same. In 1988, a scientist found two identical snow crystals that had both formed in a snow storm in Wisconsin, USA.

“The individual differences tend not to receive as much attention from perceptual researchers, since we focus on how eyes work in general,” he said. “And in general, our eyes work very similarly, since we all live in an environment where the color of the light is generally the same shade of blue。”“自从我们重点关注大体眼睛如何处理信息之后,个体差异并没有受到知觉研究者过多的关注,”他说。“一般来说,我们的眼睛处理信息都非常相似,因为我们都生活在一个环境中,光的颜色是同样色度的蓝色。”

uniform mat4 model;

The difference between the snow and the snowflakes

Deep snow can sometimes appear blue in color because the extra layers of snow create a filter for light, which causes more red light to be absorbed by the snow than blue light, meaning that it looks blue.

Our vision is heavily influenced by so-called “top-down” processing, John Borghi, a cognitive neuroscientist at Rockefeller University, told BuzzFeed News. Top-down processing “begins with the brain and flows down, filtering information through our experience and expectations to produce perceptions。”我们的视觉很大程度上受到“自上而下”信息处理的影响,洛克菲勒大学认知神经科学家约翰波尔基这样告诉BuzzFeed新闻。自上而下信息处理“首先通过大脑,然后向下处理,通过我们的经历和预期过滤信息,从而产生感知。”

finalColor = vec4(brightness * light.intensities * surfaceColor.rgb, surfaceColor.a);

今后    我还漫步在蓝天下

It’s also a commonly known fact that, if shaved, a Polar Bear would be black in color. The reason a Polar Bear’s skin is black is because black is the color which locks in the most heat, meaning the Polar Bears is not only perfectly camouflaged but also incredibly thermally insulated.

1.0 × (0, 1, 1) = (0, 1, 1) (cyan, unchanged)

Whether to make it right

深深的积雪有时候会呈现出蓝色,因为更厚的雪成为了光线的滤镜,导致雪层吸收的红光多于蓝光,这意味着雪会看起来发蓝。

gl_Position = camera * model * vec4(vert, 1);

你    还会给我讲故事吗

雪是白色的

}

                        ————文/数_风流人物

Lastly, snow doesn’t always appear to us as the color white. Not counting the infamous yellow snow that everyone knows never to eat, you can also get naturally blue snow or even pink snow.

acos(dot(v1,v2)/(length(v1)*length(v2))) == angle

名为雪花的女子

俄罗斯圣彼得堡的这场蓝色的雪:

Absorption & Reflection Of Color

匆忙地从一个冬天

3. Snow always looks white

要计算AoI入射光夹角就必须知道表面法线和入射光向量;

It's not because I'm coming

最后,雪所呈现的颜色也不是只有白色。不算上臭名昭著的黄雪(每个人都知道不要吃这种雪),还有天然的蓝色雪甚至是粉色雪。

L=lightPosition−surfacePosition

After the ten thousand departure

这是第二大误区,但其实雪不是白色的,而是无色的。雪是由冰晶分子组成的,而冰是半透明的,也就是说光线不能很轻易地穿透它,而会被其反射。

Once we have a brightness value between 0 and 1, we can multiply it by the intensities of the reflected light to get the final color for the pixel. Here is an example with cyan light:

I used to walk in the blue sky

世界上不存在两片完全相同的雪花

vec3 intensities; //a.k.a the color of the light

我望向这精灵般的雪花

必威 2

必威 3

I have a separation with you

之后,科学家了解到雪花只会有35种不同形状的造型。虽然科学家也不清楚雪花会形成各种各样形状的准确原因,但是他们已经确定出了雪花的8种主要形状,这8种形状中的每一种又有几种不同的变化。

//calculate the vector from this pixels surface to the light source

It's a cold season.

南极洲的彼得曼冰川上的粉色的雪:

//calculate the cosine of the angle of incidence

Suddenly a snow covered

Since then scientists have come to learn that snowflakes can only form into 35 different shapes. Although scientists are also unsure why exactly the various shapes of snowflake form, they have identified eight predominant shapes, with each of these eight shapes having several different variations.

If you look at the RGB value of each color, you will notice that the values represent reflectance. (0,0,0) is black, which means reflect none of the light. (1,1,1) is white, which means reflect all of the light. (1,0,0) is red, which means only reflect the red. Cyan is (0,1,1), which means only reflect blue and green. The RGB color of a surface represents how light is absorbed and reflected by that surface.

Snowflakes - my confidant

同样的,在山区或极地沿海区域的雪有时候会呈现出粉色,这是由于雪中含有喜欢寒冷的淡水藻类,而藻类的体内有红色素。

降低绿光强度(亮度),产生了新的颜色:深绿、天蓝、粉红;

I look at this fairy - like snowflake

另外补充一个有趣的小常识,北极熊的毛发其实是半透明的,但是由于光线在层层毛发的表面之间来回反射,所以北极熊看起来是白色的。事实上,如果你单独看一根北极熊的毛发,你会发现它和雪花一样,是透明的。

void main() {

我知道

Lowering the intensity (a.k.a. brightness) of the green has made a few new colors: dark green, sky blue, orange, and pink.

The daydream about snowflakes is always the same.

必威 4

I Know

L = a vector from the surface to the light source

You fly into my arms and melt into my heart

写这些的目的是为了做自己的学习笔记,建立自己的知识库。

差点又和雪花擦肩而过

vec3 surfaceToLight = light.position - fragPosition;

I never wait to snow in the sun

specular reflection 镜面反射光

Because of her arrival

// 1. The angle of incidence: brightness

那一片土地

brightness × light intensities = final color for pixel

And I can't let you stay

cos(  5°) =  0.98 ( 98% of maximum brightness)

玉的颜色

float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal));

我可以    永远活在梦幻之中

dot(v1,v2) == length(v1)*length(v2)*cos(angle)

This is because the white and incomparable.

So far, we've only used matrices to transform coordinates. The problem is that normals are not coordinates, they are unit vectors representing directions. Rotation transformations are fine, because the rotating a unit vector results in another unit vector, but scaling or translating a normal will result in an incorrect normal. The solution is to multiply the normals by a different matrix – one that has the translation and scaling parts fixed.

我从没在廊檐下等待雪来

in vec3 fragNormal;

With a yearning for the earth

diffuse 漫反射

必威 5

cyan light × magenta surface = blue light

只希望   

颜色吸收与反射

In the future I'm still walking in the blue sky

颜色1

又第一万零一次的返还

If we represent the brightness as a single number, where 0.0 is completely dark and 1.0 is maximum brightness, then it's easy to calculate based on the cosine of the AoI. The formula is brightness = cos(AoI). Let's have a look at the cosine of some angles, just to prove that it works:

Snow drift ablation

attenuation 变薄; 弄细; 稀薄化; 减少;

The color of jade and the last story.

必威 6

(————今天是二十四节气之一的大雪,以此献给大自然吧~哈哈哈~)

cos( 90°) =  0.00 (Completely dark)

雪花

之前只是对坐标用矩阵变换,对向量做矩阵变换时旋转没影响但位移和缩放时就会出问题;

我和你必有一场分离

Matrix Transformation Of Normals

10001st again

in vec2 fragTexCoord;

To go to another winter

//calculate the location of this fragment (pixel) in world coordinates

为之惊艳的雪花

// 2. The color/intensities of the light: light.intensities

            --written by truly great men --

mat3 normalMatrix = transpose(inverse(mat3(model)));

Snowflakes are reunited next winter

0.0 × (0, 1, 1) = (0, 0, 0) (black)

A woman named snowflake

Phong reflection model:如下图片解释的够清楚了吧

But I know I understand

// 3. The texture and texture coord: texture(tex, fragTexCoord)

The snowflakes are so cold and so warm

绿光亮度减半后

不索求任何东西

uniform sampler2D tex;

是一万次的离去之后

必威 7

雪花——我的知己

概念


cos( 85°) =  0.09 (  9% of maximum brightness)

必威 ,Why do you think about why

RGB三色光满强度,在白纸上产生8种颜色如图

雪花如此冰冷  又如此热情

}

It seems that snowflakes are always related to the difference.

fragNormal = vertNormal;

那些

directional lights  定向光源

从前    我漫步在蓝天下

0.5 × (0, 1, 1) = (0, 0.5, 0.5) (turquoise, which is darkened cyan)

多少年前

(0, 1, 1)  × (1, 0, 1)      = (0, 0, 1);

All along with the sun

fragTexCoord = vertTexCoord;

……

out vec2 fragTexCoord;

An amazing snowflake

必威 8

雪花啊    明年冬天重逢

void main() {

Hope to know

This "brightness" value between 0 and 1 is sometimes called the "diffuse coefficient."

而我    却无法让你留下

But what about the other colors, like orange? Well, if you take the green light and make it half as bright as it used to be, you would see the image below.

Are you going to tell me a story

uniform mat4 model;

赶往另一个冬天

uniform struct Light {

......

Calculating the reflected color is simple. The basic formula is:

Go quietly

brightness = clamp(brightness, 0, 1);

Snowflakes and snowflakes

决定了表面(看起来)的亮度

those

#version 150

沉思    为什么    为什么

ambient 环境; 周围的,包围着的; 产生轻松氛围的;

That piece of land

vec3 normal = normalize(normalMatrix * fragNormal);

Feel their whispering

vec3 position;

How many years ago

#version 150

带着迎风飞舞的姿态

Angle of Incidence( 入射角)

snowflake

vec4 surfaceColor = texture(tex, fragTexCoord);

I put my hands on this beautiful snowflake

// Apply all matrix transformations to vert

The color and Mei.

θ = the angle of incidence

我把双手伸向  这唯美的雪花

必威 9

正因为这无与伦比的洁白

//calculate final color of the pixel, based on:

仿佛雪花总是和差点有关

cos( 45°) =  0.71 ( 71% of maximum brightness)

Only hope

Removing the translation part of a 4x4 matrix is simple: we just remove the 4th column and row, converting it to a 3x3 matrix.

希望得知

in vec3 vertNormal;

因她的到来

法线的矩阵变换:

重又回到了北风

in vec2 vertTexCoord;

有关雪花的遐想  总是让人神往

in vec3 fragVert;

Last winter that even woman and children all know love

// Pass some variables to the fragment shader

也不是因为我来

vec3 fragPosition = vec3(model * vec4(fragVert, 1));

With a dances in the wind

必威 10

雪花  雪花

intensities × surface color = reflected intensities

才突然有了满身的银装

out vec3 fragNormal;

雪花飘洒    消融

原文地址

Back to the north wind

N = the surface normal vector

The countless times

Surface Normals(表面法线)

感受着她们的窃窃私语

法线通常是存在于模型空间的,也就是说是相对于未做任何变换的定点坐标的;而计算时向量是经过了positioned/scaled/rotated这些变换的世界坐标中;

Do not ask for anything

必威 11


Using only three colors of light, we can make eight different colors: red, green, blue, yellow, cyan, magenta, black and white.

Haste from a winter

uniform mat4 camera;

去年冬天那场妇孺皆知的爱情

out vec3 fragVert;

cos(100°) = -0.17 (Completely dark. Negative value means light is hitting the back side)

//calculate normal in world coordinates

spotlights  点光源

mat3 normalMatrix = transpose(inverse(mat3(model)));

vec3 transformedNormal = normalize(normalMatrix * normal);

The vector from the surface to the light source, L, can be calculated with vector subtraction, like so:

fragVert = vert;

本文由必威发布于必威,转载请注明出处:双语阅读,一条裙子引网上热议

您可能还会对下面的文章感兴趣: