Opened 12 years ago
Closed 12 years ago
#1850 closed defect (fixed)
[with patch; positive review] graphics -- serious bug in parametric plotting of curves.
Reported by: | was | Owned by: | robertwb |
---|---|---|---|
Priority: | major | Milestone: | sage-2.10.1 |
Component: | graphics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This works fine
sage: parametric_plot3d((sin(x), cos(x), x), (x,0,10*pi))
This is missing half of the parametric plot!!
sage: parametric_plot3d((sin(x), cos(x), x), (x,0,10*pi), plot_points=500)
I suspect this may be a bug introduced by me or Bobby M. in refactoring some plotting code.
Attachments (1)
Change History (7)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
This seems to hit a hard-coded point limit of 256 in jmol's org/jmol/shapespecial/Draw.java
, line 69.
I guess we could either change jmol to support arbitrary numbers of points, or split up curves in 'subcurves' of at most 256 points each.
comment:3 Changed 12 years ago by
- Owner changed from was to robertwb
- Status changed from new to assigned
Chopping it up seems like the simplest choice, preferably at a point of maximum curvature. Setting MAX_POINTS arbitrarily high would increase the memory footprint of every line, and re-writing it to not be so would probably be a significant amount of work (though I can't figure out why it is so in the first place).
Changed 12 years ago by
comment:4 Changed 12 years ago by
- Summary changed from graphics -- serious bug in parametric plotting of curves. to [with patch] graphics -- serious bug in parametric plotting of curves.
comment:5 Changed 12 years ago by
- Summary changed from [with patch] graphics -- serious bug in parametric plotting of curves. to [with patch; positive review] graphics -- serious bug in parametric plotting of curves.
It works well for me. Thanks Robert!
comment:6 Changed 12 years ago by
- Resolution set to fixed
- Status changed from assigned to closed
Merged in Sage 2.10.1.alpha0
Very disturbingly, if you render using tachyon you don't see the problem:
Also, rendering some more complicated things makes it so the problem vanishes.
So this is probably a pretty tricky bug to fix, possibly a bug in jmol.