Polyhedron.radius() bug?

12 views
Skip to first unread message

rickhg12hs

unread,
Feb 10, 2012, 8:27:55 AM2/10/12
to sage-support
"Return the maximal distance from the center to a vertex."

Shouldn't this be translation invariant? Doesn't seem like any of
these are answers right.


sage: sq=polytopes.n_cube(2)
sage: sq.vertices()
[[1, 1], [-1, 1], [1, -1], [-1, -1]]

sage: sq.radius()
2*sqrt(2)

sage: Polyhedron([[p0+1,p1] for p0,p1 in sq.vertices()]).radius()
2*sqrt(3)
sage: Polyhedron([[p0+10,p1] for p0,p1 in sq.vertices()]).radius()
2*sqrt(102)

Keshav Kini

unread,
Feb 10, 2012, 9:52:01 AM2/10/12
to sage-s...@googlegroups.com
That looks obviously broken to me. I'll write a patch.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

Anton Sherwood

unread,
Feb 10, 2012, 12:06:23 PM2/10/12
to sage-s...@googlegroups.com
On 2012-2-10 05:27, rickhg12hs wrote:
> "Return the maximal distance from the center to a vertex."
>
> Shouldn't this be translation invariant?

Could 'center' here mean 'origin'? It's not obviously unreasonable to
assume that a polyhedron is defined so that they coincide.

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

Keshav Kini

unread,
Feb 10, 2012, 1:35:09 PM2/10/12
to sage-s...@googlegroups.com

Seems unlikely to me. The output does not match this theory either.

-keshav

achtung: sent from phone, possibly unduly terse

-- To post to this group, send email to sage-s...@googlegroups.com To unsubscribe from this gr...

Keshav Kini

unread,
Feb 11, 2012, 4:37:47 AM2/11/12
to sage-s...@googlegroups.com
Fixed this issue at http://trac.sagemath.org/sage_trac/ticket/12492 . Thanks for reporting this bug, rickhg12hs!
Reply all
Reply to author
Forward
0 new messages