[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch function with fltk in 3.1.52+
From: |
Kai Habel |
Subject: |
Re: patch function with fltk in 3.1.52+ |
Date: |
Mon, 02 Mar 2009 09:55:03 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
martin_helm schrieb:
>
> martin_helm wrote:
>
>> Hello,
>>
>> while trying the patch function (as a substitute for trisurf) with the
>> recent development sources and backend fltk, I noticed a problem with the
>> color settings, the following does what I expect
>>
>> octave:1> backend("fltk")
>> octave:2> T = [1 2 3];
>> octave:3> p = [0 0 0; 0 1 0; 1 1 1];
>> octave:4> patch ('Faces', T, 'Vertices', p, "r")
>>
>> I see a red triangle with black borders.
>> If I pass an rgb (e. g. [0.5 0.5 0.5] ) vector as the help patch suggests
>> the triangle does not change color (independent of the values).
>> Using
>>
>> shading flat
>>
>> to avoid the black borders it leads to a completely black triangle.
>> If I call then again
>>
>> patch ('Faces', T, 'Vertices', p, "r")
>>
>> the colors of border and area are reverted (that means a black triangle
>> with a red border instead of a red triangle with a black border as
>> before).
>>
>> Is there something which I missunderstand or is it simply something which
>> is not yet implemented?
>>
>> I am running linux 2.6.27.7-9-default 64 bit on AMD Athlon Dualcore 2 GHz.
>>
>> I checked the same with a 3.0.3 version and jhandles 0.3.4 where I can
>> assign different colors to the facets (on WinXP). but shading flat does
>> also not work ( here it throws an exception and does not affect the
>> graphics at all).
>>
>> - mh
>>
>>
>>
>>
>
> To answer a part of my own question:
>
> I found that
>
> patch('Faces',T,'Vertices',p,'FaceVertexCData', c, 'FaceColor','flat',
> 'EdgeColor', 'none')
>
> does exactly what I was looking for.
>
> One question remains, what is the intended behaviour if a shading command is
> invoked afterwards?
>
>
Hello Martin,
patches are not fully implemented for the fltk/OpenGL backend.
<http://dict.leo.org/ende?lp=ende&p=thMx3r&search=unfortunately>Unfortunately,
nobody is working on this currently, so any help is welcome. And yes ...
in the end it should be compatible as much as possible with matlab.
Kai
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: patch function with fltk in 3.1.52+,
Kai Habel <=