bugGNU Octave - Bugs: bug #50370, geometry package: drawPolygon -...

 
 

bug #50370: geometry package: drawPolygon - added info on input fromat to help text

Submitted by:  Nicholas Jankowski <nrjank>
Submitted on:  Tue 21 Feb 2017 04:01:33 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Nick Jankowski Open/Closed:  Closed
Release:  4.2.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 21 Feb 2017 08:53:51 PM UTC, comment #4: 

I applied the patch. Thanks.

@devs: please close this bug

Juan Pablo Carbajal <juanpi>
Project Member
Tue 21 Feb 2017 08:48:59 PM UTC, comment #3: 

ok,
in dev version of geometry I get

> drawPolygon([-1 0 1],[-2 2 -2]);
error: Should specify a N-by-2 array
error: called from
    drawPolygon at line 110 column 7

This is consistent with the definition of polygons2d

I will check to integrate the improved docstring

Juan Pablo Carbajal <juanpi>
Project Member
Tue 21 Feb 2017 08:21:48 PM UTC, comment #2: 

This sounds like a bug. drawPolygon (x,y) should do the same regardless of inputs being row or columns. Nevertheless Matgeom's polygons are defined as N-by-dim arrays.

I will probably leave the Matgeom ids, for the moment. I am trying to stop diverging from upstream.

Thanks, I will apply changes asap

Juan Pablo Carbajal <juanpi>
Project Member
Tue 21 Feb 2017 04:07:07 PM UTC, comment #1: 

cset added

(file #39805)

Nicholas Jankowski <nrjank>
Tue 21 Feb 2017 04:01:33 PM UTC, original submission:  

confusion came up on the help list about proper input format for drawPolygon. After poking around a bit myself I took the liberty of expanding the help a bit. Will attach the changeset after generating a bug number.

A few notes: the (PX, PY) format only works for column vector inputs, and produces unexpected results for row vectors (no error or warning).  Is this as it should be? help text I added specifies they should be column vectors to match this behavior.

Eg.,

figure(1);
drawPolygon([-1 0 1],[-2 2 -2]);

figure(2);
drawPolygon([-1 0 1]',[-2 2 -2]');

produce very different inputs. Former produces [1 -2; 2 2; 3 -2], latter produces [-1 -2; 0 2; -2 1] as expected.

Also, there are a few places where warning and error messages still say Matgeom.  should that now say geometry?

Nicholas Jankowski <nrjank>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39805:  drawpolygon_doc.diff added by nrjank (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)
  • -email is unavailable- added by nrjank (package maintainer)
  •  

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-21 philipnienhuis StatusNone => Fixed
        Open/ClosedOpen => Closed
    2017-02-21 nrjank Attached File- => Added drawpolygon_doc.diff, #39805
    2017-02-21 nrjank Carbon-Copy- => Added ajuanpi@gmail.com

    Back to the top


    Powered by Savane 3.5