View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Aug 21, 2023 12:24 pm Post subject: %pl is wonderful |
|
|
Here is a link to a short video clip which shows what can be achieved with a relatively short program for generating a contour/ 2d field plot using %pl with [FULL_MOUSE_INPUT], where the %pl sets up the axes [LINK=USER], and all other operations are performed via the pl call back function and SET_PLOT_MODE(1), or other temporary windows placed over the main window.
Not bad for a Sunday afternoons work, but still a work in progress. I have a few more bells and whistles to add.
https://youtu.be/P3B3DbOdpYM |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Mon Aug 21, 2023 7:35 pm Post subject: |
|
|
Kenneth, I think that your sentiment is fine, but your scope is a little limited. Instead, the whole of FTN95 and ClearWin+ is wonderful !
Nice plots, by the way.
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Tue Aug 22, 2023 4:04 pm Post subject: |
|
|
Ken,
Yea, first versions usually take just few days. But then I will be surprised if you will not spend many months, sometimes years during next decades on improving them.
But think how to minimize this all into just one single line of code and post for everyone to use it. That would be great addition to Clearwin. Pity i did not think about re-usability from the start with all my graphics routines (making all work like with kids' Lego blocks). So all my codes are for single one time use for specific task they were made. Extracting them for use in the next task is like working in the swamp of spaghetti. Life teach me that everything i made i will need to re-use many many times in the future, not just ones or two. But if minimize all to one line of code it will be easy to make one plot or multiplots which combines many of them on same page or move to new project
Users will be able to call it like this
Code: | i=winio@('%pl[file=contour.set, contour2d]', iwidth, idepth, ix,iy,iz, x,y,z) |
and that's it. All the settings should be hidden in the way like Designers Mode is doing |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Tue Aug 22, 2023 6:10 pm Post subject: |
|
|
Eddie,
Your observation is correct, all of FTN95 and Clearwin+ is wonderful, although I must admit to being particularly fond of %pl.
Dan,
I have four applications which generate data that can be conveniently presented as contour plots (2D electric and magnetic fields associated with transmission circuits, and ground step and touch potentials). All written using FTN95 at different times, so the knowledge of Clearwin+ I had at the time of writing differs. They all have their own contouring subroutines, which are all very different in their use of Clearwin+, which now makes implementing changes in any one of these (particularly the oldest) rather challenging. Hence my motivation for combining all of the �good� parts of each into a single routine.
I hope to get to something as simple as call conpl(x,y,z) !
I added a few more items last evening:
https://www.dropbox.com/scl/fi/dpasjd62h6wkixkik8swo/conpl.JPG?rlkey=ovlu7bhraq9b15tq21ney9eh1&dl=0 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Wed Aug 23, 2023 6:40 am Post subject: |
|
|
Thanks for the encouraging feedback. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Wed Aug 23, 2023 1:10 pm Post subject: |
|
|
Hi Ken,
I see from a 'history' in an old program that I got my first contouring algorithm working in May 1976. It was for nodal values in a finite element program. It took me a while longer to be able to contour Gauss integration point data!
The problems have always been the graphics systems, and how to speed up pen plotters.
Eddie |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Sep 21, 2023 11:18 am Post subject: |
|
|
All issues with gridlines now fixed and working well. I am very pleased with the final outcome, certainly good for the purpose I had in mind.
I can configure the contour plot interactively at run time as this short clip shows.
https://www.youtube.com/watch?v=rOoLl6dcH9E
Code can be made available to anyone who is curious about the tricks used to get %pl to operate in this way, or who thinks the routine may be useful to them. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Thu Sep 21, 2023 12:25 pm Post subject: |
|
|
You are hell quick, Ken.
Next is obvious: the surfaceplot. Code will be 95% the same.
And then 3D |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Sep 21, 2023 5:53 pm Post subject: |
|
|
Dan, thanks for the surface plot challenge. Kept me out of mischief this afternoon
https://www.youtube.com/watch?v=ktayj7KOxGM
I will duck out of the 3 D challenge for the time being! |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Fri Sep 22, 2023 10:58 am Post subject: |
|
|
Cool. When we will be able to try ? |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Sep 23, 2023 12:56 pm Post subject: |
|
|
Dan, I shall send you a PM on Monday with a download link. |
|
Back to top |
|
|
|