next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NumericalImplicitization :: numericalSourceSample

numericalSourceSample -- samples a general point on a variety

Synopsis

Description

Computes a list of sample points on a variety numerically. If I is the zero ideal in a polynomial ring of dimension n, then an n-tuple of random elements in the ground field is returned. Otherwise, a numerical irreducible decomposition of I is computed, which is then used to sample points.

If s is unspecified, then it is assumed that s = 1. In this case, the single point is returned, rather than a list.

In the example below, we sample a point from A3 and then 3 points from V(x2 + y2 + z2 - 1) in A3.

i1 : R = CC[x,y,z];
i2 : numericalSourceSample(ideal 0_R)

o2 = {.892712+.673395*ii, .29398+.632944*ii, .025888+.714827*ii}

o2 : Point
i3 : I = ideal(x^2 + y^2 + z^2 - 1);

o3 : Ideal of R
i4 : numericalSourceSample(I, 3)

o4 = {{.0639312+.363095*ii, .349078+.480802*ii, -1.12512+.169804*ii},
     ------------------------------------------------------------------------
     {1.824+.510044*ii, -.745985+1.12127*ii, -.080127+1.17155*ii},
     ------------------------------------------------------------------------
     {.904524-.892533*ii, 1.19581+.66524*ii, .0902927+.13085*ii}}

o4 : List

Caveat

Since numerical irreducible decompositions are done over CC, if I is not the zero ideal, then the output will be a point in complex space (regardless of the ground field of the ring of I).

See also

Ways to use numericalSourceSample :