Chalkboard - v3.0.1
    Preparing search index...

    Function Taylor

    • Plots the nth-degree Taylor series approximation for an explicit function.

      Parameters

      • func: ChalkboardFunction

        The function

      • n: 0 | 1 | 2

        The degree of the Taylor approximation (0 for constant, 1 for linear, 2 for quadratic)

      • a: number

        The point of expansion (in units of the function, not pixels)

      • config: {
            context: CanvasRenderingContext2D;
            domain: [number, number];
            lineWidth: number;
            res: number;
            size: number;
            strokeStyle: string;
            x: number;
            y: number;
        }
        • context: CanvasRenderingContext2D

          Optional custom canvas context to draw on

        • domain: [number, number]

          Domain over which to plot (in units of the matrix, not pixels)

        • lineWidth: number

          Stroke width

        • res: number

          Resolution of the plot

        • size: number

          Scale, defaults to 1, divided by 100 internally for finer control

        • strokeStyle: string

          Stroke color

        • x: number

          x-offset (canvas translation), defaults to canvas center

        • y: number

          y-offset (canvas translation), defaults to canvas center

      Returns number[][]