2D and 3D Point Literals

Coordinates are used extensively in MAXScript programming. They support a large range of operations as described in Point2 Values and Point3 Values. You can write point literals using the following forms:

2D

[ <expr>, <expr> ]

3D

[ <expr>, <expr>, <expr> ]

where <expr> evaluates to an Integer or Float value.

Examples:

[320, 240] -- 2D point

[10, 20, 30] -- 3D point

Expressions in a literal are evaluated when the literal is built. The following script and results show the value stored in a Point3 when expressions are used in the literal:

Script:

a=10

b=45

[10, 20, 30]

[sin a, 2 * b, a^2 + b^2] -- can contain expressions

Output

10.0 -- result of line 1

45 -- result of line 2

[10,20,30] -- result of line 3

[0.173648,90,2125] -- result of line 4

See also

Point2 Values

Point3 Values