# Math kit

> The math kit is the math feature of fframes-kit (fframes-kit = { .., features = ["math"] }).

Page: https://fframes-kit.pages.dev/docs/math/
Cargo feature: `math` (`fframes-kit = { version = "..", features = ["math"] }`)

The math kit is the `math` feature of `fframes-kit`
(`fframes-kit = { .., features = ["math"] }`). Its figures are built from the explain layer
(`Axes`, `NumberLine`, `FunctionGraph`, see the `explain` module docs) and come with the
prelude. Animated values are `ValueTracker`s: a `timeline!` stored in the video and read
with `ui.sample`. Every entry names its scene in the components gallery
(`cargo run --release -p components-gallery -- strip <Scene> -n 8`).

The calculus figures are overlays. They take the mapping of the line or axes they sit on
and draw only themselves, so you show the line or axes once and put several figures on it.
`FunctionPlot` draws its axes too. An `Axes` with `y_scaling: Scaling::LogBase(10.0)` (or
`x_scaling`) is logarithmic; its range is in exponents and the figures on it take values. The geometry figures (`UnitCircle`, `LinearTransform`,
`VectorSum`, `Pythagoras`) stand alone and are placed in units of `ui.space`; show them in
a `ui.with_space(..)` to draw them at another scale.

- [NumberPoint and Interval](https://fframes-kit.pages.dev/docs/math/number-point-and-interval.md): NumberPoint is a dot on a number line at a tracked value, with a label above it that can write the value.
- [FunctionPlot](https://fframes-kit.pages.dev/docs/math/function-plot.md): Axes with a graph, its label and a tracer: a dot that follows a tracked x along the graph, with a dashed line down to the x-axis and the point's…
- [Tangent and Secant](https://fframes-kit.pages.dev/docs/math/tangent-and-secant.md): Tangent is the tangent of a function at a tracked x, a line of fixed length centered on the point.
- [RiemannSum and AreaUnder](https://fframes-kit.pages.dev/docs/math/riemann-sum-and-area-under.md): RiemannSum draws Riemann rectangles with each width of dxs in turn, cross-fading from one to the next, and can write the sum.
- [UnitCircle](https://fframes-kit.pages.dev/docs/math/unit-circle.md): The unit circle at a tracked angle (radians, counterclockwise): the radius to the point, the cosine along the x-axis, the sine up to the point and the…
- [LinearTransform and VectorSum](https://fframes-kit.pages.dev/docs/math/linear-transform-and-vector-sum.md): LinearTransform is Manim's ApplyMatrix on a LinearTransformationScene.
- [Pythagoras](https://fframes-kit.pages.dev/docs/math/pythagoras.md): A right triangle with legs a and b and a square on each side, each drawn with its own squares_enter and labeled with its area (a² = 9, b² = 16, c² = 25).…
- [FractionBar and FractionPie](https://fframes-kit.pages.dev/docs/math/fraction-bar-and-fraction-pie.md): A bar or a circle cut into denominator equal parts, of which the first numerator fill one after another (stagger seconds apart, from delay).
- [MatrixView](https://fframes-kit.pages.dev/docs/math/matrix-view.md): A matrix product worked out entry by entry: a × b = c, centered on (x, y).
- [Plots](https://fframes-kit.pages.dev/docs/math/plots.md): fframes_kit::plot draws data on axes.
- [NormalFit](https://fframes-kit.pages.dev/docs/math/normal-fit.md): Samples pouring into a histogram, then the normal curve that fits them. samples is a slice, and shown (a tracker) says how many of them are binned so…
- [Epicycles](https://fframes-kit.pages.dev/docs/math/epicycles.md): A chain of turning circles whose end draws a closed path, as in the 3Blue1Brown Fourier series. fourier(path, samples, terms) resamples the path along…
