Plotting a Curved Annulus of Data
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm having trouble plotting a specific area of data from a raw data set that I collected from an interferometer. The reason I need to have a particular range of data is because I need to compute the best-fit sphere of the data set from the interferometer (measures end-face geometries of fiber-optic cables i.e., Radius of Curvature, etc.) for a validation of the interferometer's software. Anyway, I've been able to plot the following:


If you notice, the data is not scattered but it is evenly spaced in both the X- and Y-directions. The data I want to plot is the one in between the two circles or the "Fitting Region" however, I've been unsuccessful in plotting only this section. Can anyone give me some guidance or pointers on a better method of possibly plotting only the annulus of data?
Thank you, Mario
My code to generate this is as follows:
% The following Matlab routine plots and calculates the Radius of Curvature
% from the Fitting Region stated in the standard.
clear all; close all; clc;
%%Loading the Data.
% This loads the Orignal Cartesian data for the connector and the Impact
% Cartesian data for the connector.
startRow = 2; endRow = Inf;
[X,Y,Z,ROI_AVo,ROI_EXo,ROI_FITo,Modo] = ...
importfile('Connector 1-1.txt', startRow, endRow);
%%Raw Data Plotting.
% A 3D plot of the surfaces.
figure();
plot3(X,Y,Z); grid on; box on; set(gca,'FontSize',14);
title('Data-Pixel Geometry')
xlabel('X (\mum)'); ylabel('Y (\mum)'); zlabel('Z (nm)');
%%The Fitting Region.
% The Fitting Region of the endface geometry is defined in the following
% manner: A circular region having a diameter D minus the diameter E of
% the extracting region. The fitting region shall be defined in order to
% cover the contact zone of the ferrule endface when the ferrule is mated.
% The center values of the rectangular XY-view.
a = 0.5*max(X); b = 0.5*max(Y); c = max(Z);
% Nominal Fitting Region Data (in um).
R_D = 125; R_E = 70; Theta = 0:359; Theta = Theta*(pi/180);
X_D = R_D.*cos(Theta) + a; Y_D = R_D.*sin(Theta) + b;
X_E = R_E.*cos(Theta) + a; Y_E = R_E.*sin(Theta) + b;
Z_FR = repmat(c,1,360);
% Plot of the Fitting Region.
hold on
plot3(X_D, Y_D, Z_FR,'k*')
plot3(X_E, Y_E, Z_FR,'g*')
hold off
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!