From 58230a2591414fb38b9ec8d3a76439b290cb0a6f Mon Sep 17 00:00:00 2001 From: mihaf <miha.fosnaric@gmail.com> Date: Tue, 18 Mar 2014 13:09:23 +0000 Subject: [PATCH] Adding ending energy to filaments. In progress. Continue in single_filament_vertex_move --- src/poly.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/poly.c b/src/poly.c index aa41184..d99d2ad 100644 --- a/src/poly.c +++ b/src/poly.c @@ -97,14 +97,14 @@ else { /* Make filaments inside the vesicle. Helix with radius... Dist. between poly vertices put to 1*/ - dphi = 2*asin(1/2/vesicle->R_nucleus)*1.001; - dh = dphi/2/M_PI*1.001; + dphi = 2.0*asin(1.0/2.0/vesicle->R_nucleus)*1.001; + dh = dphi/2.0/M_PI*1.001; for(i=0;i<poly_list->n;i++){ for (j=0;j<poly_list->poly[i]->vlist->n;j++){ ji = j + i*poly_list->poly[i]->vlist->n; poly_list->poly[i]->vlist->vtx[j]->x = vesicle->R_nucleus*cos(ji*dphi); poly_list->poly[i]->vlist->vtx[j]->y = vesicle->R_nucleus*sin(ji*dphi); - poly_list->poly[i]->vlist->vtx[j]->z = ji*dh; + poly_list->poly[i]->vlist->vtx[j]->z = ji*dh - (dh*poly_list->n*poly_list->poly[i]->vlist->n/2.0); } } } -- Gitblit v1.9.3