|
From: Stanislav M. <sta...@gm...> - 2010-12-07 12:09:49
|
Hello, Can anyone advise me on how can I workaround the problem with 3D rendering in the plot [1]? The problem is that the surfaces that must be hidden are seen in this plot (to clearly see them, load "maxout.gnuplot" and try rotating the plot). The plot was generated in maxima, using the draw3d command. Any help will be very much appreciated! [1] http://zalil.ru/30094104 (wait 10 secs, and download will start) -- Stanislav |
|
From: Stanislav M. <sta...@gm...> - 2010-12-07 15:42:58
|
On Tue, 2010-12-07 at 11:51 +0000, Stanislav Maslovski wrote: > Hello, > > Can anyone advise me on how can I workaround the problem with 3D > rendering in the plot [1]? The problem is that the surfaces that must be > hidden are seen in this plot (to clearly see them, > load "maxout.gnuplot" and try rotating the plot). > > The plot was generated in maxima, using the draw3d command. Any help > will be very much appreciated! > > [1] http://zalil.ru/30094104 (wait 10 secs, and download will start) Replying to myself: actually, after reading some docs (and the code) I realized that it was a limitation of the rendering algorithm used by the gnuplot (a variant of painter's algorithm). So, I solved this issue by patching pm3d.c:pm3d_depth_queue_flush() so that sorting of quadrangles was done based on the average depth of 4 corners. It would be nice if this could be made configurable. I will probably come out with a patch in the next couple of days to enable this feature. -- Stanislav |
|
From: Stanislav M. <sta...@gm...> - 2010-12-09 15:53:47
|
Hello, On Tue, 2010-12-07 at 15:42 +0000, Stanislav Maslovski wrote: > On Tue, 2010-12-07 at 11:51 +0000, Stanislav Maslovski wrote: > > Hello, > > > > Can anyone advise me on how can I workaround the problem with 3D > > rendering in the plot [1]? The problem is that the surfaces that must be > > hidden are seen in this plot (to clearly see them, > > load "maxout.gnuplot" and try rotating the plot). > > > > The plot was generated in maxima, using the draw3d command. Any help > > will be very much appreciated! > > > > [1] http://zalil.ru/30094104 (wait 10 secs, and download will start) > > Replying to myself: actually, after reading some docs (and the code) I > realized that it was a limitation of the rendering algorithm used by the > gnuplot (a variant of painter's algorithm). So, I solved this issue by > patching pm3d.c:pm3d_depth_queue_flush() so that sorting of quadrangles > was done based on the average depth of 4 corners. > > It would be nice if this could be made configurable. I will probably > come out with a patch in the next couple of days to enable this feature. Just in case: the patch with an example is available from here http://sourceforge.net/tracker/?func=detail&aid=3132649&group_id=2055&atid=302055 Cheers, -- Stanislav |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-12-07 20:39:15
|
On 07.12.2010 16:42, Stanislav Maslovski wrote: > So, I solved this issue by patching pm3d.c:pm3d_depth_queue_flush() > so that sorting of quadrangles was done based on the average depth of > 4 corners. Unfortunately that's not really a solution. There is no particular reason to prefer one sorting criterion over the other. Painter's algorithm is plain and simply wrong --- no matter which property you sort by. If it appears to work sometimes that's by happenstance, not by design. |
|
From: Stanislav M. <sta...@gm...> - 2010-12-08 11:41:32
|
On Tue, Dec 07, 2010 at 09:39:05PM +0100, Hans-Bernhard Bröker wrote: > On 07.12.2010 16:42, Stanislav Maslovski wrote: > > >So, I solved this issue by patching pm3d.c:pm3d_depth_queue_flush() > >so that sorting of quadrangles was done based on the average depth of > >4 corners. > > Unfortunately that's not really a solution. There is no particular > reason to prefer one sorting criterion over the other. Painter's > algorithm is plain and simply wrong --- no matter which property you > sort by. If it appears to work sometimes that's by happenstance, not > by design. Yes, I agree completely. "Solved" above meant that it helped me to produce a reasonable result in a reasonable time, and nothing more. >From what I have read from the docs it seems that the developers are against of impelementing a better algorithm (I noticed a statement like gnuplot is not a virtual reality software therefore...). If that is the current position, then I think it would be reasonable at least to make the depth sorting algorith configurable, do not you think so? -- Stanislav |