Key | Description |
---|---|
m | Change cloth movement algorithm (none, Euler, midpoint, Runga-Kutta) |
x | Toggles adaptive step on/off |
p | Pause |
space | Moves the cloth a single step |
d | Switch particles drawing method (none, dots, lines) |
c | Toggles cloth drawing on/off |
o | Switch obstacle drawing method (none, wire, solid) |
n | Toggles normal drawing on/off |
b | Toggles blending on/off |
f | Focus on the cloth |
a | Toggles auto-focus on/off |
r | Resets the cloth's parameters (position and velocity) |
l | Loads a different cloth file |
k | Reloads the last cloth from file |
t | Resets the cloth's and light's arcballs |
s | (Un)stuck the stationary points in place |
q | Quit |
Attribute | Parameters | Description | Default value |
---|---|---|---|
Size | int u,v | The cloth's size: uxv | 20 20 |
Mass | double m | The mass of each particle | 2 |
Base | double x,y,z | The base position of the cloth (particle 0,0 that the cloth is positioned by) | 0 0 0 |
Direction | ({x,y,z},{x,y,z}) | The direction to the u,v axis of the cloth. i.e for standing cloth Direction y x | x z |
Distance | double d | The starting distance between each two neighboring particles (up,down,left,right) | 1 |
Breaking | double d | The maximal stretch between two neighboring particles before the cloth tears. To disable tearing set to 0 | 0 |
Step | int s | The number of milliseconds between each simulation step | 20 |
Time | double t | The number of seconds that had passed between each step (delta(t)) | 0.02 |
G | double g | The gravity constant | 20 |
KS | double KS | KS value for all 3 spring types | |
KD | double KD | KD value for all 3 spring types | |
Near | double KS,KD | The KS and KD of the near spring (up,down,left,right) | 3000 50 |
Far | double KS,KD | The KS and KD of the far spring (up up,down down,left left,right right) | 500 10 |
Cross | double KS,KD | The KS and KD of the cross spring (up left, up right,down left, down right) | 2000 10 |
Drag | double d | The drag force constant (0 to disable) | 0.2 |
Wind | double x,y,z,f | The wind's direction (x,y,z) and power p (set power 0 to disable) | 1 0 0 0 |
Pos | int u,v double x,y,z | Sets the starting position of particle (u,v) to (x,y,z) | Per particle according to grid |
Stuck | int u,v | Makes particle (u,v) stationary | (non stationary by default) |
Hole | int u,v | Disconnects particle (u,v) from all its neighbors | (no holes by default) |
Color | {front, back, background} double r,g,b,a | Sets the color of the cloth (two sides) and the color of the background | front 0.2 0.2 1.0 1.0 back 0.2 1.0 0.2 1.0 background 0 0 0 1 |
Blending | none | Begins simulation with blending turned on | (blending is off by default) |
Movement | {null, euler, midpoint, runga-kutta} | The movement algorithm to use | runga-kutta |
Sphere | double x,y,z,r | Places a sphere obstacle with the center at (x, y, z) and with radios r | (No spheres by default) |
Adaptive | none | Begins simulation with adaptive step turned on | (adaptive step is off by default) |
To show how our exercise behaves we chose some clothes with interesting features,and some which don't behave exactly as one might have wanted but still are fun to see. (at least for us...).