Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
circular plate 3D plot

Subject: circular plate 3D plot

From: hyun doo ahn

Date: 3 May, 2010 15:45:27

Message: 1 of 3

Dear all
I know how to make 2d circle plot by polar function
 
I have a question to make a circular plate 3D without polar3d

Actually, I have to show the acoustical modes inside circular muffler.

but I don't know how to make a circular plate
 
For acoustic reponse, I got values in the Zdirection.

Here, I have already known, theta and radius.

theta = (pi/180)*[0:45:360]

theta = [0 0.7854 1.5708 2.3562 3.1416 3.9270 4.7124 5.4978 6.2832]

theta is represented by radian.

radius is 20cm

so [x,y]=pol2cart(theta, radius)

Now I knew x and y coordinate for each 9 point by theta.

and I know the Z value but this is not matrix

for 3D plot, [theta, radius, height]=cart2pol(x,y,z)

Here I have a problem

how to make 3D circular plot with this?

If I have to use a surf, this is not circular plate, the plot came out a rectangluar plate

polar 3D plot has totally different shape.

I wanna know that how to make 3D circular plot with this [theta, radius, height]

Actually, the thing I have to do show the sound pressure level at each theta point
 
Z will be sound pressure level.

please help me






 

Subject: circular plate 3D plot

From: Roger Stafford

Date: 3 May, 2010 17:17:32

Message: 2 of 3

"hyun doo ahn" <hjlovme@hotmail.com> wrote in message <hrmr2n$sij$1@fred.mathworks.com>...
> Dear all
> I know how to make 2d circle plot by polar function
> I have a question to make a circular plate 3D without polar3d
> .......

  As you have stated the problem you have a circular ring, not a "plate", in the x-y plane. To make this a solid disk which would be appropriate for using 'surf' you need to have a mesh containing both a varying theta and a varying radius. Perhaps you mean to do something like the following.

 radius = linspace(0,20,10); % For ten rings
 theta = (pi/180)*[0:45:360]; % For eight angles
 [R,T] = meshgrid(radius,theta); % Make radius/theta grid
 X = R.*cos(T); % Convert grid to cartesian coordintes
 Y = R.*sin(T);
 Z = (corresponding values of Z in terms of X and Y)
 surf(X,Y,Z) %Plot the sound pressure surface

  If you really do have only a ring, then you should be using 'plot3', not 'surf'.

Roger Stafford

Subject: circular plate 3D plot

From: hyun doo ahn

Date: 3 May, 2010 18:52:26

Message: 3 of 3

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hrn0fc$s6m$1@fred.mathworks.com>...
> "hyun doo ahn" <hjlovme@hotmail.com> wrote in message <hrmr2n$sij$1@fred.mathworks.com>...
> > Dear all
> > I know how to make 2d circle plot by polar function
> > I have a question to make a circular plate 3D without polar3d
> > .......
>
> As you have stated the problem you have a circular ring, not a "plate", in the x-y plane. To make this a solid disk which would be appropriate for using 'surf' you need to have a mesh containing both a varying theta and a varying radius. Perhaps you mean to do something like the following.
>
> radius = linspace(0,20,10); % For ten rings
> theta = (pi/180)*[0:45:360]; % For eight angles
> [R,T] = meshgrid(radius,theta); % Make radius/theta grid
> X = R.*cos(T); % Convert grid to cartesian coordintes
> Y = R.*sin(T);
> Z = (corresponding values of Z in terms of X and Y)
> surf(X,Y,Z) %Plot the sound pressure surface
>
> If you really do have only a ring, then you should be using 'plot3', not 'surf'.
>
> Roger Stafford


thank you very much Roger^^

I got the idea from you.

I clealy undertood how to work

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us