Tue 19 Apr 2016 01:58:42 PM UTC, comment #3:
After some debugging, I am under the impression that OpenGL does not support non-coplanar polygons at all.
For the missing vertex, patch_tesselator::combine is called and the point is collapsed onto [0 1 0].
From the OpenGL docs [1]:
GLU_TESS_COMBINE
The combine callback is called to create a new vertex when the tessellation detects an intersection or wishes to merge features.
If I understand correctly, this is something OpenGL does automatically.
The only thing that occurs to me that would enable non-coplanar polygons would be to divide the polygons into coplanar subsets and draw them seperately...
With the attaches patch that adds a bunch of debugging messages, I get the following:
(file #36963)
|
Fri 15 Apr 2016 07:23:06 AM UTC, comment #2:
Rik:
Please, find the resulting figure from the example in comment #0 in "non-plane_patch.pdf". To better visualize the "elbow" in the patch surface, "non-plane_patch+line.pdf" was saved after executing this additional line (from vertices(1,:) to vertices(3,:) ):
The triangle that is produced by Octave 4.0.1 with the same example from comment #0 is none of the two parts of that surface but lies on the "space diagonal" surface given by [1, 1, 0; 0, 0, 0; 0, 0, 1] ( = vertices(2:4,:) ), see "non-plane_patch_Octave.pdf" for Octave's result from a similar perspective.
I do not know where the thin, white, dashed and dotted lines come from in the latter pdf. I cannot see them in the original figure on the screen before and after saving to pdf. Maybe that is a different bug or they might even give a hint on what is going wrong...
(file #36932, file #36933, file #36934)
|
Tue 12 Apr 2016 01:14:40 PM UTC, original submission:
In Matlab, the following example gives a patch with a bent surface (similar to two triangles sharing one edge):
While the same code sample does not error for "fltk" or "qt" in Octave, the resulting patch is incorrect. The first edge (at [0, 1, 0]) seems to be ignored.
For "gnuplot", this error is thrown:
|