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

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

[Octave-bug-tracker] [bug #46538] FaceAlpha in patch is not working


From: anonymous
Subject: [Octave-bug-tracker] [bug #46538] FaceAlpha in patch is not working
Date: Thu, 26 Nov 2015 09:13:26 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0

URL:
  <http://savannah.gnu.org/bugs/?46538>

                 Summary: FaceAlpha in patch is not working 
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Do 26 Nov 2015 09:13:25 UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hi,
the attribute FaceAlpha is not working correctly. 
Any other value than 1 leads to no color at all.

Here is a small example:

T =[
   1   2   4
   2   3   5
   4   5   7
   5   6   8
   5   4   2
   6   5   3
   8   7   5
   9   8   6];

P = [
   0.00000   0.00000   0.00000   0.50000   0.50000   0.50000   1.00000  
1.00000   1.00000
   0.00000   0.50000   1.00000   0.00000   0.50000   1.00000   0.00000  
0.50000   1.00000];
   
x = P(1,:); y = P(2,:);
z = 1 - (x-0.5).^2 - (y-0.5).^2;
i=1:length(T);

a1 = [  x(T(i,1)) ; y(T(i,1)) ; z(T(i,1)) ];
a2 = [  x(T(i,2)) ; y(T(i,2)) ; z(T(i,2)) ];
a3 = [  x(T(i,3)) ; y(T(i,3)) ; z(T(i,3)) ];

s  = ( a1(1:2,i) + a2(1:2,i) + a3(1:2,i) )./3;

r1 = a3(:,i) - a1(:,i);
r2 = a2(:,i) - a1(:,i);
n = cross(r1,r2);

dx = n(1,:)./n(3,:);
%dy = n(2,:)./n(3,:);

patch('Faces',T,'Vertices',P','FaceVertexCData',dx','FaceColor','flat','FaceAlpha',1);

Kind regards




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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