rand_rotate {volesti}R Documentation

Apply a random rotation to a convex polytope (H-polytope, V-polytope or a zonotope)

Description

Given a convex H or V polytope or a zonotope as input this function applies a random rotation.

Usage

rand_rotate(P)

Arguments

P

A convex polytope. It is an object from class (a) Hpolytope or (b) Vpolytope or (c) Zonotope.

Details

Let P be the given polytope and Q the rotated one and T be the matrix of the linear transformation.

Value

A list that contains the rotated polytope and the matrix of the linear transformation.

Examples

# rotate a H-polytope (2d unit simplex)
P = GenSimplex(2,'H')
poly_matrix_list = rand_rotate(P)

# rotate a V-polytope (3d cube)
P = GenCube(3, 'V')
poly_matrix_list = rand_rotate(P)

# rotate a 5-dimensional zonotope defined by the Minkowski sum of 15 segments
Z = GenZonotope(3,6)
poly_matrix_list = rand_rotate(Z)

[Package volesti version 1.0.3 Index]