Homework 10 - Fiber Net deformation via hand coded Gaussian Elimination
First Draft Due 1pm Friday November 2. Final Draft Due 5pm Monday, November 5

You will load, solve and animate a class of cantilevers like that exhibited above. This one is 6 cells wide and 4 cells tall. It has 102 fibers and 60 degrees of freedom. If the fibers and nodes are numbered as indicated then one arrives at an adjacency matrix like that spied above. Regardless of the number of cells, this cantilever has length 2 and height 1. As a result, the angles of the cross bars will depend upon your choice of cx (the number of horizontal cells) and cy (the number of vertical cells). NOTE: The diagonal bars cross over one another without calling for a node. You will adapt and extend last week's function to

    function cantilever2(cx,cy,Ea,F,nof)

where cx and cy dictate the geometry of the net, Ea is the vector of modulus area products, F is the strength of the downward force at the center of the right face (node 18 in the figure above), and nof is the number of frames in the resulting movie. NOTE: The right face has no center unless cy is even. Your code may presume that the user will only call it with an even cy.

In addition to encoding a new net this week's code must also replace last week's miraculous x=S\f with

    x = gauss(S,f)

where gauss is a subfunction that you must write and append to cantilever2. Recall that this subfunction has been sketched for you on the lecture page. In particular, it itself calls the subfunction trisolve. You should of course test your gauss against backslash on a number of random matrices before tucking it into cantilever2.

Your code must accomodate an arbitrary number of cells and it must produce a jpeg figure via spy(A) and an avi movie of the net undergoing an incremental force at the center of its right face, as in this 2-by-2 example.

Your work will be graded as follows:

        First draft
                3 pts for adjacency matrix pseudo-code
                3 pts for gauss pseudo-code

        Final draft 
                6 pts for header CONTAINING detailed USAGE
                8 pts for further comments in code 
                4 pts for indentation
                4 pts for correct undeformed coordinates
                4 pts for correct adjacency matrix
                4 pts for correct plotting of deformed cantilever
                4 pts for correct row swapping in gauss
                8 pts for correct row mixing in gauss

		4 pts for diary establishing that gauss and backslash
                  produce the same solution to two random systems.

	        4 pts for labeled jpeg plot of adjacency matrix, cx=4, cy=6
                4 pts for 20 frame avi movie of moving cantilever, cx=4, cy=6