Previous:Vector Expressions Main Index Next:Vector Identifiers

Vectors literals consist of two to five float expressions that are bracketed by angle brackets

and **<**

. The terms are separated by commas. For example here is a typical three component vector:**>**

< 1.0, 3.2, -5.4578 >

The commas between components are necessary to keep the program from thinking that the 2nd term is the single float expression

and that there is no 3rd term. If you see an error message such as "Float expected but '>' found instead" then you probably have missed a comma.**3.2-5.4578**

Sometimes POV-Ray requires you to specify floats and vectors side-by-side. The rules for vector expressions allow for mixing of vectors with vectors or vectors with floats so commas are required separators whenever an ambiguity might arise. For example

evaluates as a mixed float and vector expression where 4 is subtracted from each component resulting in **<1,2,3>-4**

. However the comma in **<-3,-2,-1>**

means this is a vector followed by a float.**<1,2,3>,-4**

Each component may be a full float expression. For example

is a valid vector.**<This+3,That/3,5*Other_Thing>**

Previous:Vector Expressions Main Index Next:Vector Identifiers