首页 > 文档 > ambient()环境反射率
2017
08-07

ambient()环境反射率

Name

ambient()环境反射率

   

Examples

ambient()环境反射率 - 第1张  | Processing编程艺术ambient()环境反射率 - 第2张  | Processing编程艺术ambient()环境反射率 - 第3张  | Processing编程艺术

size(100, 100, P3D);

background(0);

noStroke();

directionalLight(153, 153, 153, .5, 0, -1);

ambientLight(153, 102, 0);

ambient(51, 26, 0);

translate(70, 50, 0);

sphere(30);

Description

Sets the ambient reflectance for shapes drawn to the screen. This is combined with the ambient light component of environment. The color components set through the parameters define the reflectance. For example in the default color mode, setting v1=255, v2=127, v3=0, would cause all the red light to reflect and half of the green light to reflect. Used in combination with emissive()specular(), and shininess() in setting the material properties of shapes.

设置绘制到屏幕上的形状的环境反射率。这是与环境光的组成部分结合。通过参数设置的颜色分量定义反射率。例如在默认颜色模式下, 设置 v1=255, v2=127, v3=0, 将导致所有的红光反射和一半的绿色光反射。在设置形状的材料属性时与放射 ()、镜面 () 和光泽 () 组合使用。

Syntax

ambient(rgb)

ambient(gray)

ambient(v1, v2, v3)

Parameters

rgb

int: any value of the color datatype

颜色数据类型的任何值

gray

float: number specifying value between white and black

指定介于白色和黑色之间的数值

v1

float: red or hue value (depending on current color mode)

红色或色相值 (取决于当前颜色模式)

v2

float: green or saturation value (depending on current color mode)

绿色或饱和值 (取决于当前颜色模式)

v3

float: blue or brightness value (depending on current color mode)

蓝色或亮度值 (取决于当前颜色模式)

Returns

void

Related

emissive()
specular()
shininess()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。