phongParams.lsc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Script to test the effect of varying phong shading parameters
# Creates multiple objects with varying diffuse/specular components.
# --------------------------------------------------------------------------------

baseDir = "c:\research\reliefPaper\data\";
object = open(baseDir&"MtRainierTestArea.srf");

specular = 10;

while (specular < 100);
{
    diffuse = 10;
    while (diffuse <100);
    {
        edit(object,"specular",specular);
        edit(object,"diffuse",diffuse);
        relief = surfparam(object,"shade",3,1);

        fileName = baseDir&"phongParams/rainierD"&diffuse&"S"&specular&".png";
        draw(fileName,relief);

        diffuse = diffuse+20;
    }
    specular = specular+20;
}