uniquename

uniquename = Blaise Montandon

Software site: www freedomenv.com

System names: feNautilusScripts, xpg, feAppMenus, tkGooies

Some categories of 'tkGooies':

  3Dtools, AUDIOtools, FILEmanagers, IMAGEtools,

  MAPtools, MATHtools, PHYSICStools, PLOTtools,

  SELCT/CONVRTtools, SYSTEMtools, TEXTtools, VIDEOtools

2012apr14:

My Free and Open-Source Software:

I plan to contribute some code samples on this wiki in the future. For now, see Freedom Environment subsystems - xpg, feAppMenus, feNautilusScripts. (2012oct update: See code contributions list near the bottom of this page.)

2015mar update: I have released a new 'FE tkGooies' system at freedomenv.com [L1 ]. The 'tkGooies' system offers my code contributions (about 60) in a toolchest-menus system. I hope to expand the 'tkGooie apps' that are offered in the 'drawers' of the toolchests, by about 60 more apps over the next several years.

The download page for 'FE tkGooies' is at [L2 ]. A description page with links to many pages of sample code (similar to my contribution pages on this site) can be seen at the page at [L3 ].

Many sample images of the 'tkGooies' are on the 'download' page, and many images of the 'toolchest' menus are on the 'description and code samples' page.

(Now I can remove about 10-plus icons on my desktop for individual Tcl-Tk 'apps', and replace them by a single 'tkGooies' icon.)


My Favorites on this site (and my Tcl-Tk plans):

Thanks to Keith Vetter (the Martin Gardner of Tcl/Tk) and Richard Suchenwirth who have provided many code samples on this wiki. Their code contributions inspire Tcler's to try to live up to their many-year tradition of creating interesting Tk GUI's.

I particularly like Vetter's geometry/math/pattern/grid demos/utilities/entertainments

and I really like Vetter's gear/mechanism animations

on the Tk canvas. Some of these pages do not have sample images --- or someone has added images that are on an 'external' site, and the link is now dead, or the image is too small. I may provide some images from my implementations of these scripts, so that people can easily see what these Tcl-Tk GUI's look like. (Done, 2013-08.)

Furthermore, Suchenwirth's slide-rule must have been a labor of love. It must have taken an intensive effort to create such a quantity of precise detail. See the image at A little slide-rule.

(I guess most people born after 1950 don't even know what a slide rule is --- much less how one works. Time marches on. More up-to-date are the emulations that some Tcler's have done of specific models of HP electronic calculators in Tcl-Tk [L4 ] [L5 ]. In fact, Suchenwirth provided A little calculator and an abacus at TkSoroban. Also see the calculator at t-Calc.)

Some bouncing/colliding/exploding animations are also interesting, such as

I personally do not plan to spend much time on dealing with code for games. (I have too many projects of a more practical nature on my to-do list, as can be seen on my list of done-and-planned projects near the bottom of this page.)

But there are often techniques of various Tk game scripts that can be put to good use in adding to the world of Tk 'user-friendly, useful utility' (UUU) scripts. For example:

  • Dot to Dots (by Vetter) (Note the rubber-banding of lines being drawn on the canvas.)
  • TkAtaxx (by Vetter) (The code for drawing grids like this, and keeping objects within the boundaries of each square in the grid, may prove handy for reference.)
  • Black Box (by Vetter) (Another gameboard ... with buttons around the perimeter of the grid, on which the labels of the buttons change when the user clicks on them.)
  • TkChallenger (by Vetter) (Another gameboard grid. Also note the Help window. It contains both color and black text in a text widget--- and bold text as well as 'regular' text. And the text widget includes fonts of various sizes --- and variable-width fonts for titles; a fixed-width font for the help text.)
  • Chinese Checkers (by Vetter) (A colorful, six-pointed-star-shaped grid.)
  • Crazy Eights (by Vetter) (Nice images of playing cards --- the backs as well as the faces. AND ... animation of the playing cards as they are dealt out and moved to various places on 'the felt'.)
  • Domino (by Suchenwirth) (In case you ever need to draw dominoes, or other images of that kind, on a canvas.)
  • A little Go board (by Suchenwirth) (Here is a board game in which the pieces go on the intersection of the grid lines, instead of between the grid lines. See TkPente, below.)
  • Gem Game (by Vetter) (A game board with colorful pieces on the canvas.)
  • Hanoi Towers (by Stephane Arnold) (A nice animated game --- 3 pieces moving among 3 vertical rods.)
  • Labyrinth (by Vetter) (This game has a rather randomized grid --- and some blinking arrows.)
  • Mancala (by Todd Coram?) (A game with 'rectangular slots' --- a Tk implementation of a game that is thousands of years old, if not tens of thousands of years old. This is a case of using Tk to digitize and GUI-fy antiquity. Note: It took thousands of years for version 2.0.)
  • Lights On (by Vetter) (The little rods on this canvas rotate to 'hexagonal-angles'.)
  • Lights Out (by Vetter) (Clicking on a grid square changes the color of that square, and the color of its neighbors.)
  • tkmines (by Vetter) (A grid of many squares with nice shaded edges. The squares turn to flat images of mines or numbers.)
  • Montana Solitaire (by Vetter) (Another game using nice card images --- and animation of cards over 'the felt'.)
  • TkOverload (by Vetter) (A game with possible chain reactions of exploding cells.)
  • TkPente (by Vetter) (Here is another Go-like game board --- along with a Help window.)
  • Puzzle Blocks (by Vetter) (This is an example of code that moves puzzle pieces about, on a canvas.)
  • Tk Robots (by Vetter) (A large game grid with a couple of types of 'sprites' --- and a scrollable help window.)
  • Tk Robots2 (by Vetter) (Addition of human and robot sprites, as well as a speed-up of the game.)
  • Rush Hour (by Vetter) (Various sized rectangles in a rectangular game space, the canvas.)
  • scat (by Vetter) (Another cards-and-felt game --- with automatic dealing of cards across 'the felt'.)
  • Hold'Em Solitaire (by Vetter) (Another cards-and-felt game. Feels like Las Vegas.)
  • TkBomb (by Hartweg) (An unusual hex grid. Honeybees may be drawn to this.)
  • TriPeaks Solitaire (by Vetter) (Another cards-and-felt game --- with automatic dealing of cards across 'the felt'.)
  • Video Poker (by Vetter) (Another cards-and-felt game, along with info that helps those who forget what-beats-what.)
  • Word Jumble (by Vetter) (This game has some shadowed letter squares that look like they are floating above the canvas.)
  • Word Search (by Vetter) (A scrolling listbox of words that are hidden in a grid of letters.)

(Some of the pages above do not have images. I plan to provide some images from my implementations of these scripts, so that people can easily see some of the interesting --- and useful ---- features of these Tcl-Tk GUI's.) (Done for most of these, 2013 Aug.)

Some of my other favorite Tcl-Tk project categories follow.


3D Tcl-Tk Projects:

Besides kudos to Vetter and Suchenwirth, an "I'm not worthy" goes out to MBS (Mark Stucky) for his 3dviewer : A canvas only viewer of 3D data. It was something that I wanted to try someday using Tcl-Tk, but I thought that one would need to use OpenGL to be able to relatively-quickly rotate a model with about a hundred facets. He proves that it is possible to manipulate fairly complex 3D models using 'plain' Tcl-Tk --- without using extensions, such as OpenGL extensions.

Of course, we all build 'on the shoulders of giants', and kudos also go out to GS (Gerard Sookahet) who posted 3D polyhedra with simple tk canvas, which motivated Stucky to make (or, actually, translate into Tcl-Tk) his 3D viewer.

And kudos go to the people at Sun Microsystems --- like Brian Lewis, reference: http://static.usenix.org/publications/library/proceedings/tcl96/full_papers/lewis/ --- who made the byte-code compiler for Tcl-Tk that improved the performance of many operations by 6 to 10 (or more) times. The on-the-fly 2D-rendering of the rotation of hundreds of 3D polygons would probably not be 'effective', even with today's more powerful CPU's, were it not for the byte-code compiler.

Stucky's Tk script provides several built-in sample 3D models from which to choose (including a human head), and he provides a variety of controls for examining those models --- including simple mouse 'gestures' --- rotation (with MB1), pan (with MB2), and zoom (with MB3), where MB = mouse button. Those simple controls make this a really nice 3D viewer. Hats off for the nice implementation.

__________________

Stucky's 3D viewer uses a set of about 40 '3D procs' & 'Tk widget procs' to provide the model viewing features. The procs include:

  Vector_CrossProduct, CrossProduct, Vector_DotProduct, DotProduct,
  Normal_Vector, MatrixVectorProduct, Barycenter3D,
  Set_Viewing_Transform, Print_4x4_Mat, Conc_Trans, Get_Vector,
  Draw_Face, Shade_Face, getFace_color, get_Intensity, Draw_Objects,
  cull_backfaces, sortconn, d_move, d_draw, draw_shaded, redraw,
  set_rho, set_dist, get_theta, get_phi,get_theta_L, get_phi_L,
  dial::dial, dial::dial_press, dial::dial_motion,
  dial::update, dial::getValue, dial::setValue
  canvas_rotate_start, canvas_rotate_drag, canvas_rotate_end, canvas_rotate_calc,
  canvas_pan_start, canvas_pan_drag, canvas_pan_end,
  canvas_zoom_start, canvas_zoom_drag, canvas_zoom_end,
  ReadData, load_OBJ_File

It is on my 'to-do' list to try using some of those procs (or enhancements of them) to implement an alternative 3D viewer --- say, with a somewhat different controls-interface --- and with a working 'load_OBJ_File' proc.

The 'load_OBJ_File' proc is a 'quick hack' in the words of the author, provided to parse the popular Wavefront OBJ file format.

Unfortunately, the 'load_OBJ_File' proc will not read any of the standard '.obj' test files like 'teapot' and 'cow' and 'bunny' --- that are available (or convert-able from other 3D formats) via sites like the Georgia Tech Large Geometric Models Archive pages at http://www.cc.gatech.edu/projects/large_models/ --- for example, see the page http://www.cc.gatech.edu/projects/large_models/bunny.html .

Another reference for 3D models is the Cyberware Inc. site at http://www.cyberware.com/ --- see the page http://www.cyberware.com/products/software/fileFormats/obj.html for their ply2obj program.

Furthermore, there is a 'summary of available models' ('Mesh Compendium') site of a CalTech student --- at http://users.cms.caltech.edu/~njlitke/meshes/toc.html .

Student pages tend to go dead within 4 years of their authoring. For a site that might be around longer, see the 3D models page at http://lodbook.com/models/ .

As Stucky said in a comment in his Tk script: "This (the 'load_OBJ_File' proc) should be replaced with a 'true' OBJ file parser ... eventually".

If I never get around to making a more robust 'load_OBJ_File' proc, I hope someone else does. I see that JAG (Jeff Godfrey) mentions, on the 3dcanvas page, that he 'Updated OBJ file reader'. Perhaps some of his code could be put in Stucky's 3Dviewer to make the 'load_OBJ_File' proc more robust.

And it would be nice if someone would make 'load_PLY_File' and 'load_STL_File' and 'load_OFF_File' and 'load_DXF_File' and 'load_IV_File' and 'load_VRML1_File' and 'load_VRML2_File' and 'load_IGES_File' and 'load_STEP_File' and 'load_3DS_File' and 'load_LWO_File' and 'load_COLLADA_File' procs --- for use in ANYONE's Tcl-Tk 3Dviewer.

(Of course, it would be helpful if those procs highlighted/commented the statements that store the points/connection/color/texture/etc. data --- to help a user more easily write statements that transfer that data into the data structures that they are using --- or to help the user change the procs to directly load the 3D data of the file into their data structures.)


ODE Tcl-Tk Projects:

                            (ODE's = Ordinary Differential Equations)

Stucky's page at MBS also mentions his TclSpringies : A simple mass and spring simulator Tcl-Tk code example --- which was inspired by the Runge-Kutta page of GWM (Geoff W. Michel).

Solutions to ODE's (systems of ordinary differential equations) are an area of interest to me. I used the old IBM CSMP (Continuous System Modeling Program) system --- and its successor, DSL (Dynamic Simulation Language) --- back in the 1960's to mid-1980's to solve small systems of ordinary differential equations --- first for simulations of pharmacokinetics in the body and later, at a farm equipment manufacturer, I used an APL, not FORTRAN, implementation of DSL. (Like Tcl, APL is an interpreted language, not a language for compilation.)

CSMP and DSL were FORTRAN-like languages (extensions of FORTRAN really) that provided an INTGRL function to integrate (solve) systems of ODE's. You could integrate the spring equation y'' = ky by writing a CSMP/DSL program whose main pair of statements looked like

Y=INTGRL(Y0, YPRIME)

YPRIME=INTGRL(YPRIME0, K*Y)

In other words, a single 2nd-order DE was written as 2 first-order DE's. And if you had a system of N 2nd-order DE's, they would be written as 2*N first-order DE's and translated into 2*N INTGRL statements in CSMP or DSL.

CSMP and DSL ran on IBM mainframes in those days, because the IBM PC had not been invented yet. But the CPU resources required to run CSMP and DSL (even on systems of 100 or more DE's) are miniscule compared to the computational requirements of finite-element solver programs like NASTRAN, ABAQUS, and ANSYS.

So writing a version of CSMP or DSL in Tcl-Tk is quite feasible.

I guess I should start out by coding a few simple examples --- like a simple pendulum simulation --- which involves a non-linear ODE of the form theta'' = k* sin(theta) --- in Tcl-Tk --- to add to Stucky's 'springies' example. And like Stucky's example, I should include an animation of the pendulum on a Tk canvas.

I can do x-y plots of the theta and theta-prime output (put into a file), by using the 'plot_quik_xy_file_2or3cols.tk' script of my 'feHandyTools' system of 'the Freedom Environment', referenced above.


Flexible, Roll-Your-Own Theme-ing Tk Projects:

Speaking of the 'Freedom Environment' (FE) subsystems (just above), reminds me: I have submitted a suggestion/request labelled "Implement '-anchor' (something similar) for compound text ON image", on the Tk 9.0 Wishlist page.

If that request is implemented in Tk 8.x/9.x/whatever before I kick the bucket, I plan to make 'prettified' 'toolchests' --- with the 'button' widgets in my 'feAppMenus' and 'feHandyTools' FE subsystems.

I plan to continue, in 'spare moments', to look for ways to make Tk GUI's that would make even Steve Jobs envious.

I have started making progress in that direction as can be seen in a couple of code contributions I made in Aug 2012:

a) Experiments in making embellished GUI's

b) A color-gradient-button-maker GUI with 6 'miniscale' widgets

These, and several helpful Tk image making/editing utilities, are listed in my code contributions list toward the bottom of this page. Those image making/editing utilities were motivated by my desire to eventually make Tk GUI's that will blow you away.


uniquename - 2012sep12

The sorry state of file managers on Linux (and my preliminary version of a Tk solution):

Most Linux users are well aware of the turmoil in the Linux 'distro' universe in the past few years (2010-2012) as major desktop systems such as Gnome and KDE have gone to major new versions (Gnome 3.x and KDE 4.x) that seem to be trying to imitate the Apple iPad approach of 'finger-tip based' (rather than 'mouse-based') interaction --- an approach based on a desktop flooded and overflowing with scrollable icons.

In the meantime, the 'high-end' Linux file managers (such as Gnome-Nautilus and KDE-Dolphin) are getting much less attention in areas of concern for mouse-users --- for users who need to use list-view rather than icon-view. The file managers are starting to experience some 'regressions' as a result.

As I have pointed out on the Contact Page of my freedomenv.com site [L6 ]:

"Sheez! There are more important things than imitating Apple 'surface effects', ubuntu-and-gnome-developer-people. You don't seem to appreciate what you have in Nautilus. In all the articles describing Gnome 3, I have seen nary a word on Nautilus. That just stinks. It's just really sad what these developers --- and the Linux pundits --- value most highly."

The file manager is the app that I use the most, in my login sessions. I probably open Nautilus file manager windows more often than I open web browser windows and email windows.

Some Argentinians have been concerned about the nice things of Gnome 2.x that have been jettisoned (or unappreciated and ignored) in Gnome 3.x. They have started a 'fork' of Gnome 2.x called MATE (MAH-tay) --- including a fork of the Nautilus file manager, which they call Caja (Spanish for box).

Unfortunately, they forked from a Gnome 2.x version that already had some 'regressions'. I have submitted bug-reports and feature-requests for Gnome-Nautilus and MATE-Caja. Links to these submittals can be seen near the bottom of a 'Linux Mint Debian Edition (LMDE) Install Notes' page [L7 ].

But I have little faith that Gnome 3.x and MATE developers will heed these suggestions/requests. And they will probably never make some of the underlying 'thumbnail-making-of-images', of the Gnome/MATE GUI's, an option for the user.

Hence, their systems will always suffer from 'processing bloat'. And hence many Linux users will probably continue to use the 'lighter-weight' Xfce and LXDE (Linux X Desktop Environment) desktops and their PCman and Thunar file managers. Unfortunately, those file managers do not have the 'Nautilus-scripts' capability.

So I am starting my own file manager project. An early version of the GUI can be seen in the following screenshot image.

dir2dir_filemgr_usr-lib_usr-share-doc_screenshot_699x375.jpg

Click here [L8 ] to see the original image from which this reduced image was made.

The file lists of these 2 large directories --- /usr/lib and /usr/share/doc --- (about 1500 files each) came up in a fraction of a second. They take about 5 to 15 seconds (at least) with Nautilus, depending on the type of computer that I am on (and maybe depending on the Linux distro/kernel release).

It is pretty sad, but also quite fortunate, that I can make a file manager with a scripting language (Tcl-Tk) that is faster than the compiled file managers Nautilus and Dolphin.

__________

I have done a search on terms like 'file manager' on this wiki and found TkMC at https://wiki.tcl-lang.org/7772 and FileManager at https://wiki.tcl-lang.org/17534 . The 'TkMC' GUI is a two-directory-paradigm file manager like an old 'Midnight Commander' file manager GUI --- thus the 'MC' in 'TkMC'.

I like the speed of these file managers in bringing up lists of filenames in large directories, but they lack the key feature that I need --- a Nautilius-scripts-type capability --- the capability to apply a script (from a hierarchical directory structure of utility scripts) to one or more selected files. And they certainly lack the polish and depth-of-support of the Nautilus and Dolphin file managers.

I have also looked at other Tk file managers referred to in these pages (FileRunner, TOXfile, filerusher, sfm, tkdesk, tkfichier), but most of them are no longer being maintained and several of them require Tk extensions or compilation of libraries.

All of these Tk file managers are unsuitable for me because they do not have the capability to blend in with my Tk software systems (feHandyTools, feAppMenus, xpg) --- and they do not include the 'Nautilus-scripts' capability. Rather than taking their code and re-writing them to allow for setting 'compatible' color-schemes and fonts and widget-geometry --- and adding the Nautilus-scripts capability, I have decided to start from my own code base.

Perhaps I will look at the Tk code of some of these other file managers, say, when I am looking for techniques to use in implementing copy/cut-and-paste or drag-and-drop (someday?) --- or when I am looking for a way to handle 'broken' symlinks --- or how to handle symlinks (symbolic links, a.k.a. 'soft links') when they point to directories and when they point to 'regular' files.

_________

The 'dir2dir' file manager (image above) is a 'Midnight Commander' kind of interface --- two directory listings shown side-by-side. Actually, I based the interface on the old 'WS_FTP' interface of an MS Windows FTP client that used to be available for free, in a 'lite' version.

Another app with an interface in that category (a 'dual directory' interface) is the 'Filezilla' FTP client that is available on Linux and that I use almost daily to maintain my web pages.

I actually had an old 'host2host' Tk script that I devised around 1999, to allow for viewing directories on different SGI/IRIX (Unix) hosts, via the 'rsh' (remote shell) command.

I have taken that script and removed all the 'rsh' stuff (and the pair of host names capability) to make the starter code base for the 'dir2dir' Tk script.

NOTE1: If you are in an 'enterprise-type' environment with directory structures on remote file server disk drives NFS-mounted to your local workstation, then the 'dir2dir' file manager will be able to traverse and operate on the remote files. Through the magic of the Sun-Microsystems-developed NFS (Network File System) software, hierarchical directory structures on remote disk drives can be accessed AS IF they are on disk drives that are connected locally to your workstation.

NOTE2: The nice thing about the 'rsh stuff' was that it allowed the 'host2host' Tk GUI to show the files on a remote host even if the files were not NFS-mounted to your machine. It did this by running the command 'rsh ls -Ap' on the remote host to fill the listbox in the 'host2host' GUI running on your local machine. The only requirement was that you had to have the necessary permissions (.rhosts file setup) to run 'rsh' on the remote host.

The 'dir2dir' Tk GUI script runs the 'ls -Ap' command on your local host to show the files on locally connected disk drives, or files that are NFS-mounted to your local host.

___________________

The GUI image above is incomplete. I will be adding a 'Scripts...' button to the 2 'button stacks' on the 'dir2dir' GUI. I have the Tcl-Tk code for the 'select-file(s)-and-apply-a-script' capability already --- in the 'feHandyTools' system, in a file-selector GUI, similar in function to 'tk_getOpenFile', but with the added apply-a-script-to-selected-file(s) capability. I just need to incorporate that code into this 'dir2dir' GUI.

I will probably replace the 'cp' label in the middle of the GUI with a couple of 'cp' (copy) and 'mv' (move) radiobuttons.

I also plan to add a 'ToggleScrollbars' button (to change left-right location of vertical scroll bars) alongside the 'ToggleLayout' button (which changes left-right location of the 2 button-stacks). And I may add 'ChgColor', 'ChgFont',and 'Embellish' buttons to the top of the GUI.

In any case, when I get those enhancements into 'dir2dir', I will need to test it out with almost daily use over several months before releasing it into the 'feHandyTools' system as a 'production capable' system. And even then, the usual warnings and disclaimers will need to be added.

The bottom line is that I hope to have a quite capable and reliable release of 'dir2dir' available in the 2013 to 2014 time frame.

END OF 'Linux File Managers' 2012sep update.


Extra/Intra Networking Projects :

After 15+ years of programming with Tcl-Tk, I have not done anything with socket/network programming. But if I do eventually find a compelling need to do something in that area, there are many pages on this wiki from which to find useful code 'snippets'. Examples:

It is rather discouraging that many of these code contributions (such as mapping and weather utilities) no longer work --- typically because needed web sites change and cause breakages. But for a compelling project, the frustrations may be worth trying to overcome.


In Summary (and Conclusion):

I have plenty of Tcl-Tk projects on my things-to-do list --- 3D projects, ODE projects, Tk GUI embellishments, better Linux file manager --- which are to be implemented in the 'feHandyTools' and 'feAppMenus' subsystems of the 'Freedom Environment' subsystems, or as new subsystems there.

And since I am 70 this year (2012), I may never get around to doing all of them --- especially since doing one project in Tcl-Tk usually leads to doing others.

I wish I had spent many of my hours back in grad school (in the 1960's) getting experience in Tcl-Tk instead of standing in bars holding a glass of beer while listening to loud 1960's music (classics!). But I have an excuse --- Tcl-Tk was not even invented yet.

__________________________________________

Nowadays I waste too much time watching TV --- and since U.S. television nowadays is mostly commercials, I really waste a lot of time watching commercials.

I recoup some of that time by sitting in front of the TV with one of my Acer netbooks (with Ubuntu 9.10 installed --- or, in the future, probably LinuxMint or Debian installed) on a small table --- sometimes writing Tcl-Tk code as I listen to (and occasionally watch) the TV. But I really need to get rid of our cable TV subscription. (The early promise of pay-TV without commercials has gone horribly awry. Greed in the shriveled hearts/brains of certain men is the culprit, as usual.) I should devote that TV-watching time to more coding using Tcl-Tk --- as well as making more handy-dandy Linux shell scripts, in my 'feNautilusScripts' and 'feHandyTools' systems.

Ousterhout, you really started something.


I hear a heartbeat:

Tcl-Tk ... Tcl-Tk ... Tcl-Tk ... Tcl-Tk ... Tcl-Tk ... Tcl-Tk ... Tcl-Tk ... Tcl-Tk

TCL-TK ... TCL-TK ... TCL-TK ... TCL-TK ... TCL-TK ... TCL-TK ... TCL-TK ... TCL-TK

!TCL-TK! ... !TCL-TK! ... !TCL-TK! ... !TCL-TK! ... !TCL-TK! ... !TCL-TK! ... !TCL-TK!

IT'S ALIIIIVVE !!

Seriously. Not dead yet. .... Not by a long shot. I hope to help keep that from happening.

For me, at least, the reports of your death, Tcl-Tk, are highly exaggerated ... just the blatherings of unimaginative nattering nabobs of negativism.


CODE CONTRIBUTIONS ON THIS SITE :

In Aug 2012, I started making some code contributions to this site. Pages that I have contributed fall into the following functional categories :

  • Canvas-Image Utilities for Tk GUI Embellishment ( to make 'flat' BIBB's ) ( BIBB's = Buttons, Icons, Backgrounds, and Bullets)
  • Canvas-Image Utilities for Tk GUI Embellishment ( to make 'shaded', 3D-like BIBB's )
  • Canvas-Image Animations --- using canvas 'create image'
  • Experiments in making 'themed' Tk GUI's with image files
  • Tk Selector Utilities ( for colors, fonts, etc. )
  • Tk Plot Utilities (for QUICK line, pie, bar, etc. graphs )
  • Tk Text File Utilities (esp. the 'xpg' text browser)
  • Tk Sketching/Painting/Diagramming/Morphing/Pixel-Editing Utilities ( 'manual'-but-computer-aided )
  • Tk 3D Utilities ( 3D model viewers, file converters, file generators, etc. )
  • Tk Interactive and/or Animated Math/Geometry Demonstrations ( for education and/or entertainment )
  • Tk Interactive Math Tools ( calculators, selectors, ... )
  • Tk ODE Utilities ( utilities to integrate Ordinary Differential Equations )
  • Tk Game-Development utilities
  • Tk Meter/Dial Utilities ( utilities using meters/dials to show changing conditions )
  • Tk GUI Front Ends (to start up utilities with lots of start options - xinput, ffmpeg, xrandr, ...)
  • Tk File Managers for Linux ( to be posted at www.freedomenv.com )
  • Tk Internet/Intranet Utilities (using network protocols like http, ftp, ...)
  • Tk Coding Architecture/Algorithm topics ( a 'canonical' Tk coding plan, etc. )
  • Tcl-Tk Suggestions/Requests (for example, 'wish' interpreter enhancements)

Links to specific contribution-pages in these categories follow.

Each category is indicated below by a 3-character category indicator of the form 'Cxx', where xx are 2 alpha-numeric characters. (The 'C' stands for Code or Contribution.)

The designation '(coming)' after some of the titles indicates some pages that I plan to add. This assumes, of course, that I will live long enough to do them. Since I am over 70, that proposition is getting a bit iffy. I go ahead and list the proposals so that in case I do not get to carry them out, perhaps someone else will complete those proposals.

There were about 35 contributions in 2013 April, in about 11 categories. In 2014 March, there were about 60 contributions.


CIF) Canvas-Image Utilities for Tk GUI Embellishment ( 'flat' BIBBs ; see BIBB above ). 'IF' = 'Image Flat'

. . . GUI's for drawing rectangular buttons with color gradients :

. . . In the GUI's above, the color gradient follows vertical or horizontal straight lines.

. . . The following GUI's would provide for non-linear (curvalicious) color gradients in a rectangular 'button'.

  • CIF-go) Color Gradient Ovals - drawn about a user-selectable center point (uses canvas-'create oval')
  • CIF-??) A color-gradient-button-maker GUI using cartesian functions of one variable (coming)
  • CIF-??) A color-gradient-button-maker GUI using polar functions of one variable (coming)
  • CIF-??) A color-gradient-button-maker GUI using spline curves (coming)

. . . Other 'flat' rectangle/button makers :

. . . Try a variety of functions in CIF-fi and CIF-pf.

. . . Other 'flat' BIBB makers (beyond rectangles) :

. . . For more rectangles, try CIF-rp with N=4 and try CIF-se with large exponent.


CIS) Canvas-Image Utilities for Tk GUI Embellishment ( 'shaded', 3D-like BIBBs ). 'IS' = 'Image Shaded'

.
Try CIS-se with large exponent for 3D-like rounded-rectangle shapes.
Try CIS-sf for 3D-like star/petals/snowflake shapes.
Try CIS-sd for 3D-like (bulging) sphere/disk shapes.
Try CIS-sr for 3D-like donut/ring shapes.
Try CIS-st for 3D-like triangle shapes.
.
The CIF-pf utility, in the 'CIF' section above, could be used to edit-with-functions --- to make shaded-looking images from 'flat' images --- or to image process already-shaded images.
.
See 'CIP-b' below (a 'Title Blocks' utility) to add text-fonts to rectangular (and other shaped) images --- for example, to add text to shapes made by the utilities in the CIF and CIS utility groups.
.
The following page gives an overview of the 'CIF' and 'CIS' utilities, along with use of some of the other utilities in this list of contributions.

CIA) Canvas-Image Animations --- using canvas 'create image'

  • tkVisualizer --- animated images that can be driven by changing data (audio files, network activity, etc.)

CGI) Experiments in making 'themed' GUI's using image files. 'GI' = 'GUI with Images'


CSU) Tk Selector Utilities ( for colors, fonts, etc. ). 'SU' = 'Selector Utility'


CTX) Tk Text File Utilities ( esp. 'xpg' ). 'TX' = 'TeXt file utility'


CQP) Tk Plot Utilities (for QUICK line, pie, bar, etc. graphs ). 'QP' = 'Quik Plot'


CIP) Tk Sketching/Painting/Diagramming/Morphing/Pixel-Editing Utilities ( 'manual'-but-computer-aided ). 'IP' = 'Interactive image Processing'


C3D) Tk 3D Utilities ( 3D model viewers, file converters, terrain generators/viewers, color array generators, etc. ).

  • C3D-mg) A 3D Model Generator GUI ( tetrahedron, cube, sphere, etc. to OBJ, PLY, OFF, STL files )
  • C3D-ca) RYGCBM Color Animation ; Color Array Generator ; 'miniscaleH' widget
  • C3D-f2) Enhanced 3D Plot Examiner for functions of 2 variables
  • C3D-p2) A 3D Generator-and-Examiner for Parametric Surfaces of 2 Variables
  • C3D-mv) A 3D Model File Loader-and-Examiner - for OBJ, PLY, OFF, STL, FEA files
  • C3D-tg) A 3D Terrain Generator-and-Examiner - using Image Files
  • C3D-??) A 3D Model File Translator - between OBJ, PLY, OFF, STL, and other files (coming)
  • C3D-??) A 3D Molecule File Loader-and-Examiner - with OBJ file output (coming)
  • C3D-??) A 3D '.hgt' Binary Terrain File Loader-and-Examiner - with OBJ file output of sub-sections (coming)
  • C3D-??) A 3D 'point cloud' Display-Examine utility - from OBJ file ; numeric point-IDs shown (coming)
  • C3D-??) A 3D Model File Report Generator - giving Edge/Polygon/Vertex relationship listings (coming)
  • C3D-??) A 3D Model File 'Touch-Up' Editor - to manually combine mesh elements and/or refine meshes (coming)
  • C3D-??) An Image-Point-Picker to 3D-Terrain-File Generator - example: contour maps to terrain files (coming)
  • C3D-??) An Image-Point-Picker to 2D Polygonal Curves - example: font images to polygonal curves (coming)
  • C3D-??) 3D Models Extruded from 2D Polygonal Curves - example: 3D block letters and numerals (coming)
  • C3D-??) An Experiment in Gouraud-like shading (color interpolation) of a triangle on the Tk canvas (coming)
  • C3D-??) A utility to generate Color Arrays and show them as stacks of colored rectangles (coming)
  • C3D-??) An Experiment in Texture Mapping to a polygon on the Tk canvas (coming?)
  • C3D-??) A 3D auto-mesh-enhancement utility (coming?)
  • C3D-??) A 3D mesh 'decimation' (reduction) utility (coming?)
  • and still more to come

CMD) Tk Interactive and/or Animated Math/Geometry scripts ( for education and/or entertainment ). 'MD' = 'Math Demonstrations'

  • CMD-ps) Primes Sieve - on a resizable canvas (using canvas-'create image')
  • CMA-rts) Thales Theorem Demo - Right Triangles In a Semi-circle (an interactive demo)
  • CMD-??) An interactive demo of another Thales theorem (coming?)
  • CMD-??) An interactive demo of a Chinese demonstration of the Pythagorean theorem (coming?)
  • CMD-??) An interactive demo of Euclid's proof of the Pythagorean theorem (coming?)
  • CMD-??) An interactive demo of using 2 triangles to multiply, divide, and take reciprocals (a non-logarithmic sliderule) (coming?)
  • CMD-??) An interactive demo of the Law of Cosines (a.k.a. cosine formula or cosine rule) (coming?)
  • CMD-??) An interactive demo of the sine & cosine half-angle formulas (coming?)
  • CMD-??) An interactive demo of the sine & cosine sum of angles formulas (coming?)
  • CMD-??) An interactive demo of Heron's formula (coming?)
  • CMD-??) An interactive demo of Ceva's theorem (coming?)
  • CMD-??) An interactive demo of Pappus's theorem (coming?)
  • CMD-??) An interactive demo of Desargues's theorem (coming?)
  • CMD-??) A GUI for Animating Summation of Series - of Wallis, Newton, Euler, etc. (coming?)
  • CMD-??) A GUI for Animating Convergence of Infinite Products - of Vieta, Wallis, etc. (coming?)
  • CMD-??) Experiments with Newton's series for binomials with negative and/or fractional exponents (coming?)
  • CMD-??) An interactive demo of Achimedes' method of approximating area & circumference of circle, with polygons (coming?)
  • CMD-??) An interactive demo of an Egyptian method of approximating area of circle, with squares (coming?)
  • CMD-??) An interactive demo of a Japanese method to approximate area of circle, with rectangles (coming?)
  • CMD-??) An animated demo of an Asian method of showing circle area = R * circumference / 2 (coming?)
  • CMD-??) Enhanced Morley's Triangle demo (color choices, labels, areas/lengths/angles/etc. display) (coming?)
  • CMD-??) Emulate Brownian motion, restricted to 2D (display polygonal track on Tk canvas) (coming?)
  • CMD-??) Emulate Brownian motion, polygonal tracks in 3D (with 3D viewer, projection of track on Tk canvas) (coming?)
  • CMD-??) Enhanced Raindrops Animation (color choices, solid-fill, ripples, etc.) (coming?)
  • CMD-??) Animate creation of the Koch snowflake, with color and fill options (coming?)
  • CMD-??) Animate creation of the Sierpinski gasket, with color and fill options (coming?)
  • CMD-??) Give the user a choice of up to 100-plus point-line-circle (surprising) configurations that have been discovered for any given triangle --- example: the 9-point circle & Euler line --- Ref: [L9 ] (coming?)
  • CMD-??) An interactive demo of Napoleon's theorem on equilateral triangles (coming?)
  • CMD-??) An interactive demo of Simson's theorem on triangles in a circle (coming?)
  • CMD-??) An interactive demo of Ptolomy's theorem on quadrilaterals in a circle (coming?)
  • CMD-??) An interactive demo of Viviani's theorem on equilateral triangles (coming?)
  • CMD-??) An interactive demo of Descartes' method of finding a square root via a semicircle construction (coming?)
  • CMD-??) A Tcl-Tk harmonograph [L10 ] with color options (coming?)
  • and still more to come

In the course of developing these demos, I hope to develop some algorithms/procs that make it easy to perform geometric constructions (example: a generalized proc for creating a line perpendicular to a given line and passing through a given point). By developing a library of utility procs like that, it will hopefully become easier and easier to develop demos of math theorems/results/proofs/facts/truths.

In fact, it may become possible to put together an 'interactive geometry system' somewhat like some that are listed at Wikipedia [L11 ]. Or, at least, I should be able to show that Tcl-Tk is so flexible that one can perform demos in ways that are not possible with any (or most) of these software systems.

A paraphrase: "Math longa. Vita brevis est."


CMT) Tk Interactive Math scripts ( calculators, selectors, ... ). 'MT' = 'Math Tools'

  • CMT-acs) tkAngle-Convert-Select - radians, degrees, percents-of-circumference-of-circle [L12 ]
  • CMT-vcs) tkSpeedGun-Convert-Select - kilometers/hr, miles/hr, lightyears/billion-years [L13 ]
  • CMT-tcs) tkTemperature-Convert-Select - Fahrenheit, Centigrade, Kelvin [L14 ]
  • CMT-ads) tkAdsAdder - to enter TV ad start and end times, and grand total [L15 ]
  • CMT-??) tkDistance-Convert-Select (coming)
  • CMT-??) tkArea-Convert-Select (coming)
  • CMT-??) tkVolume-Convert-Select (coming)
  • CMT-??) tkWeight-Convert-Select (coming)
  • CMT-??) tkOscilloscope - to experiment with dynamic curves in 'the plane' (coming?)
  • CMT-??) Put a Tk GUI on some nonlinear equation solving procedures. Ref: Newton-Raphson Equation Solver (coming?)
  • CMT-??) A Traffic Simulation - on a simple grid of streets and stop-lights, with simplifying assumptions (coming?)
  • CMT-??) Calculate who owes how much on a house rental for a week, for members of a family reunion --- with some members staying different numbers of days --- with some rooms being valued higher than others --- with some family members getting a discount (such as children or the low-earning/low-saving uncle) (coming?)

CDE) Tk ODE Utilities ( utilities to integrate Ordinary Differential Equations ). 'DE' = 'Differential Equation'

  • none yet
  • CDE-??) Integration of ODE's for simple (wide-swinging) pendulum, with animation of solution (coming)
  • CDE-??) Integration of ODE's for double (wide-swinging) pendulum, with animation of solution (coming)
  • CDE-??) Integration of ODE's for (non-linear) spring-mass-damper system, with animation of solution (coming)
  • CDE-??) Integration of ODE's for plane (2D) 3-body problem, with animation of orbits (coming?)
  • CDE-??) Integration of ODE's for 3D 3-body problem, with trajectories output to 3D-line-segs OBJ file (coming?)
  • CDE-??) Integration of a system of first-order ODE's for pharmacokinetics simulation --- 2-compartment, plasma-tissue model, for a chemical and up to 2 metabolites, oral and/or intravenous administration, for various mammals (ex: mouse, rat, rabbit, dog, human, horse) (coming?)

CGA) Tk Game-Development Utilities. 'GA' = 'GAming'

  • CGA-fromB64) Paste BASE64 or XBM image data - then SHOW IMAGE - with Write-GIF option
  • CGA-toB64) Make BASE64 data from Tk 'photo' image files (GIF,PGM,PPM,PNG) - a Tk GUI wrapper for the 'base64' command (for Linux/Unix/BSD systems)
  • CGA-libB64) A library of base64-images, with a GUI wrapper to see the images and optionally make GIF files (coming?)
  • CGA-libGIF) A library of GIF-image-files, with a GUI wrapper to see the images and optionally make base64-data (coming?)
  • CGA-GP) A Tk GUI utility to convert between GIF and PNG files - and show each on a canvas (coming?)
  • CGA-PPM) A PGM/PPM-file to GIF-file conversion utility (coming?)

CME) Tk Meter/Dial Utilities ( utilities using meters to show changing conditions ). 'ME' = 'MEters'

There are some *demo* scripts on this wiki that show meters or dials --- crude meters/dials and perhaps one or two with anti-aliased needles. But no one seems to have tied those meters into doing something useful. By calling some utility programs on Linux that return memory-usage numbers or CPU-usage numbers, I propose making some (anti-aliased, rather pretty) meters that dynamically display such activity --- by using the Tcl 'after' command to update the meter display, every so many milliseconds, in a Tk GUI.

The meters of Marco Maggi are the best ones that I have seen on this wiki

especially the tachometer and the voltmeter. Unfortunately, he did not post images with the code, but the code seems to run with little change (at least on Linux). If it's OK, someday, I may post images on those 3 pages so that people can see the meters easily. (Done, 2013 Jul.)

Here are four implementations of the Maggi tachometer-style meter:

I may return to at least one of these 4 meter utilities and make a version based on a 'create image' technique --- instead of the 'create arc' and 'create line' commands used to make the Maggi-meters.

And I may try to make a version based on a 'moving skyscraper silhouette' or 'moving mountain-tops silhouette' technique based on using 'create line' on a Tk canvas.

These two alternatives --- 'create image' and 'moving skyscraper' --- are discussed in more detail near the bottom of the page A Tachometer-style Meter --- for CPU Usage.

On 2013dec21, I submitted code for a 'create image' version of the CPU-usage meter:

  • CME-cpu2) A High-Definition Meter - for CPU Usage - using 'create image'
  • CME-mem2) A High-Definition Meter - for Memory-and-Swap Usage - using 'create image' (coming?)
  • CME-net2) A High-Definition Meter - for Network Interface Usage - using 'create image' (coming?)
  • CME-stor2) A High-Definition Meter - for File System Usage - using 'create image' (coming?)

Also on my 'to do' list are some 'traveling-history' plots of the above types of computer usage:

  • CME-cpu3) A Traveling History Plot - for CPU Usage - using 'create image' (coming?)
  • CME-mem3) A Traveling History Plot - for Memory-and-Swap Usage - using 'create image' (coming?)
  • CME-net3) Traveling History Plot - for Network Interface Usage - using 'create image' (coming?)
  • CME-stor3) Traveling History Plot - for File System Usage - using 'create image' (coming?)

CFE) Tk GUI Front Ends ( to start up utilities with lots of start options ). 'FE' = 'Front End'

In the 'CGA' group above, there is another 'front-end' Tk utility (for 'base64'):

Occasionally, I will have scripts that could be candidates for inclusion in more than one script-category on this page. In most cases, I will probably put the script in one category --- and add a note in another applicable category, pointing to that script.


CFM) Tk File Managers for Linux 'FM' = 'File Managers'


CNP) Tk Internet/Intranet Utilities (using network protocols like http, ftp, ...) 'NP' = 'Network Protocol'


CCA) Tk Coding Architecture/Algorithm topics. 'CA' = 'Code Architecture/Algorithm'

  • CCA-1) A Canonical Structure for Tk Code --- and variations
  • CCA-2) A demo script for the 'miniscale' widget, used above in CIF-1d (coming?)
  • CCA-3) A demo script for the 'miniscaleH' widget, used above in C3D-ca (coming?)
  • CCA-4) A demo script for the 'minilistbox' widget, used above CIF-rp and CIF-gs (coming?)

CSR) Tcl-Tk Suggestions/Requests. 'SR' = 'Suggestions and Requests'

  • CSR-1) Proposed: A Tcl-Tk DONATIONS system --- to support documentation, promotion, conferences, and perhaps some development [L16 ]
    .
  • CSR-2) 2 requests on the Tk 9.0 WishList page ( an image-behind-text-on-button improvement and JPEG/JFIF-read --- items 89 and 92 )

More Tk scripts are coming. I have at least six in various categories in various stages of development --- and I keep thinking of more to write ... :-) ... much faster than I can write them ... :-( .

____________

Condensed Demos of Widget-Maker Procs

After I get a little more experience using the 'minilistbox' widget --- that I devised for A two-color rounded-POLYGON-maker GUI (equilateral and not so equilateral) and used in GUI for Drawing 'Gradient Spheres' (lighted disks), with lots of control --- and a little more experience in using the 'miniscale' widget that I devised for A color-gradient-button-maker GUI with 6 'miniscale' widgets, then I will make demo scripts for those two widgets --- like Suchenwirth did for his 'spinner' widget, and presented on the spinbox page.

Until I devise relatively compact demo pages for 'minilistbox' and 'miniscale' (and 'miniscaleH' [L17 ]), you can extract the procs that make the widgets, and other statements for implementing those widgets, from the GUI pages referenced above.

_____________

Comments in Donated Scripts

In quite a few of the scripts above, I wrote many of the comments before the code was tested and debugged. I may have failed to revise some of the comments as changes were made in the testing-debugging process. And in some cases, some of the comments came from other scripts and I did not notice that I needed to change some of those comments.

So in coming months, I will try to go through previously posted scripts (probably as I watch/listen-to TV, working on one of my netbooks) and make corrections to some of the comments.

In some scripts, I may make a few code improvements --- based on coding experience I have gained since writing those scripts. For example, I found out (the hard way --- which is often the best way), in doing the script at GUI for Drawing 'Super-ellipses', with nice shaded edges, that I need to make a practice of using braces whenever I use 'expr'. I need to sweep through my donated scripts to make that change.

I am motivated to touch up the scripts because I plan to add many of those utilities to my 'feHandyTools' system --- and a 'tkGooies' system --- at freedomenv.com [L18 ].

_____________

Handy 2D Plot Utilities

I have a set of 5 'QuikPlot'/'PlotQuik' GUI utilities (pie, bar, point-line, math-expression, 2-or-3-columns in a data file) whose code and screenshots I may post on this wiki. For now, their Tk scripts are available in the 'feHandyTools' subsystem of my Freedom Environment (FE, effie) software.

I have posted a 'stand-alone' version of the pie chart script on this wiki. I plan to post stand-alone versions of the other 4 'QuikPlot'/'PlotQuik' scripts on this wiki in the 2013 to 2014 time frame.


This is THE END of my 'bio' page. Some Tcler feedback and resulting discussions follow.


A PLOTTING ALTERNATIVES DISCUSSION FOLLOWS :

RLE (2012-08-15): Do these quikplot utilities overlap with Tklib's plotchart and tkpiechart modules? If not you might consider contributing them into Tklib.

---

uniquename (2012aug17): Probably the best way I can answer your question is with screenshots. Go to the following freedomenv.com link [L19 ] and scroll down through about 8 rows of screenshots to get to about 4 'QuikPlot' screenshots.

Unfortunately, these screenshots do not indicate the nice behavior of these GUI's as you change the window size.... Nor how you can drag titles and labels around on each plot canvas....

Nor how you can change the plot background color to (blinding) white -- which is useful to save ink when printing the image --- say, by doing a screen/window capture and taking the (cropped) image file into an image view-print utility, such as 'eog' (Eye of Gnome) on Linux.

And there are still more nice features to the plot GUI's.

---

uniquename (2012aug20): Just in case the freedomenv.com site goes dead in the near future (if I go dead in the near future), I have uploaded a sample plot image to this wiki site. Here is a reduced image.

feHandyTools_PlotQuik_fromFile2cols_screenshot_476x350.jpg

Click here [L20 ] to see the original image from which the reduced image was made.

In regard to contributing to Tcl-Tk libraries:

The maintainers of Tklib are welcome to take my code and change it according to their appearance standards --- and to make sure that there are versions for Mac and MS Windows, as well as Linux. There are too many items on my Tcl-Tk (and shell) programming 'bucket-list', and not enough years left, for me to take on such tasks.

I do all my programming on Linux. Accordingly, I have noted on the 'Contact' page of my freedomenv.com site:

"Please note that I have no plans to port (and test) any of the FE subsystems to another OS, like a Mac or Microsoft OS. And I have no plans to internationalize the text in these subsystems. I leave that to others."


On the quality of (some) images on this wiki :

PYK 2014-03-02: Hi Blaise, I think the images you've been adding are nice improvements to the Wiki. They look fuzzy on my screen though ...

uniquename 2014may21: The comment above resulted in a long thread that is not suitable to this already-long 'Category = Person' page. The 'discussion' deserved its own page. I have moved it to the page titled On the quality of (some) images on this wiki.