Displaying a Random Subset


Displaying a Random Subset

You can display a random subset of particles using the every command. every takes an integer argument that signifies the number of data points to sample. For example, using the Sample Data, fly out and increase the slum on the data so that you can see most of the data points in your view (that is, you are essentially outside the data set, but you can still see most of the particles). If you issue the bound command, you should see that the Sample Data has 10,420 specks, or particles. The default is to display every one of these particles, which corresponds to the command every 1. To display every second particle you would type

every 2
and so on. As you type in higher numbers, you will notice the number of particles decreasing. every reports the current status back to you, for example, for every 2, the report is
display every 2th particle (of 10420)
which is written to the Console Window upon issuing the command, or by issuing the every command without an argument.

As you type in higher and higher numbers, the data will retain its shape, but will be more sparse. If you enter every 100, you will still notice a spherical distribution, but with far fewer particles. You may also notice the particles increasing in brightness. This is because the overall apparent brightness must remain the same, thus the remaining particles must brighten to compensate for this rule.


© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott