Plotting thickness data to a cylinder.
Show older comments
First off, I am completely new to MATLAB and not really sure where to start.
I have large datasets (approximately 170,000 points) that I am trying to plot to a cylinder surface. It is Ultrasonic thickness readings taken about the circumference of a pipe.
I have X, Y, Z coordinates for every point and would like to display the thickness reading value as a colormap, any recommendations would be greatly appreciated.
*Edit..... I've attached a photo of the original excel data, rows represent circumferential position, columns length about the pipe axis and the color pallet represents remaining wall thickness (in this instance between 12mm-20mm)
Ideally I would like to be able to plot to be a representative image of the pipe itself as pictured (that was just cheated by applying an image of the excel data to a pipe section as a material in AutoCAD)
Accepted Answer
More Answers (1)
Ameer Hamza
on 1 May 2020
Edited: Ameer Hamza
on 1 May 2020
I don't understand what you are trying to do inside the for-loop, but the following code shows how to map a texture on a cylinder surface. I used an image as a texture map. You can adapt it according to your need.
im = imread('peacock.jpg');
r = 5;
[X,Y,Z] = cylinder(r, 100);
h = 20;
Z = Z*h;
surf(X, Y, Z, flip(im), 'FaceColor', 'texturemap', 'EdgeColor', 'none');
daspect([1 1 1])

Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!