On Thu, 4 Feb 2010 00:43:10 -0800 (PST), Nathann Cohen 
<nathann.co...@gmail.com> wrote:
> Could you be by any chance trying to compute the convex hull of a set
> of points ?

In which case you would want to do for example:

sage: poly = Polyhedron(vertices=[(0, 0), (3, 0), (0, 3), (1, 1)])
sage: poly
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 3 vertices.
sage: poly.vertices()
[[0, 0], [3, 0], [0, 3]]

Note that Sage realised that (1, 1) was in the interior and ignored it.
There are a bunch of things you can do with your shiny new polygon now,
here is what tab-completion gives me:

sage: poly.
poly.Hrep_generator                  poly.field                           
poly.projection
poly.Hrepresentation                 poly.gale_transform                  
poly.pyramid
poly.Vrep_generator                  poly.graph                           
poly.radius
poly.Vrepresentation                 poly.ieqs                            
poly.radius_square
poly.adjacency_matrix                poly.incidence_matrix                
poly.ray_generator
poly.ambient_dim                     poly.inequalities                    
poly.rays
poly.bipyramid                       poly.inequality_generator            
poly.rename
poly.bounded_edges                   poly.intersection                    
poly.render_solid
poly.category                        poly.is_compact                      
poly.render_wireframe
poly.cdd_Hrepresentation             poly.is_simple                       
poly.reset_name
poly.cdd_Vrepresentation             poly.line_generator                  
poly.save
poly.center                          poly.linearities                     
poly.schlegel_projection
poly.db                              poly.lines                           
poly.show
poly.dim                             poly.lrs_volume                      
poly.simplicial_complex
poly.dump                            poly.n_Hrepresentation               
poly.triangulated_facial_incidences
poly.dumps                           poly.n_Vrepresentation               
poly.union
poly.edge_truncation                 poly.n_equations                     
poly.version
poly.equation_generator              poly.n_facets                        
poly.vertex_adjacencies
poly.equations                       poly.n_inequalities                  
poly.vertex_adjacency_matrix
poly.f_vector                        poly.n_lines                         
poly.vertex_generator
poly.face_lattice                    poly.n_rays                          
poly.vertex_graph
poly.facet_adjacency_matrix          poly.n_vertices                      
poly.vertex_incidences
poly.facial_adjacencies              poly.polar                           
poly.vertices
poly.facial_incidences               poly.prism                           


Feel free to explore these and ask more questions.


Best,
Alex


-- 
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- Australia -- http://www.ms.unimelb.edu.au/~aghitza/

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to