Adding Complexity

Vectors

A collection or list of values cube( [width,depth,height] ); translate( [x,y,z] ) polygon( [ [x0,y0], [x1,y1], [x2,y2] ] );

Variables

Use any expression (arbitrary or meaningful), add an equal sign, assign it numeric, string, or vector values and add a semicolon. Once assigned a value, you can use them in different places and swap/reassign the values. Examples:
  1. var = 25;
  2. coolGuy = "66";
  3. myVector = [1,2,3];
OpenSCAD variable values can vary, but if they are assigned a value multiple times, only the last assigned value is used in all places in the code.