ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 28 May 2020 15:58:33 +0200Vertex list of a surface not readily accessiblehttps://ask.sagemath.org/question/51608/vertex-list-of-a-surface-not-readily-accessible/ While preparing my answer to [this question](https://ask.sagemath.org/question/51567/how-to-plot-projections-of-a-3d-surface-onto-coordinate-planes/), I have been searching how to retrieve faces and vertices from a explicit surface plotted with `plot3d`. There is a fact that confuses me. Consider this code:
sage: surf = plot3d(lambda x,y: sin(x*y), (-pi,pi), (-pi,pi))
sage: len(surf.vertex_list())
0
This means that `surf.vertex_list()` is an empty list. However:
sage: surf = plot3d(lambda x,y: sin(x*y), (-pi,pi), (-pi,pi))
sage: show(surf)
Launched html viewer for Graphics3d Object
sage: len(surf.vertex_list())
1600
Now `surf.vertex_list()` is not an empty list and the vertices can be retrieved. So I wonder what `show(surf)` internally does so that the vertices list becomes accessible. To avoid plotting the surface, I have found that I can replace `show(surf)` by `surf.triangulate()`, but I also wonder if there is a best option.JuanjoThu, 28 May 2020 15:58:33 +0200https://ask.sagemath.org/question/51608/