PiMath API
    Preparing search index...

    Interface RandomGeometryVector3Config

    Options of rndVector3: those of rndPoint3 (axis, plane, octant, range, fraction), with allow.zero in place of allow.origin, and primitive.

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

    Hierarchy (View Summary)

    Index
    allow?: { zero?: boolean }

    Type Declaration

    • Optionalzero?: boolean

      true allows the null vector (default false).

    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.

    primitive?: boolean

    Integer components with no common divisor, e.g. (1, 2) and never (2, 4) (default false). Requires integers.

    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.