User Tools

Site Tools


Pattern Definitions

Patterns are the building blocks for shapes and are part of the shapefile. Patterns can be used in a number of shapes: a pan saw shape, a tilt saw shape and a dimmer saw shape will all use the same saw pattern. Patterns just define the general envelope. Details like size, speed, or offset (if multiple patterns are applied simultaneously) are all set at shape level, not at pattern level.

A pattern definition looks like this:

  <Pattern ID="Sine">
    <Function ID="1" Value="0"/>
    <Function ID="2" Value="98"/>
    <Function ID="3" Value="194"/>
    <Function ID="4" Value="289"/>
    <Function ID="5" Value="381"/>
    <Function ID="6" Value="470"/>
    <Function ID="7" Value="553"/>
    <Function ID="8" Value="632"/>
    <Function ID="9" Value="704"/>
    <Function ID="10" Value="770"/>
    <Function ID="11" Value="828"/>
    <Function ID="12" Value="878"/>
    <Function ID="13" Value="920"/>
    <Function ID="14" Value="953"/>
    <Function ID="15" Value="977"/>
    <Function ID="16" Value="991"/>
    <Function ID="17" Value="1000"/>
    <Function ID="18" Value="991"/>
    <Function ID="19" Value="977"/>
    <Function ID="20" Value="953"/>
    <Function ID="21" Value="920"/>
    <Function ID="22" Value="878"/>
    <Function ID="23" Value="828"/>
    <Function ID="24" Value="770"/>
    <Function ID="25" Value="704"/>
    <Function ID="26" Value="632"/>
    <Function ID="27" Value="553"/>
    <Function ID="28" Value="470"/>
    <Function ID="29" Value="381"/>
    <Function ID="30" Value="289"/>
    <Function ID="31" Value="194"/>
    <Function ID="32" Value="98"/>
    <Function ID="33" Value="0"/>
    <Function ID="34" Value="-98"/>
    <Function ID="35" Value="-194"/>
    <Function ID="36" Value="-289"/>
    <Function ID="37" Value="-381"/>
    <Function ID="38" Value="-470"/>
    <Function ID="39" Value="-553"/>
    <Function ID="40" Value="-632"/>
    <Function ID="41" Value="-704"/>
    <Function ID="42" Value="-770"/>
    <Function ID="43" Value="-828"/>
    <Function ID="44" Value="-878"/>
    <Function ID="45" Value="-920"/>
    <Function ID="46" Value="-953"/>
    <Function ID="47" Value="-977"/>
    <Function ID="48" Value="-991"/>
    <Function ID="49" Value="-1000"/>
    <Function ID="50" Value="-991"/>
    <Function ID="51" Value="-977"/>
    <Function ID="52" Value="-953"/>
    <Function ID="53" Value="-920"/>
    <Function ID="54" Value="-878"/>
    <Function ID="55" Value="-828"/>
    <Function ID="56" Value="-770"/>
    <Function ID="57" Value="-704"/>
    <Function ID="58" Value="-632"/>
    <Function ID="59" Value="-553"/>
    <Function ID="60" Value="-470"/>
    <Function ID="61" Value="-381"/>
    <Function ID="62" Value="-289"/>
    <Function ID="63" Value="-194"/>
    <Function ID="64" Value="-98"/>
  • there is the <Pattern …> element
    • the only property is its ID: a string by which this pattern is referenced by the shapes. Make sure all IDs are unique!
  • and there are 64 <Function …> childs
    • each Function has the properties ID and Value

The whole thing describes something like a lookup table: ID translates to the X axis, value translates to the Y axis.

ID is simply a number from 1 to 64 - each function has its unique number, they ascend consecutively.

Values may range from -1000 to 1000. As shapes are modulators to attribute values within Titan, 0 translates to 'no change', -1000 translates to -100%, and 1000 translates to 100%. -100% and 100% refer to the full attribute range.

Example tilt shape, size set to 100% and amplitude (see Shape Definitions) set to 1000:

  • with the attribute set to 0% tilt, a pattern value -1000 would still be 0% tilt, a pattern value 0 would be 0% tilt, and a pattern value 1000 would translate to 100% tilt
  • with the attribute set to 50% tilt, pattern values from -1000 to -500 would translate to 0% tilt, a pattern value of 0 would do any change (thus tilt = 50%), and values from 500 to 1000 would translate to tilt = 100%
  • with the attribute set to 100% tilt, a pattern value -1000 would translate to 0% tilt, and all values from 0 to 1000 would translate to 100% tilt

In total, if the pattern ranges from -1000 to 1000, in order to use the full range, you would set the origin (the attribute value) to 50% and the size (shape amplitude in shape definition, or shape size in Titan) to 50%

With a little routine, one can easily create customized slopes:

  • if determined by a function you can calculate the values with a spreadsheet calculator like Excel
  • if you want to create your own free slope simply use a checkered paper, draw the intended slope, and count the boxes

Luckily there are already a number of Predefined Patterns included in the shapefile which you can of course use for your own shapes.

shapes/patterns.txt · Last modified: 2017/11/14 08:00 by icke_siegen