#4164: [with patch, needs work] Make triangulated_facial_incidences() work in 
all
cases (and decomment render_solid())
----------------------+-----------------------------------------------------
 Reporter:  anakha    |        Owner:  anakha    
     Type:  defect    |       Status:  assigned  
 Priority:  major     |    Milestone:  sage-3.1.3
Component:  graphics  |   Resolution:            
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by anakha):

 Replying to [comment:4 mhampton]:
 > First of all let me say thanks for working on this.  There are some
 problems with these patches though:
 >
 > 1) They don't pass doctesting on my machine.  This is because of some
 output order differences.  Did you test the final combination of all three
 patches?  Otherwise it might be architecture-specific but looking at your
 code that seems unlikely.

 I think I should never post patches past midnight, because this is when I
 always forget something like this.

 > 2) In higher dimensions, "triangulation" usually means a decomposition
 into simplices - so in four dimensions the elements of a triangulation of
 a face should be tetrahedra.  It occurs to me that it would perhaps be
 best to write a function in the Polyhedra class that triangulates (in this
 sense) the polyhedra itself, and then for
 .triangulated_facial_incideneces() call this function on the polyhedrons
 generated by each face.

 I can't think right now of an algorithm that will triangulate according to
 your description in an arbitrary dimension.  I will think about it for a
 while though.

 > 3) Things seem to break for bigger examples.  For instance, an
 octohedron:
 > {{{
 > sage: p_oct = Polyhedron(vertices =
 [[0,1],[0,2],[1,0],[2,0],[3,1],[3,2],[1,3],[2,3]])
 > sage: p_oct.triangulated_facial_incidences()
 >
 > [[0, [3, 4, 3]],
 >  [1, [2, 3, 2]],
 >  [2, [0, 2, 0]],
 >  [3, [0, 1, 0]],
 >  [4, [1, 6, 1]],
 >  [5, [6, 7, 6]],
 >  [6, [5, 7, 5]],
 >  [7, [4, 5, 4]]]
 > }}}
 >
 > Notice that the triangulation consists of the edges.

 This is what I expected.  Since the polyhedron itself is in 2D the edges
 are in 1D so they correspond to the edges.  I asked you this question
 before with a square and you told me it was normal.

 If it is not supposed to do that, then facial_incidences() is broken.
 Take a look at it.

 > Do you have a reference for the algorithm you are using, or are you
 coming up with one yourself?

 I am more or less coming up with it myself.  The actual triangulation of
 2D surfaces is pretty standard in computer graphics (walk the points of
 the polygon building a triangle strip) but it obviously does not cover the
 cases where surfaces are in 4D.  That's where I innovate (or just do
 something random it seems).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4164#comment:5>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to