# How to map vertex points from the surface of a straight pipe onto 2D plane

How to map vertex points from the surface of a straight pipe onto 2D plane.

The 3D surface points of the straight pipe can be found here: data

Working code:

file = "http://pastebin.com/H9y9SqYy";
dat = Import[file, "Table"];
Graphics3D[Point@dat, Boxed -> False]


One can imagine as a simple straight cut (anywhere) on the circumference of the pipe. I want to get something like this:

-
Please be more specific about what you need as output. The input is clear. What does "unwrapping" mean? There are an infinite number of functions to map 3D vectors into 2D vectors. What sort of function are you looking for precisely? – Szabolcs Jun 10 '14 at 21:52
@Szabolcs I can imagine as a simple straight cut (anywhere) on the circumference of the cylinder. not sure about function. – User12309 Jun 10 '14 at 22:03
Is this a question specifically about cylinders or about any arbitrary surface? – Szabolcs Jun 10 '14 at 22:06
@Szabolcs yes cylinder but it can be curved pipe, not necessarily straight pipe. – User12309 Jun 10 '14 at 22:07
A "curved pipe" is not mathematically a cylinder and changes the problem completely. Can you post "curved pipe" sample data? – Szabolcs Jun 10 '14 at 22:10

Quick solution is to assume, basing on the plot, that the cylinder main axis is parallel to one of cartesian axes:

Graphics3D[Point@dat, Boxed -> False, Axes -> True, BoxRatios -> 1,
AxesLabel -> {"x", "y", "z"}, BaseStyle -> {18, Bold}]


then:

data2 = CoordinateTransform["Cartesian" -> "Cylindrical",
{#, #3, #2} & @@@ dat][[;; , {2, 3}]];

Graphics[Point@data2, AspectRatio -> 1, FrameLabel -> {"ϕ", "z"}, Frame -> True,
BaseStyle -> {18, Bold}]


-