Silverfrost Forums

Welcome to our forums

Visualisation library

11 Oct 2018 9:21 #22647

Hello: could anyone advise me on a visualisation library to make a 3D plot a a 3D data array (basically a data cube) and do some basic manipulation like plot a slice perpendicular to one of the axes? I looked a Simdem but could not identify an adequate routine. Ideally I'd prefer an open source / free package such as Simdem, but if need be I can bar some reasonable costs for a commercial package (100s of $s)

11 Oct 2018 4:53 #22651

You will never find what you want sometimes for any money you can bar. Use FTN95 with OpenGL and write such programs yourself. This is easy. I can send you demo written 20 years ago still with FTN77.

13 Oct 2018 5:53 #22661

See file in this link https://1drv.ms/u/s!AuTT_gAwgmEIhIp_R3CHjfR2JQDeDw This is a visualization of a 502510 array with the 3rd (z-layer) index as value. This visualization was obtained via exporting a file to Paraview (OS visualisation software, excellent btw). I'd just want to do something basic like this internal in my program so that I can QA before exporting it.

15 Oct 2018 1:01 (Edited: 15 Oct 2018 1:04) #22670

Hello - I saw some discussions in this forum on 'Native %pl', which seems partly to go into a direction I could use. However, I could not work out what it exactly is and how to use is. Would appreciate if someone could explain.

15 Oct 2018 1:04 #22671

I also went ahead and dabbleb with plotPL, only to find out that it currently does not jive very well with Ftn95. I saw an old discussion and downloaded a DLL that makes some routines of an older plotPL version work, which is already useful for a quick fix right now. However, does anyone have perhaps an update of the use of plotPL wioth Ftn95??

15 Oct 2018 9:47 #22675

John -

1- a good 2D contour plot would already be very helpful. So I would appreciate if someone could point me to 'native %pl'

2- I meant indeed PLplot. The discussion on this forum was under http://forums.silverfrost.com/viewtopic.php?t=3469&highlight=cmake Download the zipped DLL for old PLplot version from https://www.dropbox.com/s/cu2zpjffai99o7j/plpltSal.zip?dl=0 .

3- I have tried some of the simfit routines using a 'slice' or 'layer' of the data cube. I found the options on simfit quite limited though. For example, I used the surd2s routine but was unable to pass x and y vectors for my 2d data array.

15 Oct 2018 10:47 #22676

Quoted from jcherw I also went ahead and dabbleb with plotPL, only to find out that it currently does not jive very well with Ftn95. I saw an old discussion and downloaded a DLL that makes some routines of an older plotPL version work, which is already useful for a quick fix right now. However, does anyone have perhaps an update of the use of plotPL wioth Ftn95??

JCherW: I built and posted the DLLs and examples for PLPlot on 28 March 2017, in the thread http://forums.silverfrost.com/viewtopic.php?t=3469 .

There is no possibility at present for updating PlotPL with FTN95. As I wrote in that thread,

Quoted from mecej4 After posting the DLL, I tried running some of the examples included in the current distribution. Not a single one worked, because in the new versions they have added a dependency on the ISO_FORTRAN_ENV module, which we do not (yet) have in FTN95. The last statement remains true today (October 2018).

16 Oct 2018 1:24 #22682

The ISO_FORTRAN_ENV bits in the Plplot sources are not likely to be essential. It is up to someone to decide that it is worth putting in the effort to back-port the sources to Fortran 95, and do so.

But then, why bother? You could build a Plplot DLL using Gfortran and link your FTN95 driver programs to that DLL.

16 Oct 2018 7:07 #22687

You could use %pl to set up the x and y coordinates. Then since %pl is a graphics region you can simply draw your contour lines on the drawing surface via a call back function. I've got this to work, using Paul Bourke's CONREC routine.

http://paulbourke.net/papers/conrec/

Basically before the call to %pl, I call CONREC and write all the pen movements to file, then after the %pl frame is drawn, I use the call back to read and draw the pen movements on graphics region.

21 Oct 2018 6:52 #22694

John-S,

Thanks to the curve-fitter link. I certainly remember being impressed by the 40-mb disk. We called it the 'Compaq luggable'. It went well with the brick portable phone. Remember the joys of extended and expanded memory ?

1 Dec 2018 11:53 #22896

I have found a 3D visualisation solution that is very easy to implement. I am using it on a regular basis. This is to export your data to VRML2 format (i.e. the original version, not the newer XML format) and then run a VRML viewer program on the exported file (you can do this by calling start_pprocess@). There are two VRML viewers that I use. Both free. View3dscene and Qiew. https://castle-engine.io/view3dscene.php http://www.qiew.org/ I use these for 3D display of point clouds, but VRML allows you to display a wide range of different geometric objects. The VRML2.0 format specification is here - http://www.graphics.stanford.edu/courses/cs248-98-fall/Assignments/Assignment3/VRML2_Specification/

I have also exported data in OBJ and VTK formats - both are just as easy as VRML - but haven't yet explored the availability of viewers for these, as I pass them to a colleague whose own C++ package will import and display them, so it saves me the effort!

I recently downloaded the F.E.N.I.A. library but haven't started to look at it yet. It may make life easier when creating VTK exports - I think it also does the SVG3D format. https://sourceforge.net/p/fenia/wiki/Home/

3 Dec 2018 7:53 #22906

Hi John - yes, that's one reason I haven't tried to do anything with it yet! Hoping to find someone else who has used it and can give some pointers, or at least some sample code.

However, VRML is well established and I've got a fair amount of experience using it. In the early 2000s I developed a 3D visualisation package for the British Geological Survey, using VRML. They've long since replaced it, but it worked well while it lasted! I'm now using it for point-cloud data from a submersible robot in the UNEXMIN project (http://www.unexmin.eu). And using %pl native mode very happily for 2D plotting. For anything more complex, I pass across data files in VTK format or in an SQLite database to a friend and colleague who has developed the Georeka package (http://www.georeka.com)

Please login to reply.