1 | initial version |
2 | No.2 Revision |
PrL=[]
for pt in PL:
ptr=[]
for v in pt :
ptr.append(RDF((v.n(20)*10^8)/10^8))
#ptr.append(RDF(v.n(20)))
PrL.append(ptr)
plt=Graphics()
plt+= point3d(PL, color='black',size=20)
plt=addAxis(plt,textToPlt,xBound,yBound,zBound)
P=Polyhedron(PrL)
Pc=P.centroid()
plt+= point3d(Pc, color='red',size=20)
show(plt)
3 | No.3 Revision |
PrL=[]
for pt in PL:
ptr=[]
for v in pt :
ptr.append(RDF((v.n(20)*10^8)/10^8))
#ptr.append(RDF(v.n(20)))
PrL.append(ptr)
plt=Graphics()
plt+= point3d(PL, color='black',size=20)
plt=addAxis(plt,textToPlt,xBound,yBound,zBound)
P=Polyhedron(PrL)
Pc=P.centroid()
plt+= point3d(Pc, color='red',size=20)
show(plt)
edited :21/08/23 : much more simple the solution is given in the post sage google support in the comment above:
P=Polyhedron(PL,backend='ppl', base_ring=QQ)
4 | No.4 Revision |
PrL=[]
for pt in PL:
ptr=[]
for v in pt :
ptr.append(RDF((v.n(20)*10^8)/10^8))
#ptr.append(RDF(v.n(20)))
PrL.append(ptr)
plt=Graphics()
plt+= point3d(PL, color='black',size=20)
plt=addAxis(plt,textToPlt,xBound,yBound,zBound)
P=Polyhedron(PrL)
Pc=P.centroid()
plt+= point3d(Pc, color='red',size=20)
show(plt)
edited :21/08/23 :
much more simple the solution is given in the post sage google support (link in the comment above:above) :
P=Polyhedron(PL,backend='ppl', base_ring=QQ)