yes, i tried to change the codes to make it possible to change the number of lines, i think it was some np or something, if i start with 2, it draw correctly.

but when i add slider to control it, it was some new errors i have no seen before and it was stuck for a while.

the final goal is i hope to make it like the MIT TEAL applets visualization, which i should be able to do more it i can figure out the codes better, like the vernier caliper model, DC motor etc.

i seem to have misplaced the working file, will attach it when i find it