octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3D plotting solutions


From: Ole Jacob Hagen
Subject: Re: 3D plotting solutions
Date: Fri, 5 Dec 2003 16:46:10 +0100 (CET)

Hi, Johan.

I am developing Oplot++, which will support handle graphics routines of
Matlab in Octave. I'm trying to make a best solution in design, since a
lot of people want to use handle graphics functionality inside Octave. 
This requires that a low-level handle graphics functionality is inside
Octave, and sent to the visualisation application. 

There are many visualisation applications which could benefit from
handle graphics routines in Octave. 

1. Gnuplot
2. KMatPlot
3. KnewPlot
4. PlPlot
5. KVisualiser (Developed by Nick Smethurst)
6. Oplot++ (Developed by Hans Oluf Hagen and me for now, thanx to David

   who tests Oplot++)
and so on....

I'm very excited to see that you have made pde-plot using
Coin3D/OpenInventor. ;-) 
Do you want to help me with pde-plot parts inside Oplot++? 
This would be great, if you have opportunity and time to help us with
Oplot++, with this matter. 

Oplot++ is based on Coin3D and Qt. I'm a patriot, since I'm Norwegian,
and both Coin and Qt is developed in Norway....;-) 
Coin is used for visualisation, while Qt is for gui-widgets. 
Non-gui signal/Slot mechanisms should be changed to use libsigc++,
instead of Qt's signal/slot mechanism, though. 

Coin3D is released under GPL-license. 

I'm currently away until January, but I will check this email
frequently. 

Hope you will consider to become a Oplot-developer. I believe you have
a lot to contribute. 


Any comments? Paul? Nick? John?

Cheers, 

Ole J. Hagen




















 --- Johan Jansson <address@hidden> skrev: > Hi!
> 
> I'm part of a group at Chalmers University which focuses on the FEM
> (Finite
> Element Method) (http://www.phi.chalmers.se/). We are using Matlab
> and
> Octave as tools both in the research work and in education. There is
> a
> drive now to see if we can use only Octave. This would also
> generalize
> to the entire university in the longer perspective, but as a first
> step we can consider only our group.
> 
> Octave can replace Matlab for most tasks, such as writing prototype
> equation solvers in education and research and implementing standard
> numerical algorithms in education. However, visualization of 3D data
> is an important part of our work, and here Octave is not fully up to
> Matlab's level yet (Matlab itself is not always very good either).
> 
> A concrete example is plotting the solution of a partial differential
> equation solved by the FEM. A typical solution consists of a
> triangulated domain (in 2D) with scalar values in the nodes
> (vertices). Visualization of this solution can be done by plotting
> the
> triangulated domain with colors representing the nodal values, or
> letting the nodal values represent a z component, or a combination.
> 
> Currently there appears to be no simple way of plotting such a
> solution in Octave. "mesh" plots values on a structured grid on a
> square domain. The underlying plotting primitive, Gnuplot, also has
> this restriction. I have looked at the "pm3d" extension, and while it
> looks like a great implementation of its scope, it still has the same
> restriction.
> 
> It doesn't seem like this plotting primitive is powerful enough.
> 
> I have a proposal on how to improve this:
> 
> Add a plotting primitive which takes a 3D geometry as input, for
> example as a data file. It doesn't really matter which format this 3D
> geometry has, as long as it covers triangles, line segments and
> colors (perhaps a few more less critical, such as text for
> annotation). This would suffice to implement the plotting example I
> described previously, as well as "mesh", "surf", and any other 3D
> plotting function, such as isosurface plotting.
> 
> An external application could then be used to render this geometry,
> just as Gnuplot is used today. It would thus follow the same
> interface
> structure as with Gnuplot, and keep Octave a data processor, leaving
> visualization and graphics to other applications. It would then be up
> to the Octave plotting functions to generate the appropriate
> geometry.
> 
> I have made a prototype implementation of this idea using the Open
> Inventor format, the Open Inventor "ivview" application for
> rendering,
> and implemented a basic version of the "pdeplot" function in the PDE
> Toolbox package in Matlab. "pdeplot" takes as inputs the points,
> edges, and triangles of the triangulated domain as well as the nodal
> values. The original "pdeplot" has many more arguments, supporting
> many options, but this is the basic functionality.
> 
> Here are two screenshots:
> http://www.math.chalmers.se/~johanjan/octave/dolfin-top.png
> http://www.math.chalmers.se/~johanjan/octave/dolfin-shaded.png
> 
> Here is the function "pdeplot_inventor" together with the solution
> file output by the GPL DOLFIN PDE solver
> (http://www.phi.chalmers.se/dolfin/),
> "convdiff.m":
>
http://www.math.chalmers.se/~johanjan/octave/pdeplot_inventor-2003-12-04.tgz
> 
> The function opens a pipe to the rendering application "ivview" and
> constructs an Open Inventor file representing the solution, which it
> writes to the pipe.
> 
> To try it, unpack the files and type this (in Octave):
> 
> > convdiff
> > pdeplot_inventor(points, edges, cells, '', u{2});
> 
> I have tried it with Octave 2.1.50.
> 
> Phong shading can be turned on by commenting out the line:
> 
> fprintf(fd, '  model BASE_COLOR\n');
> 
> and uncommenting the line:
> 
> fprintf(fd, ' model PHONG\n');
> 
> Open Inventor has been released as LGPL by SGI and is maintained by
> SGI. It is very much a scene graph representation of OpenGL. The
> renderer exists in Debian in the package "inventor-clients". VRML 1.0
> is essentially identical to the Open Inventor data format. Coin is
> also a GPL/LGPL implementation of the Open Inventor specification.
> 
> I have seen a previous proposal, Oplot++, writing a graphics handler
> for Octave using the Open Inventor/Coin API. I have used a standard
> renderer application, but perhaps customizing a renderer would also
> be
> a good idea. It would be necessary if commands in Octave should be
> able to modify the state of the plot, which is the case in Matlab.
> 
> What do you think?
> 
>   Johan
>  

______________________________________________________
Få den nye Yahoo! Messenger på http://no.messenger.yahoo.com/
Nye ikoner og bakgrunner, webkamera med superkvalitet og dobbelt så morsom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]