visualize slope field of mathematical functions
Go to file
2016-11-27 18:24:36 +03:30
app feat: add arrow heads 2016-11-25 13:28:41 +03:30
src feat: add arrow heads 2016-11-25 13:28:41 +03:30
test initial commit 2016-11-04 23:09:14 +03:30
.gitignore initial commit 2016-11-04 23:09:14 +03:30
LICENSE initial commit 2016-11-04 23:09:14 +03:30
minusy.png feat: add arrow heads 2016-11-25 13:28:41 +03:30
README.md Update README.md 2016-11-27 18:24:36 +03:30
Setup.hs initial commit 2016-11-04 23:09:14 +03:30
slope-field.cabal feat: add arrow heads 2016-11-25 13:28:41 +03:30
stack.yaml fix: don't use relative mathexpr 2016-11-04 23:14:58 +03:30
xpy.png feat: add arrow heads 2016-11-25 13:28:41 +03:30
xty.png feat: add arrow heads 2016-11-25 13:28:41 +03:30
ydx.png feat: add arrow heads 2016-11-25 13:28:41 +03:30

slope-field Open Source Society University - Data Science

I was studying this course on Integration when I encountered slope fields and I found them interesting!

So I thought I would give it a shot and try to write a program to draw slope fields myself! In order to read a mathematical function definition from input, I wrote mathexpr.

Get Started

If you haven't already, install Haskell Platform.

git clone https://github.com/mdibaiee/slope-field
cd slope-field
stack install
slope-field

Examples

Parameters:

  • dy/dx: derivative of the function you are trying to visualize
  • range: range of numbers to draw
  • estimation size: size of deltax which is used to draw the slope corresponding to a small point, 0.03 is usually a good number, but you might want to try out larger numbers to get a more detailed picture on some examples
dy/dx = 
x + y
range - format: (lower, upper): 
(-10, 10)
estimation size: 
0.03

x plus y

dy/dx = 
x * y
range - format: (lower, upper): 
(-10, 10)
estimation size: 
0.03

x times y

dy/dx = 
-y
range - format: (lower, upper): 
(-10, 10)
estimation size: 
0.03

minus y

dy/dx = 
y/x
range - format: (lower, upper): 
(-20, 20)
estimation size: 
0.1

y divided by x