Changeset 332
- Timestamp:
- 03/26/08 17:12:43 (8 months ago)
- Location:
- trunk/matml/src/ternary
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/matml/src/ternary/geomview.c
r326 r332 70 70 FILE *geompipe FILE pointer hooked to Geomview stdin. 71 71 72 char *name Full name of this Geomview object. 73 74 char *label Short label of this Geomview object. 75 76 char *appearance Appearance tag for this Geomview object. 77 72 78 int npoints Number of points. 73 79 … … 80 86 81 87 int GeomviewDisplayTriangleCOFF 82 (FILE *geompipe, int npoints, ternary_point *points, int ntriangles, int *vertices) 88 (FILE *geompipe, char *name, char *label, char *appearance, 89 int npoints, ternary_point *points, int ntriangles, int *vertices) 83 90 { 84 91 int i; 85 92 86 fprintf (geompipe, "(geometry \" Ternary Free Energy\" { : tfe })\n");87 fprintf (geompipe, "(read geometry { define tfe \n");88 fprintf (geompipe, "appearance { shading smooth }\nCOFF\n");93 fprintf (geompipe, "(geometry \"%s\" { : %s })\n", name, label); 94 fprintf (geompipe, "(read geometry { define %s \n", label); 95 fprintf (geompipe, "appearance { %s }\nCOFF\n", appearance); 89 96 fprintf (geompipe, "%d %d 0\n", npoints, ntriangles); 90 97 -
trunk/matml/src/ternary/ternary.c
r328 r332 112 112 113 113 /* Send points and triangle vertex data to Geomview */ 114 if (i=GeomviewDisplayTriangleCOFF (pfd, (loop_max+1)*(loop_max+2)/2, points, 115 loop_max*loop_max, verts)) 114 if (i=GeomviewDisplayTriangleCOFF 115 (pfd, "Ternary Free Energy", "tfe", "shading smooth", 116 (loop_max+1)*(loop_max+2)/2, points, loop_max*loop_max, verts)) 116 117 { printf ("main: Error %d in Geomview Display\n", i); exit (i); } 117 118 118 printf ("Calling qhull\n");119 119 if (i=qhullCalcHull (3, (loop_max+1)*(loop_max+2)/2, points, &hullnumverts, 120 120 &hullverts, &qh_version)) 121 121 { printf ("main: qhullCalcHull returned %d\n", i); exit (i); } 122 122 printf ("qhull version: %s\n", qh_version); 123 124 #ifdef DEBUG 125 for (i=0; i<hullnumverts; i++) 126 printf ("Facet %d vertices: %d %d %d\n", i, hullverts[3*i], 127 hullverts[3*i+1], hullverts[3*i+2]); 128 #endif 129 130 if (i=GeomviewDisplayTriangleCOFF 131 (pfd, "Free Energy Convex Hull", "ech", "-face +edge", 132 (loop_max+1)*(loop_max+2)/2, points, hullnumverts, hullverts)) 133 { printf ("main: Error %d in Geomview Display\n", i); exit (i); } 123 134 124 135 printf ("Press <return> to close up... "); -
trunk/matml/src/ternary/ternary.h
r328 r332 28 28 int GeomviewBegin (FILE **geompipe, char *version); 29 29 int GeomviewDisplayTriangleCOFF 30 (FILE *geompipe, int npoints, ternary_point *points,31 int n triangles, int *vertices);30 (FILE *geompipe, char *name, char *label, char *appearance, 31 int npoints, ternary_point *points, int ntriangles, int *vertices); 32 32 int GeomviewEnd (FILE **geompipe); 33 33