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

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/symb/symb_fv3d3.diderot
ViewVC logotype

Diff of /branches/ein16/synth/d2/symb/symb_fv3d3.diderot

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

revision 4236, Wed Jul 20 03:02:00 2016 UTC revision 4444, Sun Aug 21 21:42:06 2016 UTC
# Line 31  Line 31 
31  input vec3 axis ("axis (non-normalized) of rotation of sampling grid") = [1,1,1];  input vec3 axis ("axis (non-normalized) of rotation of sampling grid") = [1,1,1];
32  input real angle ("angle (in degrees) of rotation of sampling grid") = 0;  input real angle ("angle (in degrees) of rotation of sampling grid") = 0;
33  input vec3 off ("translation offset, in index space, from origin-centered grid") = [0,0,0];  input vec3 off ("translation offset, in index space, from origin-centered grid") = [0,0,0];
34  input int which ("which function to sample (from 0 to 2)") = 0;  
35  input vec3 parm0 ("parameters that functions may use") = [0,0,0];  input vec3 parm0 ("parameters that functions may use") = [0,0,0];
36  input vec3 parm1 ("more parameters that functions may use") = [0,0,0];  input vec3 parm1 ("more parameters that functions may use") = [0,0,0];
37  input vec3 parm2 ("even more parameters that functions may use") = [0,0,0];  input vec3 parm2 ("even more parameters that functions may use") = [0,0,0];
# Line 138  Line 138 
138     real x = pos[0];     real x = pos[0];
139     real y = pos[1];     real y = pos[1];
140     real z = pos[2];     real z = pos[2];
    vec3 ret = [0,0,0];  
    if (0 == which) {  
141          real axis1_z0 = cvt(x,y,1,base1_z0,xsq1_z0,ysq1_z0,diag1_z0);          real axis1_z0 = cvt(x,y,1,base1_z0,xsq1_z0,ysq1_z0,diag1_z0);
142          real axis1_z1 = cvt(x,y,z,base1_z1,xsq1_z1,ysq1_z1,diag1_z1);          real axis1_z1 = cvt(x,y,z,base1_z1,xsq1_z1,ysq1_z1,diag1_z1);
143          real axis1_z2 = cvt(x,y,z*z,base1_z2,xsq1_z2,ysq1_z2,diag1_z2);          real axis1_z2 = cvt(x,y,z*z,base1_z2,xsq1_z2,ysq1_z2,diag1_z2);
# Line 152  Line 150 
150          real axis3_z1 = cvt(x,y,z,base3_z1,xsq3_z1,ysq3_z1,diag3_z1);          real axis3_z1 = cvt(x,y,z,base3_z1,xsq3_z1,ysq3_z1,diag3_z1);
151          real axis3_z2 = cvt(x,y,z*z,base3_z2,xsq3_z2,ysq3_z2,diag3_z2);          real axis3_z2 = cvt(x,y,z*z,base3_z2,xsq3_z2,ysq3_z2,diag3_z2);
152          real axis3_val = axis3_z0+axis3_z1+axis3_z2;          real axis3_val = axis3_z0+axis3_z1+axis3_z2;
153          ret =[axis1_val, axis2_val, axis3_val];      return [axis1_val, axis2_val, axis3_val];
     } else {  
       // update "input int which" annotation above as cases are added  
       print("Sorry, no function defined for which = ", which, "\n");  
    }  
    return ret;  
154  }  }
155    
156  strand sample(int idx0, int idx1, int idx2) {  strand sample(int idx0, int idx1, int idx2) {

Legend:
Removed from v.4236  
changed lines
  Added in v.4444

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