## How to Calculate the Dimensions of Conical and Cylindrical Cylinder Targets

When you upload the side image of a Cylinder target to the Target Manager, you must consider the actual shape of the object. Make sure that the uploaded images correctly encapsulate the flat body of the real physical object. The flat body represents the side surface of a cylinder or cone object if it were unrolled into a planar surface. The mathematics involved are particularly relevant when the shape of the object is a cone or a conic frustum.

The following image shows a generic conic frustum shape, which represents the most general case for cylinder targets, and its key geometric parameters.

where **d** and **D** are the diameters of the conical object (with **d < D**) and sL is the side length of the object.

**Note**: For the general case, the side length must not be confused with the cylinder height. However, for the special case of a true cylinder, where the top and bottom diameters are identical and the side surface is aligned vertically, the side length equals the height .

### Construction of the flat cylinder body general case

The following figure shows two different shapes for the flat side surface. All other instances (cones, for example) are variations on these shapes. The following sections are divided into Case 1 and Case 2, which describe two methods of computing the width and height of the enclosed image.

**Case 1**

In the following case, the difference between the top and bottom diameters is smaller than the side length

(that is, D - d < sL).

The flat body can be constructed easily using the given parameters, by applying the following formulas to compute the radii of the two constructing circles:

- Inner circle radius: r' = (d ? sL) / (D - d)
- Outer circle radius: R' = r' + sL

For further calculations, use the diameter of the outer circle, which is as follows:

The shape can now be constructed by doing the following:

- Draw two concentric circles with radii r' and R'
- Mark the dashed vertical center line as shown in the figure above
- Measure the arclength of ?D/2 on the outer circle on both sides, from the intersection of the circle with the vertical center line
- Draw the rays from the two resulting points to the center of the circle

The shape enclosed between the two circles and the rays is the unrolled surface of the truncated conical shape.

- The circular segment must be oriented in the target image so that it is symmetric on the vertical image axis (the dashed line). The segment borders must touch all four sides of the image.

**Case 2**

In this case, the difference between the top and bottom diameters is larger than the cylinder side length (that is, D d >= sL).

The construction of the flat image is similar to Case 1, but uses this figure as a reference.

### Width and height of the cylinder s side image

The width and height of the image for the cylinder s side surface can be computed from the given parameters and from the computed values for the constructing circles.

In the case where D d < sL, the width and height of the image are represented by the following equations:

width = D' sin ( ?D / D' )
height = sL + r' ? (1 cos ( ?D / D' ) )
while in the case where D d >= sL, the following equations apply:
width = D'
height = (D' / 2) ? (1 + sin ( (?/2) ? (2D - D') / D' ) )

### Aspect ratio of the cylinder s side image

The aspect ratio of the bitmap image can be computed using the following formula:

**aspect ratio = bitmapWidth / bitmapHeight = w / h 2%**

This formula defines that the actual bitmap aspect ratio can deviate by 2% from the required computed ratio. This deviation can be helpful when existing objects are used by cutting, unrolling, and scanning.

### Special Case the Cylinder

The cylinder is a special case of the generic conical shape since the cylinder has straight edges as shown in the following figure.

The top and bottom diameters (d, D) are identical, and the side length simply corresponds to the cylinder height.

Because r' is not defined here, the cylinder s body layout is a rectangle, where:

w = ?D
h = sL

Note: The flat body must be orTiented so that the vertical image axis (dashed line) is parallel to the object vertical axis and it fills the image area.

### Special Case the Cone

A cone is another special case of a generic conical shape. The cone is characterized by a sharp tip on either the top or the bottom, so that one of the diameters (top or bottom, D, or d) is zero. See the cone example in the following figure.

Since one of the diameters of a cone is zero, the formulas can be simplified, as follows:

r' = 0
R' = sL
D' = 2sL

In the case where d < sL, the width of the image is equal to the chord-length of the section:

w = 2sL ? sin ( ?d / (2sL) )

while the height of the image is equal to the side length:

h = sL

In the case where d >= sL, the width of the image is twice the side length:

w = 2sL

while the image height is represented by the following formula:

h = sL ? (1 + sin ( (?/2) ? (d - sL) / sL) )

Note: The cone segment must be oriented such that the target image is symmetrical on the vertical image axis (the dashed line). The segment borders must touch all four sides of the image.