octave-maintainers
[Top][All Lists]
Advanced

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

Re: Yet Another Plotting System for Octave: 0.3.0


From: Shai Ayal
Subject: Re: Yet Another Plotting System for Octave: 0.3.0
Date: Sat, 6 Oct 2007 21:37:25 +0200

On 10/6/07, Søren Hauberg <address@hidden> wrote:
> Shai Ayal skrev:
> > On 10/6/07, Søren Hauberg <address@hidden> wrote:
> >> Shai Ayal skrev:
> >>> This is basically what is used by all OpenGL systems -- octplot &
> >>> jhandles included. It is a highly non-trivial taks to "render" 3D
> >>> OpenGL in postscript, and gl2ps is the best tool to do it. All the
> >>> problems actually stem from OpenGL, not the conversion to ps. As I
> >>> noted elsewhere, using OpenGL & gl2ps will give OK results, but not
> >>> 100% professional -- e.g. lines will not always join nicely, and some
> >>> numerical glitches may be noticeable -- OpenGL uses no more than
> >>> floats to do all it's calculations. This is most noticeable in 2D
> >>> plots, less so in 3D plots.
> >>> However, all that being said, the ps results are quite nice, and are
> >>> truely resolution independant vector graphics.
> >> I'm curious: do you believe that gl2ps provides good enough output to be
> >> used as the only way to create postscript output in Octave in some
> >> distant future? Or can it only be a temporary solution for the GL based
> >> projects?
> >
> > I think the problem is OpenGL. It is not a high quality hardcopy
> > producing library -- it is a high speed screen 3D scene renderer. As
> > an example -- OpenGL has no concept of how to join lines -- take a
> > look at:
> > http://cairographics.org/samples/fill_and_stroke2/
> > In OpenGL, all the places where lines join at not 90 deg, it would
> > look bad (and probably even at places with 90 deg joins). A "real" 2D
> > hardcopy oriented library has facilities for this :
> > http://cairographics.org/samples/set_line_join/.
> > However as much as I like cairo (could you guess?) it has no support
> > whatsoever for 3D, and the people want 3D, and you must give the
> > people what they want ...
> >
> > I am far from a graphics expert, but I am not aware of any 3D library
> > which does this (actually they are all based on OpenGL)
>  From what I hear I've gotten the impression that people combine Cairo
> and OpenGL. That way, it should be possible to use Cairo for 2D and
> GL+gl2ps for 3D, without too much hassle. But I don't know any details :-(
>

>From what I understand, cairo can use OpenGL for rendering (i.e.
OpenGL is one of cairo's output formats along with ps, pdf, Xlib and
more). I'm not sure how to decide if a plot is 2D or 3D -- 2D plots in
matlab are just 3D plots drawn on the x-y axes and viewd from above.
This would also mean a lot of duplication -- e.g. all lines drawn on
the x-y plane will have to be drawn using cairo functions which will
be "translated" by cairo to OpenGL, but similar lines on the x-z plane
will have to be drawn using OpenGL functions. and they wouldn't look
the same in the end.
What I though of doing was to one day write a 2D only cairo backend --
I don't like 3D anyway ...

Shai



reply via email to

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