Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address an edge case in 3d plotting with Line object #130

Closed
williamstein opened this issue Sep 25, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@williamstein
Copy link
Contributor

commented Sep 25, 2015

See this public worksheet:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-09-25-083904-3dplotting-issue.sagews

The relevant code is:

from sage.plot.plot3d.shapes2 import Line
Line([(i*math.sin(i), i*math.cos(i), i/3) for i in range(30)], arrow_head=True)

Fixing this probably only really requires Python knowledge and editing sage_salvus.py or graphics.py

@williamstein

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2016

This works:

%python
from sage.plot.plot3d.shapes2 import Line
Line([(i*math.sin(i), i*math.cos(i), i/3) for i in range(30)], arrow_head=True)

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-09-23-134234-issue130.sagews

@williamstein

This comment has been minimized.

Copy link
Contributor Author

commented Oct 9, 2016

Note that my solution to #236 is actually wrong in that it just assumes the "line" has two points in it. To fix this issue, we'll have to slightly redo what I did with #236 better. That's fine.

screen shot 2016-10-08 at 9 58 11 pm

@williamstein

This comment has been minimized.

Copy link
Contributor Author

commented Oct 11, 2016

Fixed. However, note that result is ugly, since SMC is properly (I would say) not just interpolating a curve through the points, but drawing the line segments. That's consistent with the word "Line" and how 2d works.

screen shot 2016-10-11 at 2 01 52 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.