octave-maintainers
[Top][All Lists]
Advanced

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

Re: surfl implementation


From: Ben Abbott
Subject: Re: surfl implementation
Date: Wed, 05 Feb 2014 10:26:00 -0500

On Feb 4, 2014, at 10:59 PM, Rik <address@hidden> wrote:

2/4/14

I was looking at the surfl normalization and Octave is normalizing the
vertex normals with the plot box aspect ratio values.

--- Code ---
vn = get (htmp, "vertexnormals");
dar = get (hax, "plotboxaspectratio");
vn(:,:,1) *= dar(1);
vn(:,:,2) *= dar(2);
vn(:,:,3) *= dar(3);
--- End Code ---

Shouldn't this be the dataspectratio instead?

Also, shouldn't there be a listener on plotboxaspectratio and
dataaspectratio to update the lighting?

What does Matlab do with the following

--- Code ---
[X,Y,Z] = peaks ();
colormap (copper (64));
surfl (X,Y,Z);
shading interp;
title ('surfl() with defaults');
pause
daspect ([2 2 1])
--- End Code ---

Does it look like the coloring changes when the aspect ratio changes?

--Rik

Hi Rik,

Octave's early support of dataaspectratio and plotboxaspectratio was backwards.  I had cleaned up most cases a couple of years back but don't think I touched surfl, so you suggestion is possible.  Three plots are attached with different daspect and pbaspect ratios.  The coloring does not change.






reply via email to

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