View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Wed Aug 27, 2025 12:11 pm Post subject: %pl guide |
|
|
I have added further examples to my %pl guide/notes, (briefly mentioned in another post). The updated document can be found here.
https://www.dropbox.com/scl/fi/va5hwcuye466z8ek73es4/pl_guide_ver3.pdf?rlkey=rdpf5it8mamaqbdcra1fhrqky&st=oulgf60x&dl=0
The 30+ examples cover many of the basic %pl options including calls to simpleplot_redraw@ to update plots and now gets as far as using the %pl callback in various ways, and the final example gives a basic recipe for plotting a function z(x,y) as a simple coloured heat map.
I shall update this thread occasionally as I progress this further.
Updated 12/09/2025
Last edited by Kenneth_Smith on Fri Sep 12, 2025 1:08 pm; edited 1 time in total |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2943 Location: South Pole, Antarctica
|
Posted: Wed Aug 27, 2025 9:11 pm Post subject: |
|
|
Ken,
That was great guide to the art of 2D X-Y plotting with Clearwin!
Congratulations!
Was always missing such systematic collection of examples from simple to complex, ideally in the form of clipbook library so that you scroll the real examples visually, choose the needed type and in one click it is added to the source code. There with the few touches you correct some minor details. Same with other Clearwin controls. Plato would be ideal for that i think |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2943 Location: South Pole, Antarctica
|
Posted: Fri Aug 29, 2025 6:43 pm Post subject: |
|
|
If somebody also translated OpenGL book of examples on FTN95 that would be great.
25 years ago one guy (his nickname I think was djip) have done translation of so called OpenGL red book from C/C++ to some other Fortran compiler but I remember I still had some problems with that in FTN95. He was very helpful with some my stuff.
It's time to move to modern 2D/3D graphics (Ken have done ultimate in details and simplicity guide for that, so the majority have to stop being Luddites, essentially ignoring most of features FTN95 is capable of) , multithreading programming, multiprocessing, GPU acceleration, use GUI etc |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2424 Location: Yateley, Hants, UK
|
Posted: Sat Aug 30, 2025 12:13 pm Post subject: |
|
|
Dan,
I thought that you were the current OpenGL guru.
Ken's guide is terrific, and an excellent contribution. It is, however, a 'work in progress', as I think he'd admit. There are still things I don't get. For example, how %pl works to create a window without WINAPP, and why it doesn't need USE CLRWIN until you start to add in calls to WINOP@.
FTN95.CHM is a terrific guide when you know what you are doing and just consult it for reference (ditto the .ENH files), but none of them is a self-instruction text. What's more, despite reading everything on the subject I am only beginning to understand the differences between the original, included, simpleplot, the former, purchasable add-on, and 'native'. |
|
Back to top |
|
 |
Robert

Joined: 29 Nov 2006 Posts: 460 Location: Manchester
|
Posted: Sat Aug 30, 2025 7:08 pm Post subject: |
|
|
You don't need WINAPP to produce Clearwin windows. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2424 Location: Yateley, Hants, UK
|
Posted: Sat Aug 30, 2025 10:32 pm Post subject: |
|
|
Robert,
Now I am confused.
My FTN95.CHM tells me that the compiler directive WINAPP:
"Creates a Windows executable for use with ClearWin+ (see the ClearWin+ documentation for further information)."
(sic)
Now I discover that I don't need WINAPP to use Clearwin+. It can't be an update since the v8.95 that I'm using, because Ken's examples work ....
Eddie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Mon Sep 01, 2025 8:30 am Post subject: |
|
|
WINAPP is used to create a Windows application rather than a console application. If you run a Clearwin+ application without WINAPP (or its equivalent) then you will get a DOS box first and the app is launched from the DOS box. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Mon Sep 01, 2025 8:37 am Post subject: |
|
|
FTN95 knows about winio@ so you don't need "use clrwin" for winio@ on its own. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2424 Location: Yateley, Hants, UK
|
Posted: Mon Sep 01, 2025 12:02 pm Post subject: |
|
|
Aha! I get it now. And for reasons of economy, the console window doesn't appear if there isn't any output for it - or hides itself somewhere, or I wasn't looking in the right place ... |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2943 Location: South Pole, Antarctica
|
Posted: Wed Sep 03, 2025 7:44 am Post subject: |
|
|
Eddie,
I have 0.01% of needed knowledge of OpenGL to write any guide for everyone, I know only that absolute minimum about OpenGL which is barely needed to do what I do. And still have a lot of questions about it.
/** That all comes from the principle of good old Salford Fortran, expressed 35 years ago which I understood this way: you do not need to learn any other language besides Salford Fortran and you still will be able to do 99.9% of what you need, and often will achieve it much faster. That perfectly worked for me. Painfully missing there was parallelization but luckily for that from the end of 1990th I used third party parallel libraries, excluding last 3 years when other more standard and modern methods of parallelization - like MPI and GPU - became necessary)
Questions about OpenGL which I still have are of this sort:
1) How the game developers succeed to create real time 4k 3D OpenGL games with 60-120 frames per second while my plots - though very attractive and simple - take 100-1000x more time?
2) How come having 24GB or VRAM I can plot only 35 million polygons which require only 5-10% of that and more do not fit into videocard memory ? (Each polygon defined by 4 points (its corners) in 3D space, each point is 3 single precision numbers in Cartesian x,y,z coordinates) |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Fri Sep 12, 2025 1:13 pm Post subject: |
|
|
Thanks for the positive feedback. I have updated the link in the original post to include the more recent examples I have cobbled together. These use the %pl callback in various ways, and the final example give a basic recipe for plotting a function z(x,y) as a simple coloured heat map. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2424 Location: Yateley, Hants, UK
|
Posted: Fri Sep 12, 2025 5:44 pm Post subject: |
|
|
Dan,
That's a pity. Thanks for being honest. There's still a need.
Ken,
Some amazing progress. Excellent, and very helpful. Of course it is a lot to do with Paul going 'native' and fixing the bugs that you have reported. A big thing about native %pl has to be using the absolutely latest version(s) of the software.
I suppose that the original %pl and the purchase-able extension to it must have some differences from native.
Eddie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Sat Sep 13, 2025 8:17 am Post subject: |
|
|
SIMPLEPLOT is a 32bit graphics library that was provided by Bradford University BUSS Ltd. As far as I know this company nolonger exists. Silverfrost does not have or own the source code so we are not able to port it to 64 bits.
SIMPLEPLOT is an extensive library that includes 3D surface imaging perhaps akin to OpenGL.
The 32bit interface to SIMPLEPLOT via winio@ and %pl is limited to 2D graphs.
The native 32/64bit %pl is also limited to 2D graphs and provides an extension to ClearWin+ graphics (%gr). |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2424 Location: Yateley, Hants, UK
|
Posted: Sat Sep 13, 2025 9:57 am Post subject: |
|
|
Thank you Paul for a succinct explanation.
I note that I have a SIMPLE.DLL dated 09/10/1998 in my FTN95 installation. It is 952kB in size. What does that support? It can't be the native version (obviously).
That leaves it as necessary for the 32-bit only simple 2D graphs SIMPLEPLOT, or the full SIMPLEPLOT. In which latter case all that's missing for 32-bit apps is a copy of the BUSS manual. Does anyone out there have one?
Presumably the 1998 version of simple 2D graphs SIMPLEPLOT doesn't know anything about WINOP@ (or given where Bradford is, perhaps doesn't know owt).
Eddie |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Sat Sep 13, 2025 12:44 pm Post subject: |
|
|
Eddie, there is some BUSS documentation here:
https://www.silverfrost.com/23/ftn95/support/documentation.aspx
Clearly AI services have trawled the Silverfrost website and found these old documents, which is why asking AI to generate even simple %pl[native] i.e. 64 bit code is fraught with problems. |
|
Back to top |
|
 |
|