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

Bounding box bug in Polyhedron plots #23555

Closed
jplab opened this issue Jul 31, 2017 · 20 comments
Closed

Bounding box bug in Polyhedron plots #23555

jplab opened this issue Jul 31, 2017 · 20 comments

Comments

@jplab
Copy link

jplab commented Jul 31, 2017

As reported on sage-devel here [#point1 (1)] and there [#point2 (2)], when creating a polyhedron far from the origin, the bounding box for the plot of the polyhedron includes the origin by default and it makes the polyhedron appear small. This appears to be a bug in the polyhedron.plot currently at line 1248 when an empty Graphics3d object is created.

[=#point1 (1)] https://groups.google.com/forum/#!topic/sage-devel/6v-d6PM29YM

[=#point2 (2)] https://groups.google.com/forum/#!msg/cocalc/YQQHboBCwPw/d8-NlOS8BwAJ

CC: @mo271

Component: geometry

Keywords: polyhedron, days88

Author: Moritz Firsching

Branch/Commit: 3f02385

Reviewer: Jean-Philippe Labbé, Frédéric Chapoton

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

@jplab jplab added this to the sage-8.1 milestone Jul 31, 2017
@mforets
Copy link
Mannequin

mforets mannequin commented Jul 31, 2017

comment:1

(for reference) difference between 2d and 3d plots:

sage: import itertools
sage: Polyhedron(vertices=itertools.product([100, 101], repeat=2)).plot() # OK, centered around the polyhedron
sage: Polyhedron(vertices=itertools.product([100, 101], repeat=3)).plot() # not centered, displays origin

@mo271
Copy link
Contributor

mo271 commented Aug 22, 2017

Branch: u/moritz/23555

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2017

Commit: 6fc28c0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

6fc28c0added doctest

@mo271
Copy link
Contributor

mo271 commented Aug 22, 2017

Author: Moritz Firsching

@mo271
Copy link
Contributor

mo271 commented Aug 22, 2017

comment:4

This fixes it, I guess.
Check out the doctest. If unpatched, the output should be

((0.0, 0.0, 0.0), (101.0, 101.0, 101.0))

@mo271
Copy link
Contributor

mo271 commented Aug 22, 2017

Changed keywords from none to polyhedron

@jplab
Copy link
Author

jplab commented Aug 22, 2017

Reviewer: Jean-Philippe Labbé

@jplab
Copy link
Author

jplab commented Aug 22, 2017

Changed keywords from polyhedron to polyhedron, days88

@jplab
Copy link
Author

jplab commented Aug 22, 2017

comment:5

Looks good to me.

@vbraun
Copy link
Member

vbraun commented Aug 31, 2017

comment:6

Documentation doesn't build

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d9ba49cdon't invoke Graphics3d() for empty plot
a24a06eadded doctest
17ad101prevent adding of 'None'

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

Changed commit from 6fc28c0 to 17ad101

@mo271
Copy link
Contributor

mo271 commented Sep 11, 2017

comment:8

I hope that fixes the issue..

@fchapoton
Copy link
Contributor

comment:9

typo: "The origin is no included" >>> "The origin is not included"

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 14, 2017

Changed commit from 17ad101 to 3f02385

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 14, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

5856470don't invoke Graphics3d() for empty plot
244aff0added doctest
856df77prevent adding of 'None'
3f02385typo

@fchapoton
Copy link
Contributor

Changed reviewer from Jean-Philippe Labbé to Jean-Philippe Labbé, Frédéric Chapoton

@fchapoton
Copy link
Contributor

comment:11

ok

@vbraun
Copy link
Member

vbraun commented Jan 18, 2018

Changed branch from u/moritz/23555 to 3f02385

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

4 participants