CSERD


  • userhome
  • catalog
  • resources
  • help

3D Density Plot Tool


Shodor > CSERD > Resources > Models > 3D Density Plot Tool

  Software  •  Instructions  •  Theory


Instructions - Density Plot Tool

Purpose

The purpose of this applet is to supply a 3D graphing utility that can plot functions of 3 variables as a "cloud", with greater cloud density representing a higher function value.

Fundamentals

The box in the upper left corner is the viewscreen for the plot. It can be rotated by clicking and dragging on the box. The resolution of the image will momentarily drop as the image is being rotated, but will increase again when you stop rotating.

Enter the function you wish to plot in the function box, and press plot.

You may enter your function in terms of x, y, and z. In addition you may also enter your function in terms of r, theta, and phi, where they are defined such that:

x = r sin(phi) cos(theta)
y = r sin(phi) sin(theta)
z = r cos(phi)

Features

The visualization of the three dimensional density function treats the material as if it is capable of both producing and absorbing brightness. You can control both the brightness and absorptivity of the plot. To make a plot dimmer, try decreasing the brightness or increasing the absorptivity. To make a plot brighter increase the brightness or decrease the absorptivity.

If you are having difficulty setting the brightness to an appropriate level, you can try to use the automated brightness feature by clicking on the automate brightness checkbox. However, you may notice a delay in rendering images with this feature enabled.

You can also control the resolution of the image. You have low, medium, and high options. Low is appropriate for slower computers, and medium is appropriate for faster computers. If you have positioned the image the way you want and want to see a much higher resolution image, increase to high resolution, but be prepared to wait for the image to complete rendering.

You can use a black and white or a rainbow colormap, which can either be plain or striped. For an interesting effect, try increasing the brightness until the image appears saturated, switch to a striped colormap, and view a high resolution image. There is also a colormap option which colors negative values blue and positive values red.

You can instead of viewing a 3-D cloud, see a slice of the cloud along the "X-Y", "Y-Z", or "Z-X" planes.

Things to try

Electric Potential

Try visualizing the electric field of a number of point charge in three dimensions. In general, the electric field of a series of point charges is given by the sum of each charge divided by the distance to the charge.

Try the following set of point charges.

f(x,y,z) = 1/sqrt((x-1)**2+y**2+z**2)+
1/sqrt(x**2+(y+1)**2+z**2)

(For this one, try making the brightness higher and using a striped colormap.)

Try using a negative charge, and use the Red-Blue color map.

What happens if you add more point charges in different locations?

Hydrogen Electron Clouds

Consider the first few energy levels of Hydrogen. With the distance and magnitude scaled to fir within the screen, try

l=0, m=0, n=0

f(x,y,z) = exp(-r)

l=1, m=0, n=1

f(x,y,z) = cos(phi)*exp(-r)

l=1, m=1, n=1

f(x,y,z) = sin(phi)*exp(-r)

©1994-2024 Shodor