<< >> Up Title

Section material

This section defines a material of a specific type and characteristic. In the section object you can use the material defined in this section.

section_material = { . material . name . name_material . ; . model . { . defmaterial . } . }

name_material = ident

defmaterial = [ defmat_phong ]

defmat_phong = phong . { [ def_Ks | def_Kt | def_ni | def_Ka | def_Kd | def_n | def_Od | def_Os ] }

def_Ks = Ks . number_real . ;

def_Kt = Kt . number_real . ;

def_ni = ni . number_real . ;

def_Ka = Ka . number_real . ;

def_Kd = Kd . number_real . ;

def_n = n . number_real . ;

def_Od = Od . color . ;

def_Os = Os . color . ;

name_material

name of the material. It must be unique to distinguish a definition from another.

defmat_phong

definition of material of type phong. See [1].

def_Ks

Specular-reflection coefficient.

def_Kt

Refraction coefficient.

def_ni

index of refraction.

def_Ka

Ambient-reflection coefficient.

def_Kd

Diffuse-reflection coefficient.

def_n

Specular-reflection exponent.

def_Od

Diffuse color.

def_Os

Specular color.


<< >> Up Title