// // time: Mon Jan 10 11:43:00 1994 // // version: 2.0.1 // // Begin MDF // MODULE CatmullRom // CATEGORY Splines // DESCRIPTION Catmull-Rom interpolating spline // INPUT data; group or field or series or value list; (none); // INPUT n; value list or field; (none); // INPUT count; value list or field; (none); number of group members // OUTPUT out; value or value list or field; // End MDF // workspace: width = 1416, height = 1180 // layout: snap = 0, width = 50, height = 50, align = CC // macro CatmullRom( data ,n ,count ) -> ( out ) { // // node Input[1]: x = 125, y = 8, inputs = 0, label = Input // // parameter: position = 1, name = 'data', value = ' ', descriptive = 0, description = ' ', required = 1 CatmullRom_Input_1_out_1 = data; // // node Input[2]: x = 292, y = 5, inputs = 0, label = Input // // parameter: position = 2, name = 'n', value = ' ', descriptive = 0, description = ' ', required = 1 CatmullRom_Input_2_out_1 = n; // // node Input[3]: x = 381, y = 5, inputs = 0, label = Input // // parameter: position = 3, name = 'count', value = ' ', descriptive = 0, description = 'number of group members', required = 1 CatmullRom_Input_3_out_1 = count; // // node Compute[5]: x = 289, y = 83, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "int ($0)" // // expression: value = int (a) // name[2]: value = a CatmullRom_Compute_5_out_1 = Compute( CatmullRom_Compute_5_in_1, CatmullRom_Input_2_out_1 ) [instance: 5, cache: 1]; // // node Compute[6]: x = 148, y = 376, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 - float (int ($0))" // // expression: value = a - float (int (a)) // name[2]: value = a CatmullRom_Compute_6_out_1 = Compute( CatmullRom_Compute_6_in_1, CatmullRom_Input_2_out_1 ) [instance: 6, cache: 1]; // // node Compute[2]: x = 191, y = 175, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0-3" // // expression: value = a-3 // name[2]: value = a CatmullRom_Compute_2_out_1 = Compute( CatmullRom_Compute_2_in_1, CatmullRom_Compute_5_out_1 ) [instance: 2, cache: 1]; // // node Compute[3]: x = 306, y = 176, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0-2" // // expression: value = a-2 // name[2]: value = a CatmullRom_Compute_3_out_1 = Compute( CatmullRom_Compute_3_in_1, CatmullRom_Compute_5_out_1 ) [instance: 3, cache: 1]; // // node Compute[4]: x = 422, y = 177, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0-1" // // expression: value = a-1 // name[2]: value = a CatmullRom_Compute_4_out_1 = Compute( CatmullRom_Compute_4_in_1, CatmullRom_Compute_5_out_1 ) [instance: 4, cache: 1]; // // node NthMember[4]: x = 510, y = 269, inputs = 3, label = NthMember // CatmullRom_NthMember_4_out_1 = NthMember( CatmullRom_Input_1_out_1, CatmullRom_Compute_5_out_1, CatmullRom_Input_3_out_1 ) [instance: 4, cache: 1]; // // node NthMember[1]: x = 183, y = 275, inputs = 3, label = NthMember // CatmullRom_NthMember_1_out_1 = NthMember( CatmullRom_Input_1_out_1, CatmullRom_Compute_2_out_1, CatmullRom_Input_3_out_1 ) [instance: 1, cache: 1]; // // node NthMember[2]: x = 297, y = 273, inputs = 3, label = NthMember // CatmullRom_NthMember_2_out_1 = NthMember( CatmullRom_Input_1_out_1, CatmullRom_Compute_3_out_1, CatmullRom_Input_3_out_1 ) [instance: 2, cache: 1]; // // node NthMember[3]: x = 405, y = 272, inputs = 3, label = NthMember // CatmullRom_NthMember_3_out_1 = NthMember( CatmullRom_Input_1_out_1, CatmullRom_Compute_4_out_1, CatmullRom_Input_3_out_1 ) [instance: 3, cache: 1]; // // node Compute[1]: x = 332, y = 381, inputs = 5, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0,$1,$2,$3]" // // expression: value = [a,b,c,d] // name[2]: value = a // name[3]: value = b // name[4]: value = c // name[5]: value = d CatmullRom_Compute_1_out_1 = Compute( CatmullRom_Compute_1_in_1, CatmullRom_NthMember_1_out_1, CatmullRom_NthMember_2_out_1, CatmullRom_NthMember_3_out_1, CatmullRom_NthMember_4_out_1 ) [instance: 1, cache: 1]; // // node CubicSpline[1]: x = 268, y = 467, inputs = 3, label = CubicSpline // input[2]: defaulting = 0, visible = 1, type = 16777245, value = {[[-.5 1.5 -1.5 .5][1 -2.5 2 -.5][-.5 0 .5 0][0 1 0 0]]} // CatmullRom_CubicSpline_1_out_1 = CubicSpline( CatmullRom_Compute_6_out_1, CatmullRom_CubicSpline_1_in_2, CatmullRom_Compute_1_out_1 ) [instance: 1, cache: 1]; // // node Output[1]: x = 277, y = 558, inputs = 1, label = Output // // parameter: position = 1, name = 'out', value = ' ', descriptive = 0, description = ' ', required = 0 out = CatmullRom_CubicSpline_1_out_1; // network: end of macro body } CatmullRom_Input_1_out_1 = NULL; CatmullRom_Input_2_out_1 = NULL; CatmullRom_Input_3_out_1 = NULL; CatmullRom_Compute_5_in_1 = "int ($0)"; CatmullRom_Compute_5_out_1 = NULL; CatmullRom_Compute_6_in_1 = "$0 - float (int ($0))"; CatmullRom_Compute_6_out_1 = NULL; CatmullRom_Compute_2_in_1 = "$0-3"; CatmullRom_Compute_2_out_1 = NULL; CatmullRom_Compute_3_in_1 = "$0-2"; CatmullRom_Compute_3_out_1 = NULL; CatmullRom_Compute_4_in_1 = "$0-1"; CatmullRom_Compute_4_out_1 = NULL; CatmullRom_NthMember_4_out_1 = NULL; CatmullRom_NthMember_1_out_1 = NULL; CatmullRom_NthMember_2_out_1 = NULL; CatmullRom_NthMember_3_out_1 = NULL; CatmullRom_Compute_1_in_1 = "[$0,$1,$2,$3]"; CatmullRom_Compute_1_out_1 = NULL; CatmullRom_CubicSpline_1_in_2 = {[[-.5 1.5 -1.5 .5][1 -2.5 2 -.5][-.5 0 .5 0][0 1 0 0]]}; CatmullRom_CubicSpline_1_out_1 = NULL;