so I have this fence with vertical slats, spaced evenly.

It starts with an unrotated slat, then for each new slat up till 10, it rotates 5 degrees. then it rotates back for every slat up til the next 10 by 5 degrees, then ends with an unrotated slat, then starts allover again.

(see attachement for front & topview)

Amongst other things, I was thinking of using an arithmetic node plugged into the z fixed rotation, but I can't seem to figure it out.

Math has never been my strongest suit so expressions are doing my head in.

any ideas ?

It starts with an unrotated slat, then for each new slat up till 10, it rotates 5 degrees. then it rotates back for every slat up til the next 10 by 5 degrees, then ends with an unrotated slat, then starts allover again.

(see attachement for front & topview)

Amongst other things, I was thinking of using an arithmetic node plugged into the z fixed rotation, but I can't seem to figure it out.

Math has never been my strongest suit so expressions are doing my head in.

any ideas ?