Weaving in ASCII
Ruby, 72 bytes
w,h,v,u,s,i=$*.map &:to_i;h.times{puts ((?-*v+?|*u)*w)[-i%(u+v),w];i+=s}
Not a lot to say about this. I build one repetition of -
and |
, repeat it w
times (just to be sure), and the I slice out the appropriate section for each line.
JavaScript (ES 6) 128
F=(w,h,i,v,u,s)=>{for(x=('-'[R='repeat'](v)+'|'[R](u))[R](w*h),l=v+u,i=-i%l+l,s=-s%l+l;h--;i+=s)console.log(x.substr(i,w)+'\n')}
Test
F(11,8,2,5,3,-2)
||-----|||-
-----|||---
---|||-----
-|||-----||
||-----|||-
-----|||---
---|||-----
-|||-----||
Python, 92 bytes
w,h,i,v,u,s=eval(A)
x=('|'*u+'-'*v)*w
while h:print(x[-i:]+x[:-i])[-w:];x=x[-s:]+x[:-s];h-=1
Hmm... So tempted to learn ruby now.
Input by assigning a string variable in this format: "width, height, initial shift, v, u, s".
Paste before the program:
A="80,80,0,2,2,-9"