3
$\begingroup$

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

$\endgroup$
7
  • 2
    $\begingroup$ 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? $\endgroup$
    – Szabolcs
    Commented Jun 10, 2014 at 21:52
  • $\begingroup$ @Szabolcs I can imagine as a simple straight cut (anywhere) on the circumference of the cylinder. not sure about function. $\endgroup$
    – User12309
    Commented Jun 10, 2014 at 22:03
  • $\begingroup$ Is this a question specifically about cylinders or about any arbitrary surface? $\endgroup$
    – Szabolcs
    Commented Jun 10, 2014 at 22:06
  • 1
    $\begingroup$ @Szabolcs yes cylinder but it can be curved pipe, not necessarily straight pipe. $\endgroup$
    – User12309
    Commented Jun 10, 2014 at 22:07
  • 1
    $\begingroup$ A "curved pipe" is not mathematically a cylinder and changes the problem completely. Can you post "curved pipe" sample data? $\endgroup$
    – Szabolcs
    Commented Jun 10, 2014 at 22:10

1 Answer 1

3
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.