Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/fields/kernel.sml
 [diderot] / branches / vis12 / src / compiler / fields / kernel.sml

# Diff of /branches/vis12/src/compiler/fields/kernel.sml

revision 1949, Sat Jul 7 04:35:18 2012 UTC revision 1950, Sat Jul 7 19:03:02 2012 UTC
# Line 44  Line 44
44      val ctmr : kernel           (* Catmull-Rom interpolation *)      val ctmr : kernel           (* Catmull-Rom interpolation *)
45      val bspln3 : kernel         (* cubic bspline reconstruction, doesn't interpolate *)      val bspln3 : kernel         (* cubic bspline reconstruction, doesn't interpolate *)
46      val bspln5 : kernel         (* quintic bspline reconstruction, doesn't interpolate *)      val bspln5 : kernel         (* quintic bspline reconstruction, doesn't interpolate *)
47        val c4hexic : kernel        (* C4 hexic kernel; doesn't interpolate *)
48
49    end = struct    end = struct
50
# Line 199  Line 200
200                  [ 81/40, ~27/8, 9/4, ~3/4, 1/8, ~1/120 ]        (*  2 .. 3 *)                  [ 81/40, ~27/8, 9/4, ~3/4, 1/8, ~1/120 ]        (*  2 .. 3 *)
201                ]                ]
202            }            }
(*
#define _C4HEXIC(x) \
(x >= 3.0 \
? 0 \
: (x >= 2.0 \
? 1539.0/160.0 + x*(-189.0/8.0 + x*(747.0/32.0 + x*(-12.0 + x*(109.0/32.0 + x*(-61.0/120.0 + x/32.0))))) \
: (x >= 1.0 \
? 3.0/160.0 + x*(35.0/8.0 + x*(-341.0/32.0 + x*(10.0 + x*(-147.0/32.0 + x*(25.0/24.0 - x*3.0/32.0))))) \
: 69.0/80.0 + x*x*(-23.0/16.0 + x*x*(19.0/16.0 + x*(-7.0/12.0 + x/16.0)))  )))
*)
203      val c4hexic : kernel = mkKernel{    (* C4 hexic kernel; doesn't interpolate *)      val c4hexic : kernel = mkKernel{    (* C4 hexic kernel; doesn't interpolate *)
204              name = "c4hexic",              name = "c4hexic",
205              support = 3,              support = 3,
206              segs = [              segs = [
207                  [  ],   (* -3 .. -2 *)                  [ 1539/160, 189/8,  747/32,  r 12,  109/32,  61/120,  1/32 ],   (* -3 .. -2 *)
208                  [  ],   (* -2 .. -1 *)                  [ 3/160,    ~35/8,  ~341/32, r ~10, ~147/32, ~25/24,  ~3/32 ],  (* -2 .. -1 *)
209                  [  ],   (* -1 .. 0 *)                  [ 69/80,    r 0,    ~23/16,  r 0,   19/16,   7/12,    1/16 ],   (* -1 .. 0 *)
210                  [  ],   (*  0 .. 1 *)                  [ 69/80,    r 0,    ~23/16,  r 0,   19/16,   ~7/12,   1/16 ],   (*  0 .. 1 *)
211                  [  ],   (*  1 .. 2 *)                  [ 3/160,    35/8,   ~341/32, r 10,  ~147/32, 25/24,   ~3/32 ],  (*  1 .. 2 *)
212                  [  ]    (*  2 .. 3 *)                  [ 1539/160, ~189/8, 747/32,  r ~12, 109/32,  ~61/120, 1/32 ]    (*  2 .. 3 *)
213                ]                ]
214            }            }
215      end      end

Legend:
 Removed from v.1949 changed lines Added in v.1950