Opened 8 years ago
Last modified 22 months ago
#11564 new enhancement
Implement polyhedron unfolding (i.e net)
Reported by: | QuantumKing | Owned by: | mhampton |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | geometry | Keywords: | unfolding, net |
Cc: | moritz | Merged in: | |
Authors: | QuantumKing | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
An unfolding or a net of a polyhedron is an arrangement of edge-joined polygons in the plane which can be folded (along edges) to become the faces of the polyhedron. There is no overlap between the polygons.
I've attached code which does this. It will attempt to unfold without overlap a 3D polyhedron defined by the class <class 'sage.geometry.polyhedra.Polyhedron'>.
Eric
Attachments (2)
Change History (13)
Changed 8 years ago by
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
It would be great also to handle higher dimensions, i.e. unfolding a 4-d polytope into 3-d...
comment:3 Changed 8 years ago by
How does the code look? Any ideas to make it better would be appreciated
comment:4 Changed 8 years ago by
Sorry, I am traveling right now and its hard to find time for Sage development. I do have some comments though.
Not all the functions in your patch have documentation/doctests. These are mandatory for every function, so they need to be added.
I think it will make sense to merge our efforts. I haven't completely fixed up my student's effort but I am attaching the current state so you can take a look at what we did. There are different strengths and weaknesses in our efforts. Ours can handle tougher problems, but we don't have a function to check for overlaps.
If you haven't looked at the master's thesis of Schlickenrieder (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.28.2631&rep=rep1&type=pdf) I highly recommend it. It was based on his work that my student choose to implement the steepest-edge algorithm.
A good test problem is what Schlickenrieder calls "turtles", for example:
tpoints = [[i,j,i^2+j^2] for i in srange(-5,6,1) for j in srange(-5,6,1)] tp = Polyhedron(vertices=tpoints)
comment:5 Changed 7 years ago by
What's the status on this thing? I think it would be nice to have in sage...
comment:6 Changed 7 years ago by
My status is that I am too busy with other duties to finish this off, although I would really like to.
The code in my "trac_11564_preliminary_effort.patch" patch is from a student project. It works, but it could really use some refactoring.
Its possible I would find time to put more effort into this over my winter vacation, but don't count on it. Otherwise, if no one else works on it I would hope to tackle it in the spring or summer.
As I mentioned before, your code mainly needed full documentation (doctests). While it would be nice if it could handle some tough cases, for this kind of functionality something is better than nothing so feel free to finish your version up and I should be able to find time to review it.
comment:7 Changed 6 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:8 Changed 5 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:9 Changed 5 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:10 Changed 5 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:11 Changed 22 months ago by
- Cc moritz added
Funny timing, I was about to create a ticket with solution for this same issue. It was the outcome of an undergraduate research project. I will try to review your solution, maybe it is possible to merge the two approaches.