octave-maintainers
[Top][All Lists]
Advanced

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

Re: Help with patch code in Matlab


From: Ben Abbott
Subject: Re: Help with patch code in Matlab
Date: Sun, 23 Mar 2014 20:30:19 -0400


On Mar 23, 2014, at 7:09 PM, Rik <address@hidden> wrote:

3/23/14

Could someone run the following code example under Matlab?

pts = [ 10.6946   -4.0000    3.0253;
       10.6946   -3.7071    3.0253;
       13.1352   -3.7071    2.9571;
       13.1352   -4.0000    2.5862 ];
facet = [ 1, 2, 3, 4 ];
p = patch ('Faces',facet, 'Vertices',pts);
saveas (gcf, 'patch_test.png')

Under Octave, OpenGL seems to be swallowing one of the vertices and it
creates a triangle instead of a quadrilateral patch.

--Rik

Rik,

I ran the version below.

figure (1)
clf ()
pts = [10.6946   -4.0000    3.0253;
       10.6946   -3.7071    3.0253;
       13.1352   -3.7071    2.9571;
       13.1352   -4.0000    2.5862 ];
facet = [ 1, 2, 3, 4 ];
p = patch ('Faces',facet, 'Vertices',pts);
saveas (gcf, 'patch_test.png')
set (p, 'facecolor', 0.8 * [1 1 1])
xlabel x
ylabel y
zlabel z
view (-15, 30)
saveas (gcf, 'patch_test2.png')

The pngs are attached.

For Octave+FLTk

Ben

reply via email to

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