RandomInstance

RandomInstance[expr]

finds a random instance of an expression such as a geometric scene.

RandomInstance[expr,n]

finds n instances.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Represent a symbolic geometric scene containing a triangle with points a, b, c and a 30° angle:

RandomInstance finds a particular instance of the scene:

Rules giving coordinates for the points have been filled in:

Find multiple instances of the scene:

Options  (1)

RandomSeeding  (1)

By default, RandomInstance finds different solutions each time:

Use RandomSeedingseed to use an explicit integer or string as a seed:

Applications  (1)

Decompose a polygon into similar triangles:

Properties & Relations  (1)

Use RandomInstance to find random polygons:

This can also be done with RandomPolygon:

Introduced in 2019
 (12.0)