| | |
| | | xh+=tot*(j->data->x - data->x); |
| | | yh+=tot*(j->data->y - data->y); |
| | | zh+=tot*(j->data->z - data->z); |
| | | txn+=jt->data->xnorm; |
| | | tyn+=jt->data->ynorm; |
| | | tzn+=jt->data->znorm; |
| | | txn+=jt->xnorm; |
| | | tyn+=jt->ynorm; |
| | | tzn+=jt->znorm; |
| | | } |
| | | |
| | | h=xh*xh+yh*yh+zh*zh; |
| | |
| | | data->curvature=-sqrtl(h); |
| | | } |
| | | #endif |
| | | //TODO: MAJOR!!!! What is vtx->data->c?????????????? Here it is 0! |
| | | // What is vtx->data->c?????????????? Here it is 0! |
| | | // c is forced curvature energy for each vertex. Should be set to zero for |
| | | // norman circumstances. |
| | | data->energy=0.5*s*(data->curvature/s-data->c)*(data->curvature/s-data->c); |
| | | |
| | | return TS_SUCCESS; |