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: Ted Rippert
Subject: [Octave-bug-tracker] [bug #37933] quiver3 arrow heads disappear as dx and dy go to zero
Date: Sun, 16 Dec 2012 22:06:10 +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

Follow-up Comment #1, bug #37933 (project octave):

My original submission doesn't seem to show up properly on this page, but the
email looked OK, so I'll try to put it in here. I can't seem to find a way to
preview the formatted output prior to submission.
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]