sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

Drawing Schlegel diagrams of 4-polytopes using tikz #34113

Open LaisRast opened 2 years ago

LaisRast commented 2 years ago

This ticket makes it possible to draw Schlegel diagrams for 4-polytopes. In particular, it implements the function _tikz_4d_schlegel of the class geometry.polyhedron.plot.Projection and makes it accessible for polytopes.

Example:

sage: C = polytopes.hypercube(4)
sage: Image = C.tikz([-0.0444,-0.6012,-0.7979], 173.25, 2, edge_color="blue", facet_color="black", vertex_color="green")

CC: @slel @jplab @kliem @seblabbe @videlec

Component: geometry

Keywords: tikz, polytope

Author: Laith Rastanawi

Branch/Commit: public/34113 @ bd57a87

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

LaisRast commented 2 years ago

Attachment: hypercube.png

LaisRast commented 2 years ago

New commits:

3333167implement _tikz_4d_schlegel
edf9449expose _tikz_4d_schlegel to Projection
bd57a87expose _tikz_4d_schlegel to Polyhedron
LaisRast commented 2 years ago

Branch: public/34113

LaisRast commented 2 years ago

Author: Laith Rastanawi

LaisRast commented 2 years ago

Description changed:

--- 
+++ 
@@ -7,3 +7,4 @@
 sage: C = polytopes.hypercube(4)
 sage: Image = C.tikz([-0.0444,-0.6012,-0.7979], 173.25, 2, edge_color="blue", facet_color="black", vertex_color="green")

+

LaisRast commented 2 years ago

Commit: bd57a87

fchapoton commented 2 years ago

Description changed:

seblabbe commented 2 years ago
comment:4

Great addition!

Last week, I worked on #33002. I think there will be a conflict between the two tickets. Which ticket should rebase on the other one? Does anybody of you want to review #33002?

LaisRast commented 2 years ago
comment:5

I think this ticket should be rebased on your ticket. Thus I will switch this ticket to needs_work.