3

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]

enter image description here

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

enter image description here

User12309
  • 427
  • 3
  • 13
  • 2
    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
  • 1
    @Szabolcs yes cylinder but it can be curved pipe, not necessarily straight pipe. – User12309 Jun 10 '14 at 22:07
  • 1
    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
  • @Szabolcs posted curved pipe sample data – User12309 Jun 11 '14 at 04:59
  • A curved pipe cannot be developed exactly because you are talking about double curvature then. – Yves Klett Jun 11 '14 at 07:05

1 Answers1

3

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}]

enter image description here

then:

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

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

enter image description here

Kuba
  • 136,707
  • 13
  • 279
  • 740