<p>You already have a 2D parametrisation, don't you? One of the dimensions is the longitudal axis (in mm?) and the other is the circumferential axis (in degrees). The only problem I see is when you have rectangles wrapping around the 0/360-degree boundary. One workaround for that would be to duplicate each rectangle (or just the ones on the boundary) so that you get one copy on each side of the boundary. Does that help? And if you need to have a distance, and not an angle, for the circular dimension, that is readily available as $l = r a \pi/180$, where $r$ is the radius and $a$ is the angle in degrees.</p>

CC BY-SA 3.0
2016-12-05T15:35:43.780Z
2016-12-05T15:35:43.780Z
Supernormal
<p>I have a cylinder that has rectangular box regions to mark leakage problems. The location of a rectangular box is determined by its initial position in the longitudinal axis and its initial position in the circumferential axis in degree. The length  and width (in degrees, from 0° to 360°) of the boxes are also available.</p>

<p>How can I convert this cylinder to a plane surface so that I can find the location of the rectangular boxes in the 2D plane?<br>
Here I have  three rectangles on the surface.</p>

<p><a href="https://i.sstatic.net/qMBWR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qMBWR.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2016-11-14T23:21:19.023Z
i may be seriously oversimplifying this but what difference would mapping it as a 2d shape make? with your horizontal cylinder flattened, could the hight (or width with a vertical cylinder?) be exactly the same as the degree? do you need a specific unit of measurement i.e. mm? in which case you need the circumference of the cylinder (or any measure from which the circumference can be calculated) which would then be the hight once flattened. do these rectangles move or grow from the initial position? i am not sure what you are asking for.
Ryan
CC BY-SA 3.0
2016-11-15T11:48:13.640Z
@Ryan I need to map the  rectangle on the pipe surface to  2D plane
karu
CC BY-SA 3.0
2016-11-27T23:41:05.467Z
I think it's not clear *which* surface. Can this be imagined as "projecting" the given rectangles on the (3D!) pipe, then "cutting open" the pipe and "unwrapping" it, to obtain the 2D pipe surface? (And: Why is the width of the rectangle given in degrees?)
Marco13
CC BY-SA 3.0
2016-11-28T20:46:02.093Z
@Marco13 Yeah. rectangles are on a 3 D pipe
karu
CC BY-SA 3.0
2016-11-28T23:22:52.157Z
I would guess the width is in degrees just to give the same unit of measurement as height.  I'm betting you calculate it as if it were the height, then use that value for the width.
Alan Wolfe
CC BY-SA 3.0
2016-12-05T07:08:12.003Z
You already have a 2D parametrisation, don't you? One of the dimensions is the longitudal axis (in mm?) and the other is the circumferential axis (in degrees). The only problem I see is when you have rectangles wrapping around the 0/360-degree boundary. One workaround for that would be to duplicate each rectangle (or just the ones on the boundary) so that you get one copy on each side of the boundary. Does that help? And if you need to have a distance, and not an angle, for the circular dimension, that is readily available as l = r*a*pi/180, where r is the radius and a is the angle in degrees.
Supernormal
CC BY-SA 3.0
2016-12-05T08:53:13.470Z
@Supernormal Please convert the comment as an answer. I could award you the bounty.
karu
<computational-geometry>
Mapping of cylinder to 2D plane
karu
# Mapping of cylinder to 2D plane

(Asked by: username_0 on 2016-11-14)

I have a cylinder that has rectangular box regions to mark leakage problems. The location of a rectangular box is determined by its initial position in the longitudinal axis and its initial position in the circumferential axis in degree. The length and width (in degrees, from 0° to 360°) of the boxes are also available.

How can I convert this cylinder to a plane surface so that I can find the location of the rectangular boxes in the 2D plane?  
Here I have three rectangles on the surface.

[![enter image description here](https://i.sstatic.net/qMBWR.png)](https://i.sstatic.net/qMBWR.png)

**Tags:** computational-geometry

> **Comments:**
> **username_1**: i may be seriously oversimplifying this but what difference would mapping it as a 2d shape make? with your horizontal cylinder flattened, could the hight (or width with a vertical cylinder?) be exactly the same as the degree? do you need a specific unit of measurement i.e. mm? in which case you need the circumference of the cylinder (or any measure from which the circumference can be calculated) which would then be the hight once flattened. do these rectangles move or grow from the initial position? i am not sure what you are asking for.  
> **username_0**: @username_1 I need to map the  rectangle on the pipe surface to  2D plane  
> **username_2**: I think it's not clear *which* surface. Can this be imagined as "projecting" the given rectangles on the (3D!) pipe, then "cutting open" the pipe and "unwrapping" it, to obtain the 2D pipe surface? (And: Why is the width of the rectangle given in degrees?)  
> **username_0**: @username_2 Yeah. rectangles are on a 3 D pipe  
> **username_3**: I would guess the width is in degrees just to give the same unit of measurement as height.  I'm betting you calculate it as if it were the height, then use that value for the width.  
> **username_4**: You already have a 2D parametrisation, don't you? One of the dimensions is the longitudal axis (in mm?) and the other is the circumferential axis (in degrees). The only problem I see is when you have rectangles wrapping around the 0/360-degree boundary. One workaround for that would be to duplicate each rectangle (or just the ones on the boundary) so that you get one copy on each side of the boundary. Does that help? And if you need to have a distance, and not an angle, for the circular dimension, that is readily available as l = r*a*pi/180, where r is the radius and a is the angle in degrees.  
> **username_0**: @username_4 Please convert the comment as an answer. I could award you the bounty.  

---

## 1 answers

### Answer by username_4 on 2016-12-05. Score: 3 | Accepted answer

You already have a 2D parametrisation, don't you? One of the dimensions is the longitudal axis (in mm?) and the other is the circumferential axis (in degrees). The only problem I see is when you have rectangles wrapping around the 0/360-degree boundary. One workaround for that would be to duplicate each rectangle (or just the ones on the boundary) so that you get one copy on each side of the boundary. Does that help? And if you need to have a distance, and not an angle, for the circular dimension, that is readily available as $l = r a \pi/180$, where $r$ is the radius and $a$ is the angle in degrees.


---

