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

Prevent or document automatic line3d smoothing #3861

Open
sagetrac-mclean mannequin opened this issue Aug 14, 2008 · 6 comments
Open

Prevent or document automatic line3d smoothing #3861

sagetrac-mclean mannequin opened this issue Aug 14, 2008 · 6 comments

Comments

@sagetrac-mclean
Copy link
Mannequin

sagetrac-mclean mannequin commented Aug 14, 2008

line3d for instance calls Line in src/sage/plot/plot3d/shapes2.py

Which automatically applies some smoothing using corner_cutoff, which is buggy and poorly documented as in #3859

(See above Ticket for an example of how this can be bad.)

It is important that I plot lines directly, and automatic smoothing should either not be automatic, or should be documented,
even for functions that do not reference the smoothing directly like in Line3d. Perhaps a 'smooth' keyword is more informative than the undocumented corner_cutoff.

The smoothing is done in the Line class object, and not in pmol, so it can (and should!) be selectively applied.

Fixing the referenced ticket is a workaround (set corner_cutoff = 1), but is very clunky, and currently does not even work.

CC: @kcrisman @slel

Component: graphics

Keywords: line3d, Line, smoothing, corner_cutoff

Issue created by migration from https://trac.sagemath.org/ticket/3861

@sagetrac-mclean sagetrac-mclean mannequin added this to the sage-5.11 milestone Aug 14, 2008
@robertwb
Copy link
Contributor

comment:1

I like the idea of a smoothnes parameter, 0=False meaning don't smooth at all, 1=True being some good default, and something higher (say 2) to forceable splite the whole thing.

I agree it could be better documented, but I think smoothing is very useful when you are trying to visualize curves. Of course, if you're plotting stock data then it is really bad.

@jasongrout
Copy link
Member

comment:2

I also agree with Robert. Notice also that:


sage: my_points=[[0,0,0],[1,0,0],[0,1,0]]
sage: my_points_tuples=map(tuple,my_points)
sage: sage.plot.plot3d.shapes2.Line(my_points,corner_cutoff=0)
Traceback (most recent call last):
...
TypeError: unhashable type: 'list'

sage.plot.plot3d.shapes2.Line(my_points_tuples,corner_cutoff=0) #works
sage: sage.plot.plot3d.shapes2.Line(my_points_tuples, corner_cutoff=1)
Traceback (most recent call last):
...
TypeError: 'NoneType' object is unsubscriptable
sage: sage.plot.plot3d.shapes2.Line(my_points_tuples, corner_cutoff=.999) # works

@jasongrout
Copy link
Member

comment:3

That last error is already #3859

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@fchapoton

This comment has been minimized.

@slel
Copy link
Member

slel commented Apr 27, 2021

comment:10

Related:

@slel

This comment has been minimized.

@slel slel changed the title automatic line smoothing shouldn't be automatic, or should at least be documented Prevent or document automatic line3d smoothing Apr 27, 2021
@slel slel removed this from the sage-6.4 milestone Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants