[changeset] - bug and fix for surfnorm()

Ben Abbott bpabbott at mac.com
Sun Oct 19 10:53:24 CDT 2008


On Oct 19, 2008, at 11:09 AM, Daniel J Sebald wrote:

> Ben Abbott wrote:
>> On Oct 18, 2008, at 6:19 PM, Ben Abbott wrote:
>>> I noticed that the lines below produced multiple surfaces
>>>
>>>    surfnorm (peaks (10))
>>>    surf (peaks)
>>>
>>> The problem was with the "hold on" that was needed to add the  
>>> normal- vectors to the surface ... and no "hold off" followed.
>>>
>>> The attached changeset fixes that.
>>>
>>> Ben
>>>
>>> <changeset-surfnorm.patch>
>> Dan,
>> I've merged your changeset with mine.
>> There are three differences between yours and mine. First you did  
>> a  nicer job of using the handle properties. Second, your  
>> placement  before the surf() command is more proper (imo). Third, I  
>> tried to  preserve the hold state for "oldh" as well. The one  
>> instance I can  imagine where that matters is when h==oldh and an  
>> error is encountered  during the "unwind_protect".
>
> Thanks.  The combination of a "hold on/off" and related attribute in  
> each of the axes is confusing.  One seems a global property, the  
> other not.
>
> Dan

Do you imply that to avoid confusion

       hold on

should be replaced by

       set (h, "nextplot", "add")

If so, how about the attached?

Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-surfnorm.patch
Type: application/octet-stream
Size: 1594 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081019/f1367358/attachment.obj 
-------------- next part --------------







More information about the Bug-octave mailing list