Radioactive Curves and Aging

Cindy So

Abstract

A radioactive curve is a graph that shows the decay or decrease of a radioactive isotope, such as carbon or potassium, as time passes. This is curvebank project to draw a radioactive curve. It is a useful program for users to experiment and learn about radioactive decay. Our program begins with a radioactive curve. Given the proper radioactive rates and the time range, the program will calculate the points and translate them into the applet window. This will allow users to view the decay of an object as time passes. One feature included in this program includes the ability to view three curves at once without entering the necessary numbers again and having the program graph again. Each curve is drawn in a different color, which allows a user to recognize which curve belongs to which radioactive decay rate entered. Another option in this program is the calculation of the age given the correct information. It is able to calculate three different decays, so user can compare the ages of different objects given the same amount.

Introduction

Radioactive decay occurs when a parent isotope creates daughter isotopes. This is done to maintain a more stable atom by readjusting the neutrons and protons within an atom. As time passes, the amount of radioactive isotopes within a radioactive object slowly decreases. One type of radioactive dating is carbon-14 dating, which uses carbon-14 in objects to calculate the age of an object. Within living organisms is carbon-14. Carbon-14 slowly decays into carbon-12 and N-14 as time passes. To measure the amount of carbon-14, a small piece of fossil is burned and converted carbon dioxide gas. Changing into a gas, scientists measure the amount of carbon-14 in the gas. The age of the fossil is calculated by comparing the amount of carbon-14 in the original amount with the remaining amount of carbon-14 in the current object.

The purpose of the radioactive curve is to tell how old an object is based on the amount of radioactive isotope remaining in the object after a certain amount of time. A radioactive curve is also known as radioactive dating. It can also be named after the isotope that is being measured. For example, if carbon-14 is being measured it can be called carbon-14 dating. At the beginning, an object contains a certain amount of radioactive isotope. As time passes, the amount of radioactive isotope in the object reduces until it reaches zero. The rate of the decrease of the amount of radioactive isotope is known as the radioactive decay rate. The formula for calculating the radioactive curve is A=Aoekt where A is the current amount of radioactive isotope, Ao is the original amount of radioactive isotope, k is the radioactive decay rate and t is the time. To graph the curve, Ao and k needs to be known. The maximum time range is also required because the program needs to know when to stop graphing the curve. To calculate the age of an object, the equation needs to be modified so that the time is the only unknown factor. Therefore the equation for calculating the age of the object is t=. The reason we choose this project is because radioactive decay is interesting. Being able to determine the age of an object by the amount of isotope it contains is important. This helps scientist, archaeologists and other professions use this equation and find the age object that they may find. For example, in 1964 scientists found bones of a Deinochus, a dinosaur, and wanted to know the age of the object. However, the bones were too old to estimate the age. Therefore, the used the volcanic debris in the surrounding rocks to estimate the age of the dinosaur. The rocks were analyzed using potassium-argon dating and the result is the dinosaur lived approximately 107 million years ago.

This project is written for Curvebank, the website address for cuvebank is It is website that contains many information about curves that is related to math. For some curves there is a type of animation or applet to accompany the explanation. We have been working with Shirley Gray to create the radioactive curve for this website.

Technological Background

The program is written in Java using JBuilder. The classes that we used are:

java.awt.*;

java.awt.event.*;

java.applet.*;

javax.swing.*;

Each of these classes is needed to build each component of our program.

Java.applet is used to enable the java program to run on a browser and be viewed on the internet. All that is required is inserting the applet tag with information such as path to the java class file, size and height of the applet into the html file.

<APPLET

CODEBASE = "."

CODE = "radioactive.RadioactiveCurve.class"

NAME = "Radioactive Curve"

ARCHIVE = "radioactive.jar"

WIDTH = 700

HEIGHT = 400

HSPACE = 0

VSPACE = 0

ALIGN = middle

</APPLET>

In the above code, the class that it references is RadioactiveCurve.class within the package radioactive. Since JBuilder created some files that were too long and had strange symbols, the files had to be placed into a jar file. To create a jar file, we needed to type “jar cd radioactive.jar radioactive” into a command prompt. In my program the jar file is called radioactive.jar. The last word is the folder where all the classes were stored. Since, we created a package for the java files, the folder also needs to be packaged into the jar file. A jar file is like a zip file where several files are put together into one file. To be able to read a jar file instead of folders, archive must be added and needs to reference the jar file.

The other files are used for creating the gui for the project. The first is javax.swing, which is needed to build the gui with text fields, labels, JPanel and buttons. Java.awt.event allows us to do some action on the gui. For example, when a button is clicked the program will recognize the button has been clicked and will do some action. The final class that was needed is java.awt which is where all the drawing tools are stored. For our program, we used mostly drawLine to draw the x-axis and y-axis. DrawLine was also used to draw the curve of the radioactive decay curve by calculating the points then connecting each of the points with lines. For example, the points will start with 0 to the time range specified by the user. This range will be split into segments and the points for the graph will be calculated based on those segments. This will result in x and y coordinates for the curve. The final step is to connect the points and depending on the number of segments, the multiple lines will form a smooth curve. This program will run on any browser that has java runtime environment, otherwise, the applet will not load.

System Overview

The main function of the curve is to draw the radioactive curve based on the inputs for time range, original amount and radioactive decay rate given by the user. However, a curve is plain and is available on many other websites by searching for radioactive decay. To make my program different, we needed to add more features.

The first feature added is the ability to graph up to three curves at once. This will allow the user to compare each of the radioactive decay rates given. By looking at the different curves, the user will be able to tell which curve is decreasing faster and which is not. For example, carbon-14 has a radioactive decay rate of -1.21 x 10-4 and iodine-131 has a decay rate of –0.08664 and xenon-133 has a decay rate of –0.13862. Carbon-14 decreases slower than the other two isotopes. Iodine-131 has the fastest decay rate and gets closer 0 as time progresses. The decay rate of the three isotopes can be seen in the screenshot above. The range of the graph has been set to 100 years. In the screenshot above, the green line is carbon-14, the red line iodine-131 and blue is xenon-133. When users see the graph, they can compare the three decay rates and see that they each decay differently.

When the applet is loaded, some sample radioactive rates have been inserted to give users an example of that to expect from this applet. The amount of the objects is not needed. Instead the amount of the object will be show in percentages. At the top is 100 percents which means the current amount is the same as the original amount. As time moves, the amount will decrease. Next is the time range will tell the applet how far to calculate the points, which will affect how far in time to view the decay of the isotope. This number will affect the x-axis on the graph. Depending on the decay type, either year, day, hour or seconds, it will graph the decay based on the time. For example, in the above screenshot, all three decay in years, so their type is year. If a day decay type is inserted, the graph will not be visible because decays so fast that it will not be seen. However, changing the range to days or lowering the year will make the graph visible. The next three text fields are for inputting the decay rate or three radioactive isotopes. The font of the letters have been given a color to match the curve that will be draw so the user can match the radioactive curve to its radioactive decay rate. Below each text field for inputting radioactive decay is a drop down box to choose what the decay type is. They decay type will tell the program how fast the radioactive will decay. The possible choices are: years, days, hours and seconds. Decay types with years will decay in terms of years, while decay types with days will decay in terms in days. The graph will graph based on the range given, radioactive decay type and the radioactive decay.

The final feature is the calculation of the age of an object. Assuming the user has inputted the original amount of radioactive isotope, current amount, and the radioactive decay rate with its type, the age of the object will be displayed.

Similar to the graph section, the input for radioactive decay will have the decay rate and the decay type. At the top is the “calculate by”, which tells the program how to display the answer. It can display the answer in terms of years, days, hours or seconds. The program will calculate the answer and convert it to the type of answer desired. This section can also calculate the half-life of an object. The half-life is the time needed for an object to decay to half the amount. To calculate half-life, enter any number into the remaining amount and enter double the amount in the original amount field.

Design and Implementation

To create this program, many java.swing components are put together. JTextFields, Labels, JComboBox and Jbuttons are put together to create the design of the program. For the graphing area, Jpanel is used. When calculating the points for the radioactive curve, the points need to be translated into the x and y coordinates for the Jpanel window. To accomplish that, another set of equations need to be inserted into the program to translate the graph point into the window points. The new points are calculated as follows:

new.x = Ax + C

new.y = By + D

where A, B, C and D are calculated as follows:

C = window.left – A * graph.left

D = window.bottom – B * graph.bottom

Each of the points are the points for the top, bottom, left and right point of the graph area. The graph points refers to the original graph and the window points refers to the points in the JPanel screen. Using these equations to translate the points will allow the graph in the window screen to correctly display.

This program is useful to many users; however, users who are studying radioactive decay or have an interest in radioactive decay will find the program more useful. This program was designed to improve the user experience in using a radioactive decay applet. This program contains features that we believe will help the user in comparing different radioactive curves with each other. Other applets that we have seen, graphs one curve and that is the end of its abilities. If a user wanted the age calculated, they will need to locate another website that contains an applet that will calculate age of the object or the half-life of an object. The result of the project can be seen in the screenshots above. In comparison to other applets for radioactive decay, we believe our program is the most useful because of its features. Other applications that we have seen, graphs one curve so the user is required to input another set of numbers to view a different curve. After viewing two different curves, we preferred the ability to compare the graphs without having to remember what the previous curve looked like. A direct comparison feature has been added to this applet. This program allows users to compare three radioactive decay curves in the same graph so it can be compared easily. The user can view the curves and determine which decay rate decreases faster by comparing to the other graphs. The user will be able to visually see the decrease of the curve. Some curves will drop to approximately zero near 20,000 years such as carbon while others will take more time. For example, potassium will take over five billion years, which will be approximately 250,000 times longer than carbon.

System Evaluation

This is a curvebank project to draw a radioactive curve and is a useful program for users to experiment and learn about radioactive decay. Our first goal was to draw the radioactive curve. When the user enters a radioactive rate, the original amount and the time range, the program will calculate the points and translate them into the applet window. One feature included in this program includes the ability to view three curves at once without inputting numbers again and graphing the curve a second time. Each curve is drawn in a different color, which allows a user to recognize which curve belongs to which radioactive decay rate entered since they will have matching colors. Another option in this program is a calculator that will give the year of the object if provided with enough information. It will calculate using all three radioactive decay rates so the user will not have to input another number to see another calculation. This also allows the user to compare the three years of the object, so the user can relate the radioactive isotope rates with the year of an object at that certain time. This feature can also be used to calculate points on the graph. If the user wants to know the half-life of an object, the user can input half of the original amount entered to have the half-lives calculated. This feature also allows the user to calculate points on the curve. For example, if the user wants to know the year when it reaches twenty percent of the original amount, the user will just have to input the amount into the text field.

This program has been tested to work on many browsers. To view the applet, JRE is needed to run applets on a browser. This program has been tested on two machines, a PC and a Macintosh. On a PC, internet explorer and firefox will work perfectly. However, on a Macintosh machine the tabbed panes appear to overlap each other. After loading each tab a few times, the applet will begin to correctly show. Matt, who works with Shirley Gray on uploading the files on the server, says that it has something to do with the Macintosh machines not displaying the GUI correctly.

Conclusion

From this project, the most important lesson that we have learned is java 2D. Java 2D allows the programmer to draw various shapes such as circles, rectangles and lines. To learn the more advanced java 2D functions, we must start at the beginning. This program allowed me to learn a new feature of java that we never had the time to learn. The beginning of any learning process is hard until a person become accustomed to it. Afterwards, it becomes slightly easier. Another lesson we learned is applets. Before beginning this project, we did not know how to create any applet programs. The only thing we knew is that some internet programs use applets to run applications such as yahoo games.

References

Deitel, H.M and P.J. Deitel. Java How to Program. New Jersey: Prentice Hall, 1999.

Java 2D API. Sun Microsystems. <

Keeton, Brian, Chuck Carvaness and Geoff Frieses. Special Edition Using Java 2

Standard Edition. Indiana: QUE. 2001.

Lesson: Packaging Programs in JAR Files. Sun Microsystems. 1 May 2006

<

Radioactive decay. 4 June 2006. Wikipedia. 1 May 2006. <

wiki/Radioactive_decay>