SymPy | Polyhedron.size() in Python
Last Updated :
27 Aug, 2019
Polyhedron.size() : size() is a sympy Python library function that returns the count of number of corners of the polyhedra.
Syntax : sympy.combinatorics.Polyhedrons.Polyhedron.size()
Return : count of number of corners of the polyhedron
Code #1 : size() Example – tetrahedron
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.polyhedron import tetrahedron, octahedron
a = tetrahedron.copy()
print ( "Polyhedron - size form : " , a.size)
a.rotate( 0 )
print ( "\nPolyhedron - size form : " , a.size)
|
Output :
Polyhedron – size form : 4
Polyhedron – size form : 4
Code #2 : size() Example – octahedron
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.polyhedron import tetrahedron, octahedron
a = octahedron.copy()
print ( "Polyhedron - size form : " , a.size)
a.rotate( 0 )
print ( "\nPolyhedron - size form : " , a.size)
|
Output :
Polyhedron – size form : 6
Polyhedron – size form : 6
Share your thoughts in the comments
Please Login to comment...