next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Points :: randomPointsMat

randomPointsMat -- matrix of homogeneous coordinates of random points in projective space

Synopsis

Description

Produces a random m+1 x n matrix of scalars, with columns representing the coordinates of the point. The first m+1 x m+1 submatrix is the identity.

i1 : R = ZZ/31991[vars(0..3)]

o1 = R

o1 : PolynomialRing
i2 : randomPointsMat(R,3)

o2 = | 1 0 0 |
     | 0 1 0 |
     | 0 0 1 |
     | 0 0 0 |

             4       3
o2 : Matrix R  <--- R
i3 : randomPointsMat(R,3, AllRandom=>true)

o3 = | 107   3783   8444   |
     | 4376  -5295  -10468 |
     | -5558 8570   10359  |
     | 3187  -15332 -7452  |

             4       3
o3 : Matrix R  <--- R
i4 : randomPointsMat(R,7)

o4 = | 1 0 0 0 1 -8239 12365  |
     | 0 1 0 0 1 2653  -13496 |
     | 0 0 1 0 1 5071  -9468  |
     | 0 0 0 1 1 -6191 -11938 |

             4       7
o4 : Matrix R  <--- R

Ways to use randomPointsMat :

For the programmer

The object randomPointsMat is a method function with options.