Additional material for gratuate students is listed in red.

Plot: How to plot a function and how to visualize the minute differences between plots

**Objective and motivation**:
Learn how to develop a program for plotting functions and for visualizing/exagerating dicrepancies between similar functions.

**What students should learn**:
How to install the Processing environment and use it to create interactive visualization applets, and to post them online
How to use Processing to read/write files and to plot functions
How to smoothly refine a plot by inserting inbetween values
How to show and exagerate the difference between two functions
How to produce pulsating animations that control the exageration factor

**Lecture slides**:
Installing and using Processing (ppt). Read, write, refine, plot functions and exagerate differences (ppt). Project 1 (ppt)

**Videos**:

**Assigned reading**: Chapter 1 (Introduction) and Chapter 3 (Graphics Primer) of the textbook,

**Optional reading**: article on visualization, Processing Reference page,

**Other resources**: Download Processing,
Applets written in Processing,

**Assigned project**: Post an applet that reads two very similar curves and let's the viewer investigate their differences. Write a short (2 page) paper describing the problem, discussing several possible solutions (with appropriate references), presenting the solution in your applet, and discussing its benefits and limitations.

**Software provided for Project 1:**
comparePlots (web page with applet), refine (source code)

**Data for testing**:
F.val, G.val

**Examples of exam questions**:
- How does visualization differ from graphic?
- How does scientific visualization differ from data visualization?
- How to modify two functions F(x) and G(x) so as to uniformely double their difference?
- Why is scaling up the difference between two functions not sufficient to visualize their small differences?
- Suggest a good way to visualize the small and large differences between two functions?
- Provide the Processing code for plot(float [] F) {} which plots a function using samples stored in table F.
- Let A=F[1], B=F[2], C=F[3], D=F[4]. Estimate F(2.5) using a cubic fit. Express it in terms of A, B, C and D.
- Explain how to produce an animation where a curve's vertical offset pulsates in the range [0,2]

**Research Challenges**:
You are given several plots for the same function. Each one is sightly different, due to numeric errors, manufacturing variability, or other factors. How would you compute the average of these plots? How would you visualize it to clearly show the local variability (uncertainty) information? Note that the engineer may not be only interested in the worst case (min,max) variability, but may want to appreciate some of the statistical distribution characteristics.