This method computes a list of sample points on the image of a variety numerically, by calling numericalSourceSample.
If the number of points s is unspecified, then it is assumed that s = 1.
One can optionally provide an initial list of points P on F(V(I)), which will then be completed to a list of s points on F(V(I)).
The following example samples a point from the twisted cubic. We then independently verify that this point does lie on the twisted cubic.
i1 : R = CC[s,t]; |
i2 : F = {s^3,s^2*t,s*t^2,t^3}; |
i3 : p = first numericalImageSample(F, ideal 0_R) o3 = p o3 : Point |
i4 : A = matrix{p#Coordinates_{0,1,2}, p#Coordinates_{1,2,3}}; 2 3 o4 : Matrix CC <--- CC 53 53 |
i5 : numericalNullity A == 2 o5 = true |
Here is how to sample a point from the Grassmannian Gr(3,5) of P2’s in P4, under its Plücker embedding in P9. We take maximal minors of a 3 x 5 matrix, whose row span gives a P2 in P4.
i6 : R = CC[x_(1,1)..x_(3,5)]; |
i7 : F = (minors(3, genericMatrix(R, 3, 5)))_*; |
i8 : numericalImageSample(F, ideal 0_R) o8 = {{.235327-.159959*ii, -.583293+.111338*ii, .0110037+.269476*ii, ------------------------------------------------------------------------ .535607-.134897*ii, -.688164+.914162*ii, -.0166354+.170936*ii, ------------------------------------------------------------------------ .461736-.724404*ii, .565043+.697799*ii, .378877-.203586*ii, ------------------------------------------------------------------------ .496259+.433603*ii}} o8 : List |