how to plot random points in airfoil wing

4 views (last 30 days)
I want to plot random points on the airfoil wing of naca 4415. How can i approach this problem. I want these points in order to run an optimizations for locating points of a fixtures? please help
  4 Comments
David Goodmanson
David Goodmanson on 13 Jun 2019
hi rakesh,
are the points on the surface of the wing or inside the cross section?
rakesh maled
rakesh maled on 20 Jun 2019
Hi David,
the points are on the surface of the wing.

Sign in to comment.

Accepted Answer

KSSV
KSSV on 14 Jun 2019
Check this demo example. I have coded it keeping in mind how your data is. It is like you are provided with upper and lower curve of foil.
[X,Y,Z] = cylinder(1) ;
n = size(X,2) ;
m = 10 ;
t = linspace(0,1,m) ;
L = zeros(3,m,n) ;
% Draw line between points
for i = 1:n
P1 = [X(1,i) Y(1,i) Z(1,i)]' ;
P2 = [X(2,i) Y(2,i) Z(2,i)]' ;
L(:,:,i) = P1+(P2-P1).*t ;
end
XX = squeeze(L(1,:,:)) ;
YY = squeeze(L(2,:,:)) ;
ZZ = squeeze(L(3,:,:)) ;
% Select random p points
p = 100 ;
idx = randperm(numel(XX),p) ;
% display
surf(X,Y,Z)
hold on
plot3(XX(idx),YY(idx),ZZ(idx),'.r')

More Answers (0)

Categories

Find more on Airfoil tools in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!