PiMath API
    Preparing search index...

    Interface RandomGeometryPoint3Config

    Options of rndPoint3.

    interface RandomGeometryPoint3Config {
        allow?: { origin?: boolean };
        axis?: boolean | "x" | "z" | "y" | null;
        fraction?: boolean | RandomCoefficientConfig;
        octant?: Octant | Octant[] | null;
        plane?: boolean | "xy" | "xz" | "yz" | null;
        range?: RandomRange;
    }
    Index
    allow?: { origin?: boolean }

    Type Declaration

    • Optionalorigin?: boolean

      false excludes the point (0, 0, 0) (default true).

    axis?: boolean | "x" | "z" | "y" | null

    Where the point lies relative to the axes (default null).

    • 'x', 'y', 'z': on that axis (the two other coordinates are zero).
    • true: on one of the three axes, chosen at random.
    • false: on no axis and in no coordinate plane (no coordinate is zero).
    • null: unconstrained (a coordinate may be zero).

    Exclusive with plane.

    fraction?: boolean | RandomCoefficientConfig

    false (default): integer coordinates; true: fractions; object: full control over the fractions.

    octant?: Octant | Octant[] | null

    Restricts the point to one octant, or to a union of octants (default null). Axes and planes belong to the octants. With several octants, one of them is chosen uniformly, then the point is drawn in it.

    plane?: boolean | "xy" | "xz" | "yz" | null

    Coordinate plane containing the point (default null).

    • 'xy' (z = 0), 'xz' (y = 0), 'yz' (x = 0): the other two coordinates are free.
    • true: in one of the three planes, chosen at random.
    • false / null: no constraint.

    Exclusive with axis.

    range?: RandomRange

    Interval of the coordinates (default 10). A number d means [-|d|, |d|] (so 10 and -10 are equivalent); {min, max} gives explicit bounds.