Thread Subject: 3-D polar plotting with discrete data points?

Subject: 3-D polar plotting with discrete data points?

From: Ben

Date: 22 Jul, 2008 19:57:39

Message: 1 of 4

Hi,

I have data that has something like the following in each line, and
there are about 1000 lines with different values of:

BETA, THETA, PHI, VALUE1, VALUE2, VALUE3

Where BETA, THETA, and PHI are angles. A 3-D polar plot makes sense,
but I'm not seeing that the utilities on matlab central file exchange
are especially useful... BETA, THETA, and PHI are not necessarily
smoothly varying.

Just curious if anyone has a suggestion about which plotting routine
to use to create a 3-D "surface" using such data (I can read it into
an array). The idea is to show how value1, value2, and value3 vary
with changes in beta, theta, and phi.

Thanks,

-Ben

Subject: 3-D polar plotting with discrete data points?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jul, 2008 21:12:58

Message: 2 of 4

In article <2fd5edad-b4eb-462a-a3b8-db8536dd3a1c@k37g2000hsf.googlegroups.com>,
Ben <jbenjam@gmail.com> wrote:

>I have data that has something like the following in each line, and
>there are about 1000 lines with different values of:

>BETA, THETA, PHI, VALUE1, VALUE2, VALUE3

>Where BETA, THETA, and PHI are angles. A 3-D polar plot makes sense,
>but I'm not seeing that the utilities on matlab central file exchange
>are especially useful... BETA, THETA, and PHI are not necessarily
>smoothly varying.

>Just curious if anyone has a suggestion about which plotting routine
>to use to create a 3-D "surface" using such data (I can read it into
>an array). The idea is to show how value1, value2, and value3 vary
>with changes in beta, theta, and phi.

You could convert to cartesian coordinates, then griddata()
and then mesh() or surf() the result of that.

I'm not sure how you are going to convert to cartesian coordinates,
though, as a 3D cartesian coordinate would normally be two angles
and a distance; having three angles sounds like a 4D surface.
--
Current spam load: 750-800 messages per day (March 4, 2008)

Subject: 3-D polar plotting with discrete data points?

From: Ben

Date: 23 Jul, 2008 02:18:12

Message: 3 of 4

On Jul 22, 5:12=A0pm, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote:
<snip>
> I'm not sure how you are going to convert to cartesian coordinates,
> though, as a 3D cartesian coordinate would normally be two angles
> and a distance; having three angles sounds like a 4D surface.

Thanks! You've triggered my memory: This is a spherical coordinates
to cartesian coordinates transformation, and meshgrid should
regularize the data points appropriately.

I'll follow the coordinate transformation rules outlined at:
http://en.wikipedia.org/wiki/Spherical_coordinate_system

Cheers,

-Ben

Subject: 3-D polar plotting with discrete data points?

From: Ben

Date: 23 Jul, 2008 02:24:08

Message: 4 of 4


I replied too quickly -- In this case, because there are 3 angles,
each angle can be thought of as a respective rotation about the x, y,
and z axis. This means that the three angles can be transformed into
two (somehow). When combined with a length, as you said, two angles
are sufficient to describe all positions in 3-D cartesian space.

I just need to recall how to do that 3 angle to 2 angle
transform. :-) I think you've put me on the right path, I'll mess
around with it for awhile.

Thanks,
-Ben


On Jul 22, 10:18=A0pm, Ben <jben...@gmail.com> wrote:
> On Jul 22, 5:12=A0pm, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
> wrote:
> <snip>
>
> > I'm not sure how you are going to convert to cartesian coordinates,
> > though, as a 3D cartesian coordinate would normally be two angles
> > and a distance; having three angles sounds like a 4D surface.
>
> Thanks! =A0You've triggered my memory: =A0 This is a spherical coordinate=
s
> to cartesian coordinates transformation, and meshgrid should
> regularize the data points appropriately.
>
> I'll follow the coordinate transformation rules outlined at:http://en.wik=
ipedia.org/wiki/Spherical_coordinate_system
>
> Cheers,
>
> -Ben

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com