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

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

[Octave-bug-tracker] [bug #31305] slow contour plot


From: David Bateman
Subject: [Octave-bug-tracker] [bug #31305] slow contour plot
Date: Fri, 29 Oct 2010 18:05:58 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009091010 Iceweasel/3.0.14 (Debian-3.0.14-1)

Follow-up Comment #25, bug #31305 (project octave):

Can we keep this discussion on the bug-tracker. 

I see several factors contributing to this crash. If any one of them was
fixed we wouldn't have the crash.

1) In the get_color_data method if the facevertexdata is empty then we
shouldn't call convert_cdata. So something like 

octave_value
patch::properties::get_color_data (void) const
{
  octave_value fvc = get_facevertexcdata();
  if (fvc.isempty ())
    return Matrix ();
  else
    return convert_cdata (*this, fvc, cdatamapping_is ("scaled"), 2);
}

should be used

2) If facecolor or edgecolor is "none" in gl-render.cc(void
opengl_renderer::draw_patch (const patch::properties &props)) and the
equivalent function for surfaces, then the fc_mode and ec_mode values should
be "0" as these colors shouldn't play a part in the color calculation.

3) In __patch__(setvertexdata) It's not clear to me now whether the value of
facevertexdata should be derived from cdata, edgecolor or facecolor and what
are the rules to calculate this derived value. If you can run

h = patch([0, 1, 1], [0, 0, 1], 'edgecolor', 'none', 'cdata', [1,0,0],
'facecolor',[0,1,0])
get(h,'facevertexcdata')

h = patch([0, 0, 1], [0, 1, 1], 'edgecolor', [0,0,1], 'cdata', [1,0,0],
'facecolor','none')
get(h,'facevertexcdata')

h = patch([0, 0.5, 1], [0, 1, 0], 'edgecolor', [0,0,1], 'cdata', [1,0,0],
'facecolor',[0,1,0])
get(h,'facevertexcdata')

in matlab and see what it gives (including the face and edge colors used),
I'll fix these three issues and I'm certain this bug will go away.

D.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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