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

extract _front_back_facets method out of _tikz_3d_in_3d polyhedron method #39597

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

seblabbe
Copy link
Contributor

@seblabbe seblabbe commented Feb 27, 2025

The code of the method _tikz_3d_in_3d is long. Also, the front and back facets it computes for the projection of a polyhedron is interesting by itself. Personally, I need this information in order to define a polyhedron exchange transformation out of the projection of a zonotope.

In this PR, we extract a _front_back_facets method out of the _tikz_3d_in_3d method in the class Projection of a polyhedron.

Meanwhile, we also improve the SageMath/Python code. For instance:

-        for index_facet in range(len(facets)):
-            A = facets[index_facet].vector()[1:]
+        for index_facet,f in enumerate(facet_ineqs):
+           A = f.A()

This was done during Sage Days 128 with Jean-Philippe Labbé.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

@seblabbe seblabbe added the sd128 tickets of Sage Days 128 Le Teich label Feb 27, 2025
@seblabbe seblabbe requested review from fchapoton and jplab February 27, 2025 09:34
Copy link

github-actions bot commented Feb 27, 2025

Documentation preview for this PR (built with commit 82f898b; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Removed empty line at the end of file
@fchapoton
Copy link
Contributor

autrement, c'est ok

@seblabbe
Copy link
Contributor Author

Thanks for the review. I made the changes.

Copy link
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, looks good, merci !

vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 1, 2025
…n_3d polyhedron method

    
The code of the method `_tikz_3d_in_3d` is long. Also, the front and
back facets it computes for the projection of a polyhedron is
interesting by itself. Personally, I need this information in order to
define a polyhedron exchange transformation out of the projection of a
zonotope.

In this PR, we extract a `_front_back_facets` method out of the
`_tikz_3d_in_3d` method in the class Projection of a polyhedron.

Meanwhile, we also improve the SageMath/Python code. For instance:

```diff
-        for index_facet in range(len(facets)):
-            A = facets[index_facet].vector()[1:]
+        for index_facet,f in enumerate(facet_ineqs):
+           A = f.A()
```

This was done during Sage Days 128 with Jean-Philippe Labbé.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39597
Reported by: Sébastien Labbé
Reviewer(s): Frédéric Chapoton, Sébastien Labbé
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 1, 2025
…n_3d polyhedron method

    
The code of the method `_tikz_3d_in_3d` is long. Also, the front and
back facets it computes for the projection of a polyhedron is
interesting by itself. Personally, I need this information in order to
define a polyhedron exchange transformation out of the projection of a
zonotope.

In this PR, we extract a `_front_back_facets` method out of the
`_tikz_3d_in_3d` method in the class Projection of a polyhedron.

Meanwhile, we also improve the SageMath/Python code. For instance:

```diff
-        for index_facet in range(len(facets)):
-            A = facets[index_facet].vector()[1:]
+        for index_facet,f in enumerate(facet_ineqs):
+           A = f.A()
```

This was done during Sage Days 128 with Jean-Philippe Labbé.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39597
Reported by: Sébastien Labbé
Reviewer(s): Frédéric Chapoton, Sébastien Labbé
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 2, 2025
…n_3d polyhedron method

    
The code of the method `_tikz_3d_in_3d` is long. Also, the front and
back facets it computes for the projection of a polyhedron is
interesting by itself. Personally, I need this information in order to
define a polyhedron exchange transformation out of the projection of a
zonotope.

In this PR, we extract a `_front_back_facets` method out of the
`_tikz_3d_in_3d` method in the class Projection of a polyhedron.

Meanwhile, we also improve the SageMath/Python code. For instance:

```diff
-        for index_facet in range(len(facets)):
-            A = facets[index_facet].vector()[1:]
+        for index_facet,f in enumerate(facet_ineqs):
+           A = f.A()
```

This was done during Sage Days 128 with Jean-Philippe Labbé.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39597
Reported by: Sébastien Labbé
Reviewer(s): Frédéric Chapoton, Sébastien Labbé
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 3, 2025
…n_3d polyhedron method

    
The code of the method `_tikz_3d_in_3d` is long. Also, the front and
back facets it computes for the projection of a polyhedron is
interesting by itself. Personally, I need this information in order to
define a polyhedron exchange transformation out of the projection of a
zonotope.

In this PR, we extract a `_front_back_facets` method out of the
`_tikz_3d_in_3d` method in the class Projection of a polyhedron.

Meanwhile, we also improve the SageMath/Python code. For instance:

```diff
-        for index_facet in range(len(facets)):
-            A = facets[index_facet].vector()[1:]
+        for index_facet,f in enumerate(facet_ineqs):
+           A = f.A()
```

This was done during Sage Days 128 with Jean-Philippe Labbé.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39597
Reported by: Sébastien Labbé
Reviewer(s): Frédéric Chapoton, Sébastien Labbé
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: geometry s: positive review sd128 tickets of Sage Days 128 Le Teich
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants