From: Symion <kn...@ip...> - 2009-12-08 12:36:28
|
Thanks, I had a look at the cT tutorial, although I haven't downloaded cT yet, I can see that it was heading in a similar direction as my current batch of projects. I also checked out the point-particle system article on The Pseudowork-Energy Equation as well as the Potential Energy articles. Very interesting! Yes! I Am interested in graphic editors and programming methods using graphical symbols (flowcharting?) I have developed a number of tools related to this subject. These include a simple to use multi object drawing tool with hollow and solid rectangle and ellipse objects as well as line drawing, text entry and positioning functions that output results to a data file, Idle window or a standalone Vpython script. The idea was to produce non-animated Flowcharts. Another project is a little more ambitious in that it is based around a Self Modifying Program that enables the user to create any Mathematical symbol, then to connect it to a keyboard Macro (F1 to F8) as a translatable, scalable object. These symbols can then be recalled and used to compose standard Mathematical Formulae. The neat thing about this project is the expandability of the program. The base program is called the 'Parent' and it can generate 'Siblings' that are exactly the same as the Parent, except that any extra Macro objects created during the session are automatically included in the new Python program. When the sibling program is run, the new symbols are there, ready to use in the composition of new Formulae. This process can then be repeated until ALL necessary symbols have been defined and made available. (A Bootstrapping process?) Currently the user has access to open, shifted, control and ctrl+shift keymaps, but the main problem is the shear number of symbols required and the limited number of keys available. This means I will have to develop an expandable menu system. (Controls module?) This is where I am at the moment. I am definitely interested in contributing to a Graphic Editor type project for Vpython. Symion Bruce Sherwood wrote: > Nice! Maybe you would be interested in a related historical reference concerning > drawing editors that generate program source code. In 1997 Ruth Chabay realized > that intro physics should include computational modeling, given that it was > becoming co-equal with theory and experiment and playing a central role in all > of science and engineering. In that year, at Carnegie Mellon, she and I had > students in intro mechanics model physical systems by writing programs in cT, a > programming language I had created in 1985 (see the cT archives on the > Documentation page at vpython.org). > > cT included easy-to-use but not object-oriented 2D graphics. One of the unusual > features of cT was that the accompanying text editor was tightly coupled to a > drawing editor. If you positioned the cursor in a program and hit F5, you found > yourself in a drawing editor that let you create lines (like Basic_0.py), > circles, etc., and as you worked in the drawing editor you saw the corresponding > program code being inserted into the text editor. You could also select graphics > statements in the text editor, press F5, and see and modify the graphics in the > graphics editor (with associated changes in the text editor). > > In 2000 David Scherer created VPython (Chabay and I helped with design and > testing), and we abandoned cT because VPython was far superior (3D rather than > 2D; object-oriented; based on a standard language, Python). In fall 2000 > students in our course at Carnegie Mellon did computational modeling using VPython. > > It would be neat to have a well coupled drawing editor for VPython, building on > Basic_0.py. Of course it is a big challenge to create a good interface for 3D > drawing, but there are now some models (e.g. Second Life). > > Bruce Sherwood > > Symion wrote: > >> Hi there, >> I'm just answering my own question. >> The following program demonstrates 'the problem' and shows how I got >> around it. >> >> Source Code: Basic_0.py >> <http://home.iprimus.com.au/knoware/webpage/Basic_0.py> A simple 2D >> line drawer. >> >> This is not a problem with Vpython, but is related to My reliance on the >> Default scene object and my attempts to >> preserve it. >> The solution is to instantiate new display object instead of trying to >> reuse the old one. >> >> Symion |