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

 
 

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

Submitted by:  Martin Helm <martinh>
Submitted on:  Sun 01 Aug 2010 11:41:19 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.3.51Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

I merged your two changesets and checked it in.

John W. Eaton <jwe>
Project 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 File(s):
   
   
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
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by martinh (Submitted the item)
  • -unavailable- added by martinh
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 01 Aug 2010 03:32:07 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 01 Aug 2010 01:56:41 PM UTCmartinhAttached File-=>Added changelog_isosurface.diff, #21122
    Sun 01 Aug 2010 11:41:19 AM UTCmartinhAttached File-=>Added isosurface.diff, #21119
      Carbon-Copy-=>Added martinh

    Back to the top


    Powered by Savane 3.1-cleanup1