Skip to content

Intermact API Reference / @intermact/core / functionGraph

Function: functionGraph()

functionGraph(handle, fn, opts?): IMObject2D

Defined in: packages/core/src/layout/function-graph.ts:22

Sample a function y = fn(x) over a domain and return a polyline object positioned in scene world space via an AxesHandle (design.md §7.4). Non-finite samples (NaN / Infinity) split the curve into separate segments.

Parameters

handle

AxesHandle

fn

(x) => number

opts?

FunctionGraphOptions = {}

Returns

IMObject2D

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)