Monday, October 6, 2025
HomeLanguagesSymPy | Polyhedron.size() in Python

SymPy | Polyhedron.size() in Python

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




# Python code explaining
# SymPy.Polyhedron.size()
  
# importing SymPy libraries
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.polyhedron import tetrahedron, octahedron
  
# Using from 
# sympy.combinatorics.polyhedron.Polyhedron.size()
  
# Creating Polyhedron
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




# Python code explaining
# SymPy.Polyhedron.size()
  
# importing SymPy libraries
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.polyhedron import tetrahedron, octahedron
  
# Using from 
# sympy.combinatorics.polyhedron.Polyhedron.size()
  
# Creating Polyhedron
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

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32338 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6707 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6825 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6779 POSTS0 COMMENTS