PiMath API
    Preparing search index...

    Interface RandomGeometryCircleConfig

    Options of rndCircle.

    interface RandomGeometryCircleConfig {
        center?: RandomGeometryPointConfig;
        pointsOnCircle?: number | { fraction?: boolean; min?: number };
        radius?: FractionOrRandom;
        squaredRadius?: FractionOrRandom;
    }
    Index

    Options of the center, drawn by rndPoint (default: its own defaults).

    pointsOnCircle?: number | { fraction?: boolean; min?: number }

    Wanted number of points of the circle with exact coordinates: n is shorthand for { min: n }.

    • min: the circle has at least that many points whose offsets from the center are integers (the coordinates stay exact fractions when the center is fractional). A count is always a multiple of 4.
    • fraction: reserved for points with fractional offsets; true is not implemented yet.

    Default { min: 8, fraction: false }, applied only when neither radius nor squaredRadius is given; once one of them is given, pointsOnCircle applies only if set explicitly (an exact radius that does not reach min then throws, and so does a fractional random radius, which has no integer points).

    Radius of the circle: an exact value (5, '5/2'), or { fraction } for a random one (fraction: false gives an integer from 1 to 5 unless max is given, true a fraction). Exclusive with squaredRadius. The default is a random squaredRadius.

    squaredRadius?: FractionOrRandom

    Squared radius of the circle (default: a random integer, see pointsOnCircle; the radius is then its square root, possibly irrational: 5 gives x² + y² = 5). Same forms as radius; the random integer ranges from 1 to 25 unless max is given. An object fraction gives fractions unless it sets relative: true.