Drawing Points
Drawing Points
If you inspect the Test Data in Partiview, you will notice that the points that make up the cube vary in size. This is because Partiview is intelligent in how it draws particles, taking into account your distance from the particle to properly draw the perspective.
What determines this size though? The answer to this question will be discussed in the next several sections, culminating in a description of the luminosity of particles. The problem is this: the commands that affect the size (i.e., the luminosity) of a particle are dependent on knowing the commands that set the specific attributes of the particles. However, these attributes cannot be set outside the context of the various commands that set the luminosity. So, we have decided to introduce the specific attributes which will then be discussed in concert with one another in the section on luminosity.
In this section, we intend to introduce those attributes that affect points, the basic graphical element that represents data in Partiview. If you load the Test Data, you will notice that the points are displayed. These can be turned off either by clicking on the Point Toggle Button (green indicates the points are on), or using the points command. This command by itself toggles the points on and off, or you may append the on or off commands (as in points on) to explicitly tell Partiview to turn the points on or off.
We can set the range of apparent sizes for the points using the ptsize command. The range can be defined using the minpixels and maxpixels arguments. If you type
ptsizePartiview will report to you the current settings on the range from minpixels, representing the faintest points that will ever be drawn, to maxpixels, which represents the brightest points that will ever be drawn. We say “that will ever be drawn” because this sets the size of points across all luminosity conditions, from up close and bright to far away and dim. What you are setting with ptsize is the range of pixel sizes in which points will be drawn and this depends on the distance to the point as well as its intrinsic brightness. If the luminosity settings determine that a point's size is less than minpixels, then that point will not be drawn.
The Test Data is pre-loaded with the command
ptsize 0.05 10which produces points that range in size from 0.05 to 10 pixels. Of course, when you view the Test Data, you aren't seeing points of size 0.05 pixels. However, if you zoom away from the data cube, you will see the points shrink smaller and smaller until they disappear altogether.
Experiment with the ptsize command arguments using the Test Data by initializing your view with these commands:
label off
censize 0.1
slum 0.001
jump 0 0 10 0 0 0
This should make the points extremely small (you may even have to squint to see them or increase their slum value a little). If you adjust the maxpixels argument,
ptsize - 100you will notice that nothing happens to the points. This is consistent since the points are far away; we are seeing the effect of the minpixels argument as the points fade out. So, let's adjust the minpixels argument up to 0.5 from its current 0.05 value using the command
ptsize 0.5
The maxpixels argument will remain the same if nothing is specified. You will notice the points get brighter, but some of the points disappear or turn on and off if you are orbiting around the cube. Now make minpixels equal to one:
ptsize 1
Now you will see that the points get brighter (larger) but more of them disappear. What is going on here?
Partiview computes the size of a particle based on its luminosity settings and distance. Those particles that have computed sizes smaller than minpixels are randomly subsampled. This is to prevent having hundreds of points of equal luminosity and distance pop on simultaneously as you fly through a complex data set with thousands of points. With a random subset chosen, they pop on gradually and less conspicuously. If you continue to increase minpixels by intervals of 1, you will see different subsamples displayed.
How can you prevent this from occurring? As everything in this section, it depends on a combination of factors. If you want your data to fade out gradually as you fly away from it, then you will want to set a low minpixels argument. If you want large points, then you'll want to set the luminosity factors high. For example, if you are seeing a subset of points now, increase the slum factor by moving the Slider up a little. The points now have enough intrinsic luminosity so that their computed size is greater than minpixels.
Generally, a good minpixels value is around 0.05, while the maxpixels size is more aesthetic, depending on how prominent you want the points to appear. It is likely that your graphics card will impose some upper limit to the point size, perhaps as low as 10 pixels.
Rendering the Point
Points can either be drawn as squares, which are easier for your computer to draw, or drawn as circles, which are more complicated to draw. These two rendering settings can be toggled using the fast command. Starting with a fresh Test Data session, or slumming the current particles up so that all points are clearly visible and large, type
fastand the points should become squares with the report fast on followed by the ptsize settings. Issuing this command again will toggle back to fast off, drawing round points and telling you this is the better rendering option, although it comes at a performance cost. However, some graphics support, particularly on some Macintosh computers, will only draw square points.
Because points are somewhat limited in their use, we will now discuss how to place a polygon on a point, giving you more power in how you choose to display your data.
© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott
