![]() |
ANU College of Engineering and Computer Science
School of Computer Science
|
|
COMP3320/COMP6464 Cloth Dyanmics Project
D R A F T (No new content to add - just submission details and clarifications)Worth 20%
Between each pair of nodes we define an interaction given by
Hookes law. Where K is the force constant determining how stiff the spring is, R12 is the Euclidean distance between the two nodes and Eq12 is the equilibrium distance between these two nodes. For example if node (1,1) and node (1,2) have Eq12=1*d then node (1,1) and node (2,2) have Eq12=sqrt(2)*d. Each node we will assign a mass, noting that the force and accelaration are related by F=ma. The cloth is initially positioned in the xz plane and subjected to a gravitational force g in the y direction. As a consequence the cloth will slowly fall under gravity. Positioned below the cloth is a ball of radius, r, such that the centre of the cloth is located 1+r units above the centre of the ball. The cloth is allowed to fall under gravity until it collides with the ball. You follow the motions of the nodes using the same velocity verlet algorithm that you used for the MD. The difference arises when a node in the cloth hits the ball. You detect this by noticing that the updated position of the node is within the radius of the ball. At this point you move the node to the nearest point on the surface of the ball. While building on the understanding you gained in assignment 1 concerning numerical simulation, an important part of this assignment will be parallelising your simulation code. I will detail what is required for the parallelisation later, when we have covered the relevant material in lectures. Before getting to that part, however, there is considerable work to do and things you need to fully appreciate! STEP 1
As discussed in lectures, something is not quite right! If you inspect the code you will see that if the new coordinates for the cloth are within the ball, then that node of the cloth is moved back to the surface of the ball. This happens here for node in nodes: dist = node.pos-vector(myball.x,myball.y,myball.z) if dist.mag < myball.radius: fvector=dist/dist.mag*myball.radius node.pos=vector(myball.x,myball.y,myball.z)+fvectorA problem arises in that the velocity of the node remains the same. In this step modify the code such that the component of the velocity that is in the direction of fvector above is set to zero. In otherwords only the component of the velocity that is tangential to the surface is allowed to be non-zero following a collision of a cloth node with the ball. (If you are uncertain how to do this, try using forum, or talking to Pete or I). STEP 2
STEP 3:
Your performance analysis should include STEP 4: COMP6464 ONLY
Note that you will not be able to visualize your simulation on Wallaman, so you will need to produce a code fully implemented in C in order to gather performance data. For consistency, you may have to rerun some of your tests on Partch with the new C code. BONUS STEP: Only if you complete the above steps to high standard
You task here is to implement a concept of the cloth ripping. To do this add another input parameter -r that reads in a floating point number greater than 1.0 that indicates how much one of the springs can extend before they break. Give this parameter a default value of 1.5. Augment your code to print out the number of broken springs (along with the potential energy) if run in verbose mode. Have the python code remove from the visualization any "convex" if any spring that connects any two of the four vertices is broken. MARKING AND SUBMISSIONCOMP3320 Marking Guide (out of 20)
You are required to submit a tar file using the submit tool on one of the student computers: submit comp3320 cloth_project cloth.tar or if you are a COMP6464 student submit comp6464 cloth_project cloth.tar |
|
Please direct all enquiries to: comp3320@cs.anu.edu.au Page authorised by: Head of School, SoCS |
| The Australian National University — CRICOS Provider Number 00120C |