# Globular Clusters

This is a reference for you to see if you did everything correctly, what should be on your screen. Note that some commands in this page are blocked (using ...) for you to figure out by yourself.

## Read and organize the data

Now we load an analagous table of data for globular clusters and plot them in the same plane projections as we did for the open clusters. The file contains 5 columns. The first 2 columns are RA and Dec, which you only need for the Bonus. Column 3 is Galactic Longitude in degrees, column 4 is Galactic Latitude in degrees, and column 5 is distance in pc.

Load the data and save them to a variable, e.g., galGC:

```galGC = ... ;
```

```lonGC = ... ;
latGC = ... ;
```

Convert from Galactic to Cartesian coordinates (, , ):

```xgc = ... ;
ygc = ... ;
zgc = ... ;
```

## Shape of the Milky Way

Let's plot the projections of the open clusters in blue, and the globular clusters in red. Remember to use axis equal to prevent distortions.

```figure(5); clf
plot( ... , 'bo')
... ...
plot( ... , 'r.')
... ...
```
```figure(6); clf
plot( ... )
... ...
figure(7); clf
... ...
```

## 3-D distribution

Or, you can use plot3 function to make a 3-D plot showing the distribution of open clusters in the space. This time, instead of using axis equal, you want to use axis([-2e4 2e4 -2e4 2e4 -2e4 2e4]) to limit all three axes to +/- 20,000 pc. You need this scale to really see what's going on near the center. The zoom tool isn't very helpful in the 3D plot (but you can try it if you don't believe me).

```figure(8); clf
plot3( ... )
... ...
axis([-2e4 2e4 -2e4 2e4 -2e4 2e4])
```

Then use the Rotate 3D icon to change the angle of view:

It is clear that globular clusters are not bound to the plane of the galaxy and trace the dark matter potential well better than open clusters. This picture is also consistent with our knowledge that globular clusters are often much older than open clusters, having formed as the Galaxy itself was forming.