octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #37933] quiver3 arrow heads disappear as dx an


From: anonymous
Subject: [Octave-bug-tracker] [bug #37933] quiver3 arrow heads disappear as dx and dy go to zero
Date: Sun, 16 Dec 2012 02:54:11 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2

URL:
  <http://savannah.gnu.org/bugs/?37933>

                 Summary: quiver3 arrow heads disappear as dx and dy go to
zero
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 16 Dec 2012 02:54:09 AM UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Ted Rippert
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.3
        Operating System: Mac OS

    _______________________________________________________

Details:

To see the issue, use this command:


octave:42> quiver3(0,0,0,0,0,1)
octave:43> hold on
octave:44> quiver3(0,0,0,0,1,0)
octave:45> quiver3(0,0,0,1,0,0)


The horizontal arrows have arrow heads, but not the vertical arrow. Actually
the head is there, but the two lines that make it up are parallel to the body
line. It turns out that the angle between the arrow head lines is proportional
to the length of the arrow in the x-y plane, so an arrow with length only
along the z-axis appears to have no head.

I have a fix. Replace line 219 in __quiver__.m:

      zarrw1 = zarrw2 = zend - ww(:) * arrowsize;

with

      xarrw1 = xtmp + sqrt((y - yend).^2 + (z - zend).^2) * arrowsize / 3;
      xarrw2 = xtmp - sqrt((y - yend).^2 + (z - zend).^2) * arrowsize / 3;
      yarrw1 = ytmp - sqrt((x - xend).^2 + (z - zend).^2) * arrowsize / 3;
      yarrw2 = ytmp + sqrt((x - xend).^2 + (z - zend).^2) * arrowsize / 3;
      zarrw1 = zarrw2 = zend - ww(:) * arrowsize;






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37933>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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