34 #ifndef GVF_PARAMETRIC_2D_TREFOIL_KX
35 #define GVF_PARAMETRIC_2D_TREFOIL_KX 0.001
39 #ifndef GVF_PARAMETRIC_2D_TREFOIL_KY
40 #define GVF_PARAMETRIC_2D_TREFOIL_KY 0.001
44 #ifndef GVF_PARAMETRIC_2D_TREFOIL_W1
45 #define GVF_PARAMETRIC_2D_TREFOIL_W1 0.02
49 #ifndef GVF_PARAMETRIC_2D_TREFOIL_W2
50 #define GVF_PARAMETRIC_2D_TREFOIL_W2 0.03
54 #ifndef GVF_PARAMETRIC_2D_TREFOIL_RATIO
55 #define GVF_PARAMETRIC_2D_TREFOIL_RATIO 160
59 #ifndef GVF_PARAMETRIC_2D_TREFOIL_R
60 #define GVF_PARAMETRIC_2D_TREFOIL_R 80
64 #ifndef GVF_PARAMETRIC_2D_TREFOIL_ALPHA
65 #define GVF_PARAMETRIC_2D_TREFOIL_ALPHA 0
84 float nrf1 = cosf(wb*w1)*(r*cosf(wb*w2) + ratio);
85 float nrf2 = sinf(wb*w1)*(r*cosf(wb*w2) + ratio);
87 float nrf1d = -w1*sinf(wb*w1)*(r*cosf(wb*w2) + ratio) - cosf(wb*w1)*r*w2*sinf(wb*w2);
88 float nrf2d = w1*cosf(wb*w1)*(r*cosf(wb*w2) + ratio) - sinf(wb*w1)*r*w2*sinf(wb*w2);
90 float nrf1dd = -w1*w1*cosf(wb*w1)*(r*cosf(wb*w2) + ratio) + w1*sinf(wb*w1)*r*w2*sinf(wb*w2) + w1*sinf(wb*w1)*r*w2*sinf(wb*w2) - cosf(wb*w1)*r*w2*w2*cosf(wb*w2);
91 float nrf2dd = -w1*w1*sinf(wb*w1)*(r*cosf(wb*w2) + ratio) - w1*cosf(wb*w1)*r*w2*sinf(wb*w2) - w1*cosf(wb*w1)*r*w2*sinf(wb*w2) - sinf(wb*w1)*r*w2*w2*cosf(wb*w2);
93 *f1 = cosf(alpha_rad)*nrf1 - sinf(alpha_rad)*nrf2 + xo;
94 *f2 = sinf(alpha_rad)*nrf1 + cosf(alpha_rad)*nrf2 + yo;
96 *f1d = cosf(alpha_rad)*nrf1d - sinf(alpha_rad)*nrf2d;
97 *f2d = sinf(alpha_rad)*nrf1d + cosf(alpha_rad)*nrf2d;
99 *f1dd = cosf(alpha_rad)*nrf1dd - sinf(alpha_rad)*nrf2dd;
100 *f2dd = sinf(alpha_rad)*nrf1dd + cosf(alpha_rad)*nrf2dd;