On 27.02.19 14:34, Dima Pasechnik wrote: > On Wed, Feb 27, 2019 at 1:02 PM Daniel Krenn <[email protected]> wrote: >> Is there an easy way in SageMath to compute the in- or outward surface >> normal vector of these faces of P? (in contrast to doing it all from >> scratch). If not, are there methods that might help, so that not >> everything needs to be built from scratch? >> >> Note: What I search for, is a method that works for a general compact >> polyghedron in any dimension and their faces of dimension-1. > > > In the full-dimensional case, say, P=polytopes.cube() > P.inequalities() is more or less what you need (as they correspond to > the facets, > a.k.a. faces of codimension 1) > e.g. P.inequalities()[0].vector()[1:] > (0, 0, -1) > is one of the 6 normal vectors.
In the full-dimensional case this indeed is the result. > I suppose in non-full-dimensional case you still can use > P.inequalities() as above, > projecting them on the affine hull of P. Yes, this is the interesting case. The problem then is going back from the projection. I guess that orthogonality is ususally destroyed here... Daniel -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
