Generating line equation describing an axisymetric body (blunt sphere-cone)
Show older comments
I am attempting to generate a script file which will generate the equation of a line in 2d for an axisymetric body. I am wishing to create a radially-nosed frustrum wich then has a shoulder radius at the widest point. The symetry is taken about the X axis, with (0,0) denoting the origin of the co-ordinate scheme.
I have user definable variables of nose radius, body radius, cone semiangle, shoulder radius.
I can extrapolate the points of tangency between the nose radius and frustrum, and shoulder radius and frustrum.
code extract following:
%This script will generate the forebody heatshield geometry of a generic %aeroshell
%state the known input variables
%Rb Body radius
%Rs Shoulder radius
%Rn Nose radius
%THETA frustrum semi-angle
%define the co-ordinates of the sphere-frustrum and frustrum-shoulder line %segments
% x and y co-ordinates of nose-frustrum tangent: xtn=Rn*[1-sin(THETA)]; ytn=Rn*cos(THETA);
% x and y co-ordinates of frustrum-shoulder tangent
xts=Rn*[1-sin(THETA)]+[Rb-Rn*cos(THETA)-Rs*(1-cos(THETA))]*cot(THETA); yts=(Rb-Rn)*[1-cos(THETA)];
%Rl Forebody depth = (xts+Rs) Rl=(xts+Rs);
%define origin and end points of the line x1=0; y1=0;
x2=Rl; y2=0;
%define the length of the line for the aeroshell x axis
%x=linspace(x1,R1,x2);
%create the function describing the line %interim equation for frustrum XF=linspace(254.7,1754.1,1499);
YF=0.994*(XF); plot(XF,YF)
% plot the graph of the function.
figure(1) plot(XF,YF,'r+-') axis square
% plot a surface plot of the function above to create 3D body % use the cylinder command to obtain the desired geometry.
figure(2) [X,Y,Z] = cylinder(YF); surf(Z,Y,X); axis square colorbar
%plot surface normal vectors
figure(3) [X,Y,Z] = cylinder(YF); surfnorm(-Z,-Y,-X,'FaceColor','green','EdgeColor','none'); axis square, grid on,camlight left; lighting phong
%rotate the line function around axis of symetry
%create a surface plot of the line
I would like to create the line equation describing this curve which can then be plotted against an x axis x axis linespace command. The cylinder plot commander and surface normal vectors will be used to generate the plot form the data produced
Given my available data variables, how can i either interpolate all of the line points, or create an equation describing the entire line? If further clarification or images are required I can upload them.
Answers (0)
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!