Bug #1225

Weird behavior of bezier vectors

Added by Michael 28 days ago. Updated 8 days ago.

Status:ClosedStart date:2018-03-26
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:6.x-svn Platform:

Description

It is difficult to describe, better to show.
Code:

echo "173 53
179 51.5
194 54" >points

gmt psxy points -JQ180/57.5/15c -R160/195/50/65 -W0.1c,blue+s+ve0.4c -A -Bx10 -By5 -BswNE -P -K >vec.ps
gmt psxy points -JQ180/57.5/15c -R160/195/50/65 -W2p,black+s+ve0.4c -P -K -O >>vec.ps
gmt psxy points -JQ180/57.5/15c -R160/195/50/65 -W0.5p,red+ve0.4c -A> -P -K -O >>vec.ps
gmt psxy points -JQ180/57.5/15c -R160/195/50/65 -W0.5p,pink+s -P -K -O >>vec.ps
gmt psxy points -JQ180/57.5/15c -R160/195/50/65 -Sx0.5c -W1p,green -P -O >>vec.ps

The vector does not pass through the endpoint. The line passes, but does not smooth out.

r19979

vec.ps (53 KB) Michael, 2018-03-26 17:05

vec1 (1002 Bytes) Michael, 2018-03-26 20:00

vec1.ps (83.3 KB) Michael, 2018-03-26 20:00

Associated revisions

Revision 19980
Added by Paul 28 days ago

Fix issue #1225

History

#1 Updated by Paul 28 days ago

  • Status changed from New to Feedback

I suspect you need at least 4 points to make Bezier work. When I ran your points via sample1d -I100l -AR I got good results.

#2 Updated by Michael 28 days ago

I think something is wrong with the 180 meridian. I'm adding a new test script and its output.

#3 Updated by Paul 28 days ago

Wait, I agree and have fixed it (but running all 780 tests before updating).

#4 Updated by Paul 28 days ago

  • Status changed from Feedback to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Should be fixed in r19980. Jumping across dateline was not caught.

#5 Updated by Michael 28 days ago

It seems to work.

Please correct line 12 in bezvec.sh, I put the wrong redirect after -A.

P.S. As I understand it, there will be no smoothing on geographic maps without the option -A? This is understandable, but not reflected in the documentation.

#6 Updated by Paul 22 days ago

Sorry, fixed shortly thereafter. There is no smoothing with -A anywhere, neither in psxy or sample1d. There is resampling only, of various kinds. psxy -A simply connects the dots as they are, while the default is to add great circle segments between points.

#7 Updated by Paul 8 days ago

  • Status changed from Resolved to Closed

Closing this guy/

Also available in: Atom PDF