octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44736] OpenGL / gl2ps printing alters or drop


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44736] OpenGL / gl2ps printing alters or drops axis outline
Date: Mon, 06 Apr 2015 18:46:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #9, bug #44736 (project octave):

Oh, OK.  I didn't know there was an extension to OpenGL.

Well, yes the tessellation version of the polygon routine is for concave (and
convex) fills, as the documentation says:

https://www.opengl.org/sdk/docs/man2/xhtml/gluTessBeginPolygon.xml

Octave can avoid using this tessellation and instead use the convex fill in
the case that the patch is convex--especially simple in the case of known
convex shapes such as the background rectangle of the plot.  (glRect would
work for that as well.)

For 2D polygons it isn't difficult determining convexity.  Start with one
vertex and group three at a time working around the polygon.  Compute the
angle between the two lines assuming the center vertex is the intersection
point.  It's probably some simple 2x2 matrix inversion formula (hyperplanes or
something like that).  If all the angle signs are positive or zero, or all
negative or zero, then the polygon is convex and Octave can fall back on the
convex polynomial draw/fill of the base OpenGL library:

https://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml 



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44736>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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