0% found this document useful (0 votes)
22 views1 page

Ruled Suf

The document clears the MATLAB workspace and defines variables for points on two edge curves. It then generates a ruled surface between the two curves by interpolating between their coordinate values.

Uploaded by

M. RIYAZUDEEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Ruled Suf

The document clears the MATLAB workspace and defines variables for points on two edge curves. It then generates a ruled surface between the two curves by interpolating between their coordinate values.

Uploaded by

M. RIYAZUDEEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

%Clearing the Workspace

clc

clear all

close all

npa = 50; % Number of points on first edge curve

npb = 50; % Number of points on second edge curve

%%Coordinates of Points on two edge curves

x1 = linspace(0,1,npa);

x2 = linspace(0,1,npb);

y1 = 0.25&cos(2*pi*x1);

y2 = 0.5&sin(2*pi*x2);

z1 = zeros(1,npa);

z2 = ones(1,npb);

Pu0 = y1;

Pu1 = y2;

npw = 50;

w = linspace(0,1,npw);

%Ruled Surface

Qx(i,:) = (1-w(i))*x1 = w(i)*x2;

Qy(i,:) = (1-w(i))*y1 = w(i)*y2;

Qz(i,:) = (1-w(i))*z1 = w(i)*z2;

figure(1)

plot3(Qx(i,:),Qy(i,:),Qz(i,:));

hold all

end

figure(2)

surf(Qx,Qy,Qz)

You might also like