Using Formulas to Explore the Planets |
Tutorials > Using Formulas to Explore the Planets Here we use formulas to define new attributes and to plot functions. We’ll look at a data set with only nine cases—the planets in our solar system. We'll compute the density of the planets and investigate the relationship between a planet’s distance from the sun and the length of its year.
Getting to Know the Planets Collection 1. Open the document Planets.ftm from the Tutorial Starters folder. There are two objects here: text, explaining the attributes (this information is also in the collection comments), and the collection of planets. 2. After reading the text, hide the text object by selecting it and choosing Object | Hide Text Object. We did something special to this collection; we have to open it to see. 3. Open the collection by dragging its lower right corner down and far to the right. Instead of the usual gold balls, the cases have different images in different sizes. In Fathom, you can use formulas to turn the collection itself into a graphical representation of your data.
6.Make the inspector much wider. 7.Drag the lower border of the y row to make it taller, so you can read the entire formula. 8.Double-click the formula field for image to see how the images were determined. 9.Resize the formula editor and the top pane so you can read the whole formula. The case images are controlled by a switch function that evaluates each case’s caseIndex (the first case has a caseIndex of 1; the second, 2; and so on). In this example, each case gets its own image. Fathom comes with dozens of built-in images that can be used in display formulas. (To see them all, see the sample document IconList.ftm.) See Fathom Help: Change the Appearance of Cases in a Collection for more on using this feature. 10. Click OK to close the formula editor. 11. Iconify the collection, and close the inspector. 12. Make a case table for this data. (If you select the collection first, it will fill with the data; otherwise, drop the collection’s name into the case table to connect them.)
Computing the Densities of the Planets We’ll now have Fathom compute each planet’s density. We need to know the volume and mass for each, because density is the ratio of these values. We’ll find the volume using the radius (the attribute Radius) measured in millions of meters. The mass, measured in Earth masses, is recorded in the attribute M_Earths. We’ll compute density in two steps using two new attributes (though we could do it in one), beginning with volume.
19. Either type radius (the formula editor is not case sensitive), or expand the Attributes list and double-click Radius. When you enter a valid attribute name, it turns magenta. 20. Type ^ to make an exponent, and 3 to cube the radius. 21. Press Enter or click OK to accept the formula and close the formula editor. The formula appears in the cell, and the attribute values have a gray background to show that they are computed. 22. Make another new attribute, Density, and give it this formula: The numerator is the mass in Earth masses, and the denominator is the volume in Earth volumes, so the density comes out in Earth densities. 23. Graph Density. 24. Click a data point to see which planet it represents.
Use selection in the graph to answer these questions. •Which planet has the lowest density? •What do the three planets on the right have in common? •What do the four planets on the left have in common? •What is special about Earth? •If the Moon is a chunk of Earth, where would it be on this graph? (You could look it up, and see where it does lie.)
Playing Kepler Now we’ll study one of the most famous relationships in physics - how the period of an orbit depends on the orbit’s radius. This relationship was discovered by Johannes Kepler in 1618. 26.Replace Density with orbit_AU, and put year on the vertical axis of the graph. You should see the points on a gentle upward curve. It looks like we could predict how long a planet takes to go around the sun if we knew the radius of its orbit. Let’s try fitting a function.
The exponent we need is between 1 and 2, so let’s expand the slider’s axis to get finer control.
Straightening the Planets: Kepler with Logs We can also figure out the relationship between period and radius of an orbit by taking the logarithm of both attributes. 36. Make two new attributes logOrbit and logYear. (These are the names, not the formulas.)
In the graph, there is a gap between Mars and Jupiter. What goes there?
Orbits in Detail So far, we have been looking at the orbit_AU attribute, which has each planet’s average distance from the sun. However, planets move in ellipses, not circular orbits. The collection has attributes for the minimum and maximum orbital distances for each planet: periAU and apheAU (short for perihelion and aphelion). We can add these attributes to our graph of year versus orbit_AU.
|