Ticket #4256 (closed enhancement: fixed)

Opened 1 month ago

Last modified 4 weeks ago

[with patch, positive review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars

Reported by: mhampton Assigned to: mhampton
Priority: minor Milestone: sage-3.2
Component: geometry Keywords: polytopes, geometry
Cc: anakha

Description

This patch adds Schlegel diagrams for 4d polytopes (via the render_wireframe function), as well as built-in definitions of the 24-cell and 600-cell.

Attachments

trac_4256_v1.patch (6.9 kB) - added by mhampton on 10/09/2008 11:50:05 AM.
apply versus 3.1.2; conflicts with #4164 patches
trac_4256_v2.patch (23.4 kB) - added by mhampton on 10/15/2008 04:02:12 PM.
Apply to a vanilla 3.1.2 or 3.1.3; supercedes previous patch
trac_4256_v3.patch (33.4 kB) - added by mhampton on 10/21/2008 02:47:03 PM.
improved and re-based against 3.1.4
trac_4256_v4.patch (39.6 kB) - added by mhampton on 10/23/2008 09:03:49 PM.
supercedes previous patches, addresses review
4256_v5.patch (39.8 kB) - added by mhampton on 10/24/2008 12:06:21 PM.
supercedes previous patches, addresses final review (optional tests)

Change History

10/09/2008 11:50:05 AM changed by mhampton

  • attachment trac_4256_v1.patch added.

apply versus 3.1.2; conflicts with #4164 patches

10/15/2008 04:02:12 PM changed by mhampton

  • attachment trac_4256_v2.patch added.

Apply to a vanilla 3.1.2 or 3.1.3; supercedes previous patch

10/15/2008 04:04:59 PM changed by mhampton

This adds several enhancements such as Schegel diagrams, scalar dilation of polytopes, translation by a vector, built-in regular polytopes such as the 24-cell and cross-polytopes, and generation of polar duals. To make it easier to review this patch includes changes from #4164, so you just need one patch.

10/21/2008 02:47:03 PM changed by mhampton

  • attachment trac_4256_v3.patch added.

improved and re-based against 3.1.4

10/21/2008 02:50:10 PM changed by mhampton

  • summary changed from [with patch, needs review] polyhedral improvements: Schlegel diagrams, standard 4d polytopes to [with patch, needs review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars.

The trac_4256_v3.patch also incorporates the changes in #4164. Polyhedra can now be multiplied, scaled, translated, and the polar (dual) constructed. Several standard polytope families have been added.

10/22/2008 07:02:42 PM changed by anakha

  • summary changed from [with patch, needs review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars to [with patch, needs work] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars.

The ambient_dim function overwrites the content self._dim thus making dim() return a wrong answer:

sage: p = Polyhedron(vertices = [[0,0,1]])
sage: p.dim()
0
sage: p.ambiant_dim()
3
sage: p.dim()
3

In the vertex_adjacency_matrix() docstring, maybe you should use 'binary' rather than '0/1'

In render_solid(), since you now have ambient_dim(), why not use it? It could replace the ugly test I put there.

Also for the 'special' polyhedron creation methods, it could be good to reuse the approach taken for graphs, where you have the Graph class and an instance of a special class called graphs where you have building methods for most interesting types of graphs.

The first item is a must-fix, the other three would be nice, but are not stricly essential.

10/23/2008 09:03:49 PM changed by mhampton

  • attachment trac_4256_v4.patch added.

supercedes previous patches, addresses review

10/23/2008 09:05:35 PM changed by mhampton

  • cc set to anakha.
  • summary changed from [with patch, needs work] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars to [with patch, needs review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars.

10/24/2008 09:56:57 AM changed by anakha

  • summary changed from [with patch, needs review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars to [with patch, positive review pending changes] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars.

The only thing left to do is to mark the lrs_volume() tests as optional. I forgot that in my initial review.

Anyway, apart from that, positive review

10/24/2008 12:06:21 PM changed by mhampton

  • attachment 4256_v5.patch added.

supercedes previous patches, addresses final review (optional tests)

10/24/2008 12:07:35 PM changed by mhampton

  • summary changed from [with patch, positive review pending changes] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars to [with patch, positive review] polyhedral improvements: Schlegel diagrams, standard polytopes, multiplication, polars.

OK, I made the lrs_volume tests optional. Thanks very much for reviewing this.

10/25/2008 06:35:14 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.

Merged 4256_v5.patch in Sage 3.2.alpha1