Interface: CoordinateSystem
Defined in: src/mobjects/graphing/CoordinateSystem.ts:15
CoordinateSystem - the shared surface of every coordinate system.
In ManimCE (manim/mobject/graphing/coordinate_systems.py) CoordinateSystem
is the abstract base of Axes and NumberPlane. manim-web does not need that
class hierarchy, because Axes is concrete and NumberPlane extends Axes.
This interface captures the coordinate-conversion surface that both classes
share, so callers can program against the abstraction. Axes declares
implements CoordinateSystem, so the compiler checks the surface stays in
sync, and NumberPlane inherits it.
Methods
c2p()
c2p(
x,y):Vector3Tuple
Defined in: src/mobjects/graphing/CoordinateSystem.ts:19
Shorthand for coordsToPoint (matches ManimCE c2p).
Parameters
x
number
y
number
Returns
c2pX()
c2pX(
x):number
Defined in: src/mobjects/graphing/CoordinateSystem.ts:23
The x value of coordsToPoint(x, 0).
Parameters
x
number
Returns
number
c2pY()
c2pY(
y):number
Defined in: src/mobjects/graphing/CoordinateSystem.ts:25
The y value of coordsToPoint(0, y).
Parameters
y
number
Returns
number
coordsToPoint()
coordsToPoint(
x,y):Vector3Tuple
Defined in: src/mobjects/graphing/CoordinateSystem.ts:17
Map coordinates (x, y) to a point in scene space.
Parameters
x
number
y
number
Returns
getOrigin()
getOrigin():
Vector3Tuple
Defined in: src/mobjects/graphing/CoordinateSystem.ts:39
The scene-space point of the coordinate origin (0, 0).
Returns
getXAxis()
getXAxis():
NumberLine
Defined in: src/mobjects/graphing/CoordinateSystem.ts:27
The x-axis number line.
Returns
getXLength()
getXLength():
number
Defined in: src/mobjects/graphing/CoordinateSystem.ts:35
The visual length of the x-axis.
Returns
number
getXRange()
getXRange(): [
number,number,number]
Defined in: src/mobjects/graphing/CoordinateSystem.ts:31
The x range as [min, max, step].
Returns
[number, number, number]
getYAxis()
getYAxis():
NumberLine
Defined in: src/mobjects/graphing/CoordinateSystem.ts:29
The y-axis number line.
Returns
getYLength()
getYLength():
number
Defined in: src/mobjects/graphing/CoordinateSystem.ts:37
The visual length of the y-axis.
Returns
number
getYRange()
getYRange(): [
number,number,number]
Defined in: src/mobjects/graphing/CoordinateSystem.ts:33
The y range as [min, max, step].
Returns
[number, number, number]
pointToCoords()
pointToCoords(
point): [number,number]
Defined in: src/mobjects/graphing/CoordinateSystem.ts:21
Map a point in scene space back to coordinates [x, y].
Parameters
point
Returns
[number, number]