int DrawMeshCreateSimple( DrawMesh *mesh, double *x, double *y, double *z, int nx, int ny, int nz, int is_mapped, double *f, int ncolors )
x,y,z | - X, Y, and Z coordinates of the mesh. If the mesh is 2-d, use '(double *)0' for 'z' |
nx,ny,nz | - Size of the X, Y, and Z arrays. If the mesh is 2-d, use zero for 'nz' |
is_mapped | - If false, the coordinates are '(x[i],y[j])' in 2-d and '(x[i],y[j],z[k])' in 3-d. If true, the coordinates are '(x[i,j],y[i,j])' in 2-d and '(x[i,j,k],y[i,j,k],z[i,j,k])' in 3-d. Here, 'x[i,j]' is shorthand for 'x[i+j*nx]'. |
f | - Array containing values on mesh. |
ncolors | - Number of colors that may be used in plotting data (the actual number is usually set by the plotting routine). |
DrawMesh meshinfo; Draw draw; double x[X_SIZE], y[Y_SIZE], f[X_SIZE*Y_SIZE]; ierr = DrawOpenVRML(PETSC_COMM_WORLD,0,"Sample Plot",&draw); CHKERRA(ierr); ... setup x, y, and f DrawMeshCreateSimple( &meshinfo, x, y, (double *)0, X_SIZE, Y_SIZE, 0, 1, f, 64 ); DrawBOP( draw ); DrawTensorSurface( draw, meshinfo, DRAW_BLUE );
#undef __FUNC__#define __FUNC__ "DrawMeshDestroy" int DrawMeshDestroy( DrawMesh *mesh ) { PetscFree( *mesh ); *mesh = 0; PetscFunctionReturn(0); }
/* * Routines to draw on meshes*/ #ifdef FOO#undef __FUNC__#define __FUNC__ "DrawTensorSurface" int DrawTensorSurface( Draw Win, DrawMesh mesh, int color ) { Draw_VRML* VWin = (Draw_VRML*) Win->data;
return (*VWin->DrawTensorSurface)( Win, mesh, color ); }
#undef __FUNC__#define __FUNC__ "DrawTensorSurfaceContour" int DrawTensorSurfaceContour( Draw Win, DrawMesh mesh, VRMLGetHue_fcn GetColor, void *color_context, int ncolor ) { Draw_VRML* VWin = (Draw_VRML*) Win->data;
return (*VWin->DrawTensorSurfaceContour)( Win, mesh, GetColor, color_context, ncolor ); }
#undef __FUNC__#define __FUNC__ "DrawTensorMapSurfaceContour" int DrawTensorMapSurfaceContour( Draw Win, DrawMesh mesh, double ox, double oy, double oz, int coord_slice, int coord_dim, VRMLGetHue_fcn GetColor, void *color_context, int ncolor, double transparency ) { Draw_VRML* VWin = (Draw_VRML*) Win->data;
return (*VWin->DrawTensorMapSurfaceContour)( Win, mesh, ox, oy, oz, coord_slice, coord_dim, GetColor, color_context, ncolor, transparency ); }
#undef __FUNC__#define __FUNC__ "DrawTensorMapMesh" int DrawTensorMapMesh( Draw Win, DrawMesh mesh, double ox, double oy, double oz, int coord_slice, int coord_dim ) { Draw_VRML* VWin = (Draw_VRML*) Win->data;
return (*VWin->DrawTensorMapMesh)( Win, mesh, ox, oy, oz, coord_slice, coord_dim ); } # endif
Location: src/draw/impls/vrml/vrmlmesh.c
Graphics (Draw) Index
Table of Contents