http://www.me.metu.edu.tr/cuneyt/EasyNumerics
It is written in pure Tcl/Tk. I developed it to use in my numerical
methods course as a teaching tool. It is designed to be used in a
typical undergraduate level numerical methods course for engineers. It
can solve problems about
Root Finding
Solution of Linear Algebraic Equations
Optimization
Curve Fitting
Numerical Differentiation & Integration
Solution of ODEs
If you are also interested in doing math with Tcl/Tk, please feel free
to download and use it. It is only tested by myself and my students, so
I am sure there are many bugs in it, but still it can do quite a lot of
things.
I will be very very happy to hear your feedback. If you have any
suggestions or any feature that you think will improve the software,
please let me know.
Dr. Cuneyt Sert
I did a cursory check and loved it.
I hope you keep maintaining it by adding functions and features (and
help notes...).
Great job.
afri
Bill
I tried the script under Fedora Core 5 / Tcl8.4 and it works fine. Just
start wish (don't use tclsh) and source the script. The zip file is for
people using Winders that don't have Tcl installed. I dont' know if the
same thing exists for Linux.
Later,
Joel
> I tried the script under Fedora Core 5 / Tcl8.4 and it works fine. Just
> start wish (don't use tclsh) and source the script. The zip file is for
> people using Winders that don't have Tcl installed. I dont' know if the
> same thing exists for Linux.
You're right. It worked for me too. For some reason when I looked
earlier I only noticed the .zip file, perhaps because of the prominent
instructions for MS Windows. Thanks.
Bill
I am sorry for the confusion. Although not checked heavily, the program
should work fine under different unixes. That note on the website was
put there for some other purpose, but I guess I should remove it.
Cuneyt
Some people here said they were able to use it under Linux. Does the
user interface look OK? What version of Tcl do you have?
Cuneyt
At a guess it depends on what fonts (and/or font servers) they've got
installed. Some people use the fonts that come with Windows under X11,
and they'll get the same basic size of widgets and will probably do OK.
Donal.
> At the following website you'll find a software called EasyNumerics.
>
> http://www.me.metu.edu.tr/cuneyt/EasyNumerics
>
If you have not done so yet, I will make a reference to it on the Wiki.
BTW, you know the math module in Tcllib?
Regards,
Arjen
> things are not aligned properly. That is because I did the entire
> development under Windows, and tested only the some of the earlier
> versions under Linux and also because I heavily used the place command
> instead of a more clever layout management.
Yes, the place command is a killer if there is any variability
in sizing (unless you carefully measure everything in your code).
Another small problem is that you haven't set highlightbackground
the same as background, so there are grey rectangles around widgets.
--
Donald Arseneau as...@triumf.ca
> If you have not done so yet, I will make a reference to it on the Wiki.
I'll appreciate if you do so. Thank you.
> BTW, you know the math module in Tcllib?
I don't know its capabilities. Since I developed EasyNumerics for my
numerical methods course, I wrote all the math functionality from
scratch so that I can control them the way I want. Also I was thinking
to ask my students to modify certain parts of it as exercises. But I've
never did that.
Cuneyt
For this, I tried a quick fix by creating a font like
font create -family times -size 11 -weight normal
and using it for all the buttons, labels, etc. But size 11 on Linux and
size 11 on Windows are different. What else should I do to get a
platform independent font?
Cuneyt
Actually after running it under Linux and seeing that embarrassing GUI,
I am now trying to fix all these little things. The version you can
download is also being updated.
Cuneyt
Hmm. In that case it could be due to differences in the scaling factor.
Tk tries to make the size of an 11pt font be the exact same it would be
if printed on a page. It doesn't do very well though; the scaling is
usually wrong. (Windows, without "large fonts" turned on, always uses a
value that is about 1.335. Most Xservers tell near-random lies.)
Work around this by doing:
tk scaling 1.335
on all platforms (but be aware that this may reduce the accessibility of
the application).
Donal.
You may want to use the settings in "gtklook.tcl" on the Wiki:
http://wiki.tcl.tk/10424
Regards,
Arjen
I'll definitely look into that. I'll also play with tk scaling and see
how it helps. But for the time being I ended up putting two slightly
different versions, one for windows and one for linux. The Linux
version is only tested on a standard Ubuntu 606, and looks OK. But I
really don't know what it'll look like on some other configuration.
Let me ask something else. If I don't use any -font option, things are
displayed with some default font settings. How can I find out what
those default settings are?
Cuneyt
>
> I don't know its capabilities. Since I developed EasyNumerics for my
> numerical methods course, I wrote all the math functionality from
> scratch so that I can control them the way I want. Also I was thinking
> to ask my students to modify certain parts of it as exercises. But I've
> never did that.
>
I can quite understand that :). I was just curious - and I wondered
whether
there would be anything we could adopt for Tcllib.
Regards,
Arjen
> Let me ask something else. If I don't use any -font option, things are
> displayed with some default font settings. How can I find out what
> those default settings are?
When you call the "configure" method of a widget, you'll get back a
long list of lists. Some of these have two elements, e.g. {-fg
foreground} - ignore for now, they're just "option aliases". What's
interesting is the five-element lists, e.g.
{-font font Font {{MS Sans Serif} 8} {{MS Sans Serif} 9}}
The first three are the name of the option in different uses (you'd
typically only use the first), the fourth element is the default, and
the fifth the currently configured value.
You can also extract single parts with "configure":
set defaultFont [lindex [$w configure -font] 3]
Read off what the default -font values are using either the configure
method or the cget method. Once you've got that info, you can use the
[font] command to find out more about it.
Donal.
> I was just curious - and I wondered whether there would be anything we could adopt for Tcllib.
>
> Regards,
>
> Arjen
Well, my text editor says it has more than 7000 lines. I hope you can
find something useful in it. Is there anything specific that you are
looking for?
Cuneyt
First off, I like most of how the application works. I like how, once I
pick a function from the main menu, I'm guided through the inputs by
having certain widgets only becoming enabled once some data has been
entered.
I suggest you give your application a proper menubar and possibly a
toolbar rather than hiding the main UI features in the bottom right.
There are reasons why most apps have traditional menubars, and those
reasons have to do with usability. You simply cannot have an "easy"
application without it. People expect them, and when they aren't there
you've instantly built up mistrust where the user, on a subconscious
level, thinks "nothing will work as I expect".
Also, I suggest allowing the user to resize the window. If you stick to
simple layouts with pack and grid (and your layouts appear to be pretty
simple) resizing mostly just works. Even if the resizing results in big
empty spaces, let the user try. Users need to feel like they control the
application, rather than feel like they are being limited by it.
About the only advice I have to give WRT resizing is that when designing
a screen or a section of the screen, always designate one widget (or one
row and one column) to be the one to take up the slack (-expand 1 for
pack, or row/columnconfigure with a -weight of 1 for grid). If there
aren't any obvious candidates (eg.: text widget, canvas) you can always
add an empty frame and/or configure an extra row and column.
I also recommend sticking with the default colors of widgets as much as
possible. The defaults are time-tested, and any color you add will
simply be your preference and likely not those of your users.
Actually I just learned about the "option add" command. Now what I am
thinking is to create couple of color schemes for the application, and
let the user select one of them or just go with the default system
colors. Is it possible to do such a "color scheme switch" while the
program is running?
Cuneyt
Yes, it is possible. Not with the option commands (only) though -- those
only affect widgets created after the option has been set. To implement
themes the old fashioned way you simply walk the tree of widgets
applying the new colors (and/or use tk_setPalette, though I'm not sure
if anybody ever uses that except to satisfy a curiosity).
The better way to support themes is to use Tk's new theme engine "tile".
http://wiki.tcl.tk/tile. Unless you have a valid reason *not* to use
tile, I strongly recommend you use it.
> The better way to support themes is to use Tk's new theme engine "tile".
> http://wiki.tcl.tk/tile. Unless you have a valid reason *not* to use
> tile, I strongly recommend you use it.
Thank you. Tile will definitely improve the look-and-feel of my
program. To tell you the truth, due to native-look-and feel concerns I
was planning to write the whole program with another language and GUI
library, but now I hope that Tile will save me from all this trouble.
Cuneyt
Very impressive.
My only initial suggestion is that I like to be able to keep the Help
Window open while using the GUI. Commenting out the [grab] statement at
line 1610 let me do that, with no obvious problems. This does not seem
to me to be one of those situations where the user should be kept from
using the main window while another is open, but of course I could have
missed something.
Anyhow, thanks for posting it here, and I look forward to seeing how it
grows if you are able to maintain it for a few years.
Gerry
Thank you.
> My only initial suggestion is that I like to be able to keep the Help
> Window open while using the GUI. Commenting out the [grab] statement at
> line 1610 let me do that, with no obvious problems.
You are right, (although not very complete) that help window should
stay open in order to be useful. Some other people asked me to do that
also. Thanks for reminding.
> Anyhow, thanks for posting it here, and I look forward to seeing how it
> grows if you are able to maintain it for a few years.
As long as my department asks me to teach numerical methods, I'll keep
working on this software. Improving the look and feel, proper
exception/error handling, more complete help, etc. are the things to
do.
By the way, if any of you are interested, this work is presented at
American Society for Engineering Education (ASEE) 2005 Conference. The
link for the paper is http://www.asee.org/acPapers/2005-48_Final.pdf