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_fsd3.diderot
ViewVC logotype

Diff of /branches/ein16/synth/d2/symb/symb_fsd3.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 6  Line 6 
6  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];
7  input real angle ("angle (in degrees) of rotation of sampling grid") = 0;  input real angle ("angle (in degrees) of rotation of sampling grid") = 0;
8  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];
 input int which ("which function to sample (from 0 to 13)") = 0;  
9  input vec4 parm ("parameters that functions may use") = [0,0,0,0];  input vec4 parm ("parameters that functions may use") = [0,0,0,0];
10    
11  real theta = angle*π/180;  real theta = angle*π/180;
# Line 79  Line 78 
78     real x = pos[0];     real x = pos[0];
79     real y = pos[1];     real y = pos[1];
80     real z = pos[2];     real z = pos[2];
   
    real ret = 0;  
    if (0 == which) {  
81          real z0 = cvt(x,y,1,base_z0,xsq_z0,ysq_z0,diag_z0);          real z0 = cvt(x,y,1,base_z0,xsq_z0,ysq_z0,diag_z0);
82          real z1 = cvt(x,y,z,base_z1,xsq_z1,ysq_z1,diag_z1);          real z1 = cvt(x,y,z,base_z1,xsq_z1,ysq_z1,diag_z1);
83          real z2 = cvt(x,y,z*z,base_z2,xsq_z2,ysq_z2,diag_z2);          real z2 = cvt(x,y,z*z,base_z2,xsq_z2,ysq_z2,diag_z2);
84          ret = z0+z1+z2;      return z0+z1+z2;
85    
86    
   } else {  
       // update "input int which" annotation above as cases are added  
       print("Sorry, no function defined for which = ", which, "\n");  
    }  
    return ret;  
87  }  }
88    
89  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