Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/vr-curv-quad.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/vr-curv-quad.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/pure-cfg/test/vr-curv.diderot revision 911, Thu Apr 21 18:37:43 2011 UTC branches/pure-cfg/test/vr-curv-quad.diderot revision 913, Thu Apr 21 18:54:26 2011 UTC
# Line 10  Line 10 
10  image(2)[3] imgRGB = load("../data/hue.nhdr");  image(2)[3] imgRGB = load("../data/hue.nhdr");
11  field#0(2)[3] RGB = imgRGB ⊛ tent;  field#0(2)[3] RGB = imgRGB ⊛ tent;
12    
13    // set camera, image, and rendering parameters
14  vec3 camEye = [183.021, -411.857, 686.458];  vec3 camEye = [183.021, -411.857, 686.458];
15  vec3 camAt = [55.4037, 40.2407, 4.32732];  vec3 camAt = [55.4037, 40.2407, 4.32732];
16  vec3 camUp = [0.0, 0.0, 1.0];  vec3 camUp = [0.0, 0.0, 1.0];
# Line 21  Line 22 
22  real rayStep = 0.2;  real rayStep = 0.2;
23  real valOpacMin = -0.25;  real valOpacMin = -0.25;
24  real valOpacMax = -0.10;  real valOpacMax = -0.10;
25    vec3 lightVspDir = [0.9, -2.5, -2.5];
26    vec3 lightRGB = [1.0, 1.0, 1.0];
27    real phongKa = 0.1;
28    real phongKd = 0.7;
29    real phongKs = 0.3;
30    real phongSp = 45.0;
31    
32    // (boilerplate) computation of camera and light info
33  real camDist = |camAt - camEye|;  real camDist = |camAt - camEye|;
34  real camVspNear = camNear + camDist;  real camVspNear = camNear + camDist;
35  real camVspFar = camFar + camDist;  real camVspFar = camFar + camDist;
# Line 30  Line 38 
38  vec3 camV = camN × camU;  vec3 camV = camN × camU;
39  real camVmax = tan(camFOV*3.1415926536/360.0)*camDist;  real camVmax = tan(camFOV*3.1415926536/360.0)*camDist;
40  real camUmax = camVmax*real(imgResU)/real(imgResV);  real camUmax = camVmax*real(imgResU)/real(imgResV);
   
 vec3 lightVspDir = [0.9, -2.5, -2.5];  
41  vec3 lightDir = normalize(lightVspDir[0]*camU +  vec3 lightDir = normalize(lightVspDir[0]*camU +
42                            lightVspDir[1]*camV +                            lightVspDir[1]*camV +
43                            lightVspDir[2]*camN);                            lightVspDir[2]*camN);
 vec3 lightRGB = [1.0, 1.0, 1.0];  
   
 real phongKa = 0.1;  
 real phongKd = 0.7;  
 real phongKs = 0.3;  
 real phongSp = 45.0;  
44    
45  strand RayCast (int ui, int vi) {  strand RayCast (int ui, int vi) {
46      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);

Legend:
Removed from v.911  
changed lines
  Added in v.913

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0