{
A1 = length of 1 period
A2 = angle of ribs (0-90)
A3 = bottom length
A4 = top length

ex:

void texfunc NS
6 xcor ycor zcor ./refs/decking.cal -rz 180
0
4 .667 71.5673 .1808 .3186

}
angle = A2*DEGREE;

F1 = A3/A1;
F2 = (A1-A3-A4)/2/A1 + F1;
F3 = A4/A1 + F2;
inc = frac(Px/A1);
zcor = if(and(inc-F1,F2-inc),cos(-angle),if(inc-F3,cos(angle),0));
xcor = if(and(inc-F1,F2-inc),sin(-angle),if(inc-F3,sin(angle),0));
ycor = 0;
