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

Bug in plotting 3d polyhedron with rays, add option polygon='rainbow' #31802

Closed
yuan-zhou opened this issue May 9, 2021 · 31 comments
Closed

Comments

@yuan-zhou
Copy link

Visually, there is no different between the two plots:

p = Polyhedron(rays=[(0, 0, 1)],lines=[(1, 0, 0), (0, 1, 0)])
p.plot()
q = Polyhedron(lines=[(1, 0, 0), (0, 1, 0)])
q.plot()

The bug seems to be caused by sage.geometry.polyhedron.Projection._init_solid_3d, which discards the rays. There might also be a bug in sage.geometry.polyhedron.Projection._init_lines_arrows, but I'm not sure how to plot the arrows in this example.

CC: @mkoeppe @fchapoton @dcoudert @slel @jplab

Component: geometry

Author: Yuan Zhou

Branch/Commit: fbd18ca

Reviewer: Matthias Koeppe

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

@yuan-zhou yuan-zhou added this to the sage-9.4 milestone May 9, 2021
@yuan-zhou
Copy link
Author

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

Commit: 331c351

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

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

331c351Plot 3d polytope with rainbow colors

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

Changed commit from 331c351 to 1909108

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

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

1909108revise Projection._init_lines_arrows, take care of rays/lines that are not on a facet, small edits to plotting arguments and docstrings

@yuan-zhou
Copy link
Author

Author: Yuan Zhou

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

Changed commit from 1909108 to bf0b645

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

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

bf0b645fix bug on the number of polygons

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

Changed commit from bf0b645 to d27c745

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2021

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

d27c745improve implementation for Polyhedron 3d plot argument polygon=rainbow

@kliem
Copy link
Contributor

kliem commented May 12, 2021

comment:10

@mkoeppe, @yuan-zhou: Can you please add you polyhedral tickets to https://trac.sagemath.org/wiki/SagePolyhedralGeometry.

That makes it easier to see what is going on and we also use this for the release notes.

@mkoeppe
Copy link
Member

mkoeppe commented Jul 19, 2021

comment:11

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Dec 18, 2021

comment:12

Stalled in needs_review or needs_info; likely won't make it into Sage 9.5.

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@fchapoton
Copy link
Contributor

comment:13

red branch => needs_work

@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2022

@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2022

comment:15

Rebased on current beta


New commits:

82b4464Plot 3d polytope with rainbow colors
583f546revise Projection._init_lines_arrows, take care of rays/lines that are not on a facet, small edits to plotting arguments and docstrings
0840246fix bug on the number of polygons
aa1f49aimprove implementation for Polyhedron 3d plot argument polygon=rainbow
445448fsrc/sage/geometry/polyhedron/plot.py: Fix import, syntax warning on 'is with literal'

@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2022

Changed commit from d27c745 to 445448f

@mkoeppe mkoeppe changed the title Bug in plotting 3d polyhedron with rays Bug in plotting 3d polyhedron with rays, add option polygon='rainbow' Apr 2, 2022
@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2022

comment:17

The new rainbow option should be documented.

The changes to point_opts, line_opts need to be motivated

@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2022

Reviewer: Matthias Koeppe

@yuan-zhou
Copy link
Author

@yuan-zhou
Copy link
Author

New commits:

ec96adfadd examples and explanations on rainbow option, point_opts, line_opts

@yuan-zhou
Copy link
Author

Changed commit from 445448f to ec96adf

@mkoeppe
Copy link
Member

mkoeppe commented Apr 4, 2022

comment:21

patchbot indicates doctest failure

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2022

Changed commit from ec96adf to 6ab5646

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2022

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

6ab5646decorate rainbow color 3d plot doctest with # optional - sage.plot

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 5, 2022

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

fe86804fix typo in doctest for plot3d polyhedron

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 5, 2022

Changed commit from 6ab5646 to fe86804

@mkoeppe
Copy link
Member

mkoeppe commented Apr 5, 2022

@mkoeppe
Copy link
Member

mkoeppe commented Apr 5, 2022

comment:26

This seems to work well.


New commits:

fbd18casrc/sage/geometry/polyhedron/base6.py: Small docstring edits

@mkoeppe
Copy link
Member

mkoeppe commented Apr 5, 2022

Changed commit from fe86804 to fbd18ca

@vbraun
Copy link
Member

vbraun commented Apr 10, 2022

Changed branch from u/mkoeppe/bug_in_plotting_3d_polyhedron_with_rays to fbd18ca

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

5 participants