Re: Handle Graphics and visualisation applications in Octave.
Ole Jacob Hagen <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.graphics |
|---|---|
| Message-ID | <[email protected]> |
Hi, again. On Thu, 22 Jan 2004 10:12:09 -0600 Melvin Hadasht <[email protected]> wrote: > On the other if we never did reinvent the wheel we would > still use wooden discs with our cars... Nice.... :-) > What are the legal issues on using graphics-handle or using the same GUI approach than Matlab? Well, if Mathworks Ltd didn't like Octave, they would stop it by now, I guess. Octave supports most of data-objects and datatypes in MATLAB, and this is ok. When we implement handle graphics routines to Octave, we have to watch out for one thing: DO NOT USE COPY AND PASTE TO CREATE NEW M-FILES, SINCE THEY ARE COPYRIGHTED AND THEREBY A PROPERTY OF THE MATHWORKS, INC. These files are: subplot.m, plot.m, title.m and all the high level + all the low level function such as get.m and set.m.. set.m and get.m exists only for help functionality, anyway. >Currently it behaves like matlab: events are polled in the input wait loop (and > in future in some specific gui-functions), and it can call user functions or it can > evaluate strings on button click etc... For the moment it construct the GUI from > an XML file (using glade, but wxWindows and QT offer the same > functionality). I am currently in need for the graphic-handle and I am investigating the existing solutions. I guess you are refering to OctaViz? Or VatKo? If you are refering to VatKo, please give us a link and source, so we can see what you have done so far. Have you been in touch with Mr. Nick Smethurst? We should make a native implementation of handle graphics objects to Octave. This will work as "container" for the h-g objects, with some setp and getp methods, but the main idea is that the visualisation application are controlling h-g objects, and not Octave. Octave can manipulate h-g objects with set and get functions, which are available in visualisation application distro. Let me explain how I want to do stuff, by example. Step 0. start Octave Step 1. x = -pi:pi/10:pi; y = sin(x); Step 2. p_h = plot(x,y) Step 3. l_h = get(p_h) Explanation: 0: Starting Octave creates just the root-object of handle graphics. This is also done by Matlab, as per today refering to documentation on http://www.mathworks.com 1. creating x and y vectors. 2. Create p_h with plot, p_h is in fact h-g object named Line, which also require an Axes-object and a Figure object. There is only one copy of x and y in Octave's memory, while the visualisation application has it's own x and y vector. 3. l_h, which is a struct-array contains XData, YData, ZData and the rest of properties of Line object. This command collects the p_h-object directly from visualisation application, and l_h objects are only created at this time. Matlab is now having to versions of x and y vectors. The original is x and y, while XData and YData are copies of x and y. As long as we agree on a native implementation of h-g objects in Octave, and how Octave should use them, then a user can choose between n-number of visualisation application. Cheers, Ole J. > > I totally agree. Moreover, those use different approaches and have different dependencies. Unless octave provides its middle-weight native plotting and gui alternatives, those different projects make real sense to me. > > >