Making a QuadMesh with Fortran Routine

Making a QuadMesh with Fortran Routine

Quad mesh is a neat graphic presentation. However, none of the samples show how to do this in Fortran.
I took the javascript example of QuadMesh2 which is a torus and generated the same shape in Fortran.
The fortran source code is attached. Comments in the code are crucial to understanding how this works.
Possible applications are mapping finite elements or other large-scale data arrays generated in fortran code.
I copied the ThreeSin project folder and plopped this fortran source code into it, removed the ThreeSin.f90 source and renamed all the project and solution folders and files from within Visual Studio. The only other rename was in the executable under project properties (Link).

Have fun and let me know what you'd like to see with this


Fichier attachéTaille
Télécharger QuadMesh.f904.79 Ko
3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hey Rich,That's great that you were able to create quadmesh plots in Fortran. Doesn't the standard av fortran library have routines for quadmesh? At least I see it's documented in help files (Developing Applications with AV/Object Model/AvQuadMesh).John

Hey John,
I could not find a direct AVFRT call to do it. The listing in the help file only shows XYplot, Image Contour and HeightPlot for avCreateGraph3DObj under the Fortran Library Routines. The real difficult part though was re-indexing the data to fit the switch between CPP and Fortran. There is no explicit discussion ashow to assign the Xvalues, Yvalues and Zvlaues unfortunately. It turns out that if you index your compound data like one often does in fortran as 1,2,3 the subscripts for the avSetVertexSource call needs to use the 0,1,2 indexing as shown in the source file, otherwise you are left with a squashed 2D version of the 3D plot.
Even with the working example, I got status error messages using the avSetVertexSource calls ("Not a Quad or Poly mesh object").
The Object Model calls worked just fine and one can manipulate the mesh without any problem.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui