5 
other SHORT TERM ============= (including needed for LIC) 
other SHORT TERM ============= (including needed for LIC) 
6 
============================== 
============================== 
7 


8 

Add a clamp function, which takes three arguments; either three scalars: 
9 

clamp(x, minval, maxval) = max(minval, min(maxval, x)) 
10 

or three vectors of the same size: 
11 

clamp([x,y], minvec, maxvec) = [max(minvec[0], min(maxvec[0], x)), 
12 

max(minvec[1], min(maxvec[1], y))] 
13 

This would be useful in many current Diderot programs. 
14 

One question: clamp(x, minval, maxval) is the argument order 
15 

used in OpenCL and other places, but clamp(minval, maxval, x) 
16 

would be more consistent with lerp(minout, maxout, x). 
17 


18 

Level of differentiability in field type should be statement about how 
19 

much differentiation the program *needs*, rather than what the kernel 
20 

*provides*. The needed differentiability can be less than or equal to 
21 

the provided differentiability. 
22 


23 
[GLK:1] Add sequence types (needed for evals & evecs) 
[GLK:1] Add sequence types (needed for evals & evecs) 
24 
syntax 
syntax 
25 
types: ty '{' INT '}' 
types: ty '{' INT '}' 
67 
[GLK:3] Use of Teem's "hest" commandline parser for getting 
[GLK:3] Use of Teem's "hest" commandline parser for getting 
68 
any input variables that are not defined in the source file 
any input variables that are not defined in the source file 
69 


70 
[GLK:4] ability to declare a field in such a way so that probe 
[GLK:4] ability to declare a field so that probe positions are 
71 
positions are *always* clamped to the support of "inside"; 
*always* "inside"; with various ways of mapping the known image values 
72 
there are many cases where this is the sensible behavior. 
to nonexistant index locations. One possible syntax emphasizes that 
73 
(could also have "repeat" declaration, to mimic GL_REPEAT texturing) 
there is a index mapping function that logically precedes convolution: 
74 

F = bspln3 ⊛ (img ◦ clamp) 
75 

F = bspln3 ⊛ (img ◦ repeat) 
76 

F = bspln3 ⊛ (img ◦ mirror) 
77 

where "◦" or "∘" is used to indicate function composition 
78 


79 
extend norm (exp) to all tensor types [DONE for vectors and matrices] 
extend norm (exp) to all tensor types [DONE for vectors and matrices] 
80 


85 
provided that X*Y, X/Y, X+Y, XY are already supported. 
provided that X*Y, X/Y, X+Y, XY are already supported. 
86 
Nearly every Diderot program would be simplified by this. 
Nearly every Diderot program would be simplified by this. 
87 


88 
Want: nontrivial field expressions & functions: 
[GLK:5] Want: nontrivial field expressions & functions: 
89 
image(2)[2] Vimg = load(...); 
image(2)[2] Vimg = load(...); 
90 
field#0(2)[] Vlen = Vimg ⊛ bspln3; 
field#0(2)[] Vlen = Vimg ⊛ bspln3; 
91 
to get a scalar field of vector length, or 
to get a scalar field of vector length, or 
112 
other MEDIUM TERM ============ (needed for particles) 
other MEDIUM TERM ============ (needed for particles) 
113 
============================== 
============================== 
114 


115 
[GLK:5] runtime death of strands; test/iso2d.diderot provides 
Put small 1D and 2D fields, when reconstructed specifically by tent 
116 
great initial test for "die" command. 
and when differentiation is not needed, into faster texture buffers. 
117 

test/illustvr.diderot is good example of program that uses multiple 
118 

such 1D fields basically as lookuptablebased function evaluation 
119 


120 
runtime birth of strands 
runtime birth of strands 
121 


151 


152 
Python/ctypes interface to runtime 
Python/ctypes interface to runtime 
153 


154 

Allow the convolution to be specified either as a single 1D kernel 
155 

(as we have it now): 
156 

field#2(3)[] F = bspln3 ⊛ img; 
157 

or, as a tensor product of kernels, one for each axis, e.g. 
158 

field#0(3)[] F = (bspln3 ⊗ bspln3 ⊗ tent) ⊛ img; 
159 

This is especially important for things like timevarying data, or 
160 

other multidimensional fields where one axis of the domain is very 
161 

different from the rest. What is very unclear is how, in such cases, 
162 

we should notate the gradient, when we only want to differentiate with 
163 

respect to some of the axes. 
164 


165 
============================== 
============================== 
166 
LONG TERM ==================== 
LONG TERM ==================== 
167 
============================== 
============================== 
189 
BUGS ================= 
BUGS ================= 
190 
====================== 
====================== 
191 



test/bugusevar.diderot: 


looks like varialble scoping bug is still present in some cases? 





test/bugmatrix.diderot: 


3x3 matrix subtraction is broken 


(and then fix test/vrcurvquad.diderot) 





test/read2vecs.diderot: 


// HEY (BUG?) shouldn't it be a type error to load this 2D array of 


// 2vectors into a 2D *scalar* field? Instead, get: 


// uncaught exception Fail [Fail: Error in compiling lic.diderot] 


// raised at driver/main.sml:31.3931.76 


image(2)[] Vimg = load("../data/vorttest.nrrd"); 




192 
test/zslice2.diderot: 
test/zslice2.diderot: 
193 
// HEY (bug) bspln5 leads to problems ... 
// HEY (bug) bspln5 leads to problems ... 
194 
// uncaught exception Size [size] 
// uncaught exception Size [size] 