Container for a beverage preparation machine or foodstuff preparation machine , the container for containing beverage or foodstuff material and comprising a code encoding preparation information, characterized in that the code comprises a reference portion and a data portion , the reference portion comprising an arrangement of at least two reference units defining a virtual reference line (r); the data portion comprising: a data unit arranged on a virtual encoding line (D) which intersects the virtual reference line (r) at a virtual intersection point, the data unit being arranged at any distance (d) from said virtual intersection point along the virtual encoding line (D), said distance (d) along said virtual encoding line (D) encoding a value of a parameter of the preparation information as a function of said distance (d), whereby the virtual encoding line (D) is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line (r) at the virtual intersection point; and a one or more of discrete positions arranged on said virtual encoding line (D) at known locations with respect to the arrangement of said data unit along said virtual encoding line (D), whereby said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information, wherein at least one of the discrete positions comprises a further data unit. the reference portion comprising an arrangement of at least two reference units defining a virtual reference line (r); the data portion comprising: a data unit arranged on a virtual encoding line (D) which intersects the virtual reference line (r) at a virtual intersection point, the data unit being arranged at any distance (d) from said virtual intersection point along the virtual encoding line (D), said distance (d) along said virtual encoding line (D) encoding a value of a parameter of the preparation information as a function of said distance (d), whereby the virtual encoding line (D) is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line (r) at the virtual intersection point; and a one or more of discrete positions arranged on said virtual encoding line (D) at known locations with respect to the arrangement of said data unit along said virtual encoding line (D), whereby said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information, wherein at least one of the discrete positions comprises a further data unit. a data unit arranged on a virtual encoding line (D) which intersects the virtual reference line (r) at a virtual intersection point, the data unit being arranged at any distance (d) from said virtual intersection point along the virtual encoding line (D), said distance (d) along said virtual encoding line (D) encoding a value of a parameter of the preparation information as a function of said distance (d), whereby the virtual encoding line (D) is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line (r) at the virtual intersection point; and a one or more of discrete positions arranged on said virtual encoding line (D) at known locations with respect to the arrangement of said data unit along said virtual encoding line (D), whereby said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information, wherein at least one of the discrete positions comprises a further data unit. <EOS>