From 720bd4fb98f2537dcca54f538dd85f63f8320c10 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 02 Mar 2016 15:46:38 +0000
Subject: [PATCH] Updated README

---
 src/shdiscover.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/shdiscover.c b/src/shdiscover.c
index 9783ef6..008d522 100644
--- a/src/shdiscover.c
+++ b/src/shdiscover.c
@@ -24,14 +24,15 @@
 ts_fprintf(stdout,"P(0,0,0.5)=%f (%f)\n",plgndr(0,0,0.5),1.0);
 ts_fprintf(stdout,"P(1,0,0.5)=%f (%f)\n",plgndr(1,0,0.5),0.5);
 ts_fprintf(stdout,"P(2,0,0.5)=%f (%f)\n",plgndr(2,0,0.5),0.5*(3*0.5*0.5-1));
+ts_fprintf(stdout,"P(2,2,0.5)=%f (ni to:%f)\n",plgndr(2,2,0.5),0.5*(3*0.5*0.5-1));
 
 ts_fprintf(stdout,"Y(0,0,pi/6,pi/4)=%f (%f)\n",shY(0,0,M_PI/6,M_PI/4),sqrt(1/(4*M_PI)));
 ts_fprintf(stdout,"Y(1,0,pi/6,pi/4)=%f (%f)\n",shY(1,0,M_PI/6,M_PI/4),sqrt(3/(4*M_PI))*cos(M_PI/6));
 ts_fprintf(stdout,"Y(1,0,4*pi/6,6*pi/4)=%f (%f)\n",shY(1,0,4*M_PI/6,6*M_PI/4),sqrt(3/(4*M_PI))*cos(4*M_PI/6));
-ts_fprintf(stdout,"Y(1,1,pi/6,pi/4)=%f (%f)\n",shY(1,1,M_PI/6,M_PI/4),-sqrt(3/(8*M_PI))*sin(M_PI/6)*sin(M_PI/4));
+ts_fprintf(stdout,"Y(1,1,pi/6,pi/4)=%f (%f)\n",shY(1,1,M_PI/6,M_PI/4),-sqrt(3/(8*M_PI))*sin(M_PI/6)*cos(M_PI/4));
 ts_fprintf(stdout,"Y(2,0,pi/6,pi/4)=%f (%f)\n",shY(2,0,M_PI/6,M_PI/4),sqrt(5/(4*M_PI))*(3.0/2.0*cos(M_PI/6)*cos(M_PI/6)-1.0/2.0));
 ts_fprintf(stdout,"Y(2,-2,pi/6,pi/4)=%f (0)\n",shY(2,-2,M_PI/6,M_PI/4));
-ts_fprintf(stdout,"Y(2,2,pi/6,pi/4)=%f (0)\n",shY(2,2,M_PI/6,M_PI/4));
+ts_fprintf(stdout,"Y(2,2,pi/6,pi/3)=%f (%f)\n",shY(2,2,M_PI/6,M_PI/3), sqrt(15.0/(32.0*M_PI))*sin(M_PI/6)*sin(M_PI/6)*cos(2*M_PI/3));
 	
 	for(j=1;j<argc;j++){
 		l=(int)sqrt(j-1); /* determine l from dataline */
@@ -41,17 +42,17 @@
 
 /*we calculate new position of each vertex of vesicle */
 for(i=0;i<n;i++){
-	fi=atan2(vlist->vtx[i]->data->y, vlist->vtx[i]->data->x);
+	fi=atan2(vlist->vtx[i]->y, vlist->vtx[i]->x);
 /*	theta=atan2(
 	    sqrt(vlist->vtx[i]->data->x*vlist->vtx[i]->data->x + 
 		vlist->vtx[i]->data->y*vlist->vtx[i]->data->y),
 		vlist->vtx[i]->data->z 
 	    ); */
 	theta=acos(
-		vlist->vtx[i]->data->z /
-	    sqrt(vlist->vtx[i]->data->x*vlist->vtx[i]->data->x + 
-		vlist->vtx[i]->data->y*vlist->vtx[i]->data->y+
-		vlist->vtx[i]->data->z*vlist->vtx[i]->data->z)
+		vlist->vtx[i]->z /
+	    sqrt(vlist->vtx[i]->x*vlist->vtx[i]->x + 
+		vlist->vtx[i]->y*vlist->vtx[i]->y+
+		vlist->vtx[i]->z*vlist->vtx[i]->z)
 
 		);
 
@@ -66,9 +67,9 @@
 		/*ts_fprintf(stdout,"l=%d, m=%d, u=%s\n",l,m,argv[j]);*/
 	}
 
-	vlist->vtx[i]->data->z=fabs(r)*cos(theta);
-	vlist->vtx[i]->data->x=fabs(r)*sin(theta)*cos(fi);
-	vlist->vtx[i]->data->y=fabs(r)*sin(theta)*sin(fi);
+	vlist->vtx[i]->z=fabs(r)*cos(theta);
+	vlist->vtx[i]->x=fabs(r)*sin(theta)*cos(fi);
+	vlist->vtx[i]->y=fabs(r)*sin(theta)*sin(fi);
 }
 
 write_vertex_xml_file(vesicle,0);

--
Gitblit v1.9.3