Source Academy Modules
    Preparing search index...

    Function draw_points_2d

    • Returns a function that turns a given Curve into a Drawing, by sampling the Curve at num sample points. The Drawing consists of isolated points, and does not connect them. When a program evaluates to a Drawing, the Source system displays it graphically, in a window,

      Parameters

      • numPoints: number

      Returns CurvePlotFunction

      function of type 2D Curve → Drawing

      draw_points_2d(100)(t => make_point(t, t