a port of the Processing Visualization Language
Name

ambient()

Examples
example pic
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=126, 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 materal properties of shapes.

Syntax
ambient(gray)

ambient(color)

ambient(v1,v2,v3)
Parameters
gray int or float: number specifying value between white and black
color color: any value of the color datatype
v1 int or float: red or hue value
v2 int or float: green or saturation value
v3 int or float: green or brightness value
Returns None
Usage Web & Application
Related emissive()
specular()
shininess()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub