bugGNU Octave - Bugs: bug #30616, isosurface fails with 2 input...

 
 

bug #30616: isosurface fails with 2 input arguments (wrong meshgrid creation)

Submitter:  Martin Helm <martinh>
Submitted:  Sun 01 Aug 2010 11:41:19 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.3.51 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Aug 2010 03:32:07 PM UTC, comment #1: 

I merged your two changesets and checked it in.

John W. Eaton <jwe>
Group administrator
Sun 01 Aug 2010 11:41:19 AM UTC, original submission:  

Received the following description from Andrew Lund:

> Hi, I'm not entirely sure if this is a bug or not, but lines 133-134 in
> isosurface.m read:
>
>     [n1, n2, n3] = size (val);
>     [x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);
>
> when I think they should read:
>
>     [n1, n2, n3] = size (val);
>     [x, y, z] = meshgrid (1:n2, 1:n1, 1:n3);
>
> meshgrid considers x to be columns and y to be rows, opposite of what
>  matrix indices use. This came up because I tried to use FV =
>  isosurface(z,iso), and kept getting an error from marching cube
>  complaining xx, yy, zz and c are not equal sizes.
>
> I don't know if there is another place to submit bug reports, but I figured
> since you wrote it, you could figure it out.
>
> Please let me know if this is a bug or not,
>
> Andrew
>

I can confirm that this is really a bug and should be

    [n2, n1, n3] = size (val);
    [x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);

Can be reproduced by invoking

X = rand(10, 20, 30);
isosurface(X, 0.5);

Changeset attached.

Martin Helm <martinh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21122:  changelog_isosurface.diff added by martinh (662B - text/x-patch - added changelog entry)
file #21119:  isosurface.diff added by martinh (878B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by martinh (Submitted the item)
  • -email is unavailable- added by martinh
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-01 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2010-08-01 martinh Attached File- Added changelog_isosurface.diff, #21122
    2010-08-01 martinh Attached File- Added isosurface.diff, #21119
        Carbon-Copy- Added martinh

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code