Plot These Curves

Introduction

The equations for several curves were mentioned in the video Why π is in the normal distribution. I thought plotting these curves would be an interesting project.

Use graphics.py. For more information click HERE . (download, install, documentation, etc.)

Use Cartesian coordinates centered in the graphics window. Scale and center the curve values to fit the window.

Project #1

Create your own Cartesian plot function and plot the following curves. (x,y origin in the center of the graphics window. Also draw the x,y axes.)

Note: This is a problem in translating equations into code and scaling data.

Y = 1/(1 + X2)

Y = 1/(1 + X4)

Y = e-x2

Y = e-x4

Y = e-1/e(|X| + 1/e)-(|X| + 1/e)

Y = (sin(πX)/(πX))2

Y = sin(X)

Project #2

Plot the curves using a Python plot package.

I suggest you use the pyplot or related modules.

matplotlib.pyplot (documentation and examples)

Miscellaneous

Coordinate conversion functions (window Cartesian)

Draw X,Y Axes

Coordinate conversion function with offset origin (Cartesian Window)