               (* a-2 (Math/pow x 2))
               (* a-3 (Math/pow x 3))
               (* a-4 (Math/pow x 4))))))
-
-(thickness-function (hash-map :corrected-thickness 40) 0)
 
 (defn camber-function
   "Takes in a corrected maxiumum camber, corrected camber position, and an x value.

  (theta =  atan(G)), x + thickness-function * sin(theta)."
  [individual x]
  (let [thickness (individual :corrected-thickness)]
  (+ x (* (thickness-function thickness x)
          (Math/sin (Math/atan (gradient-function individual x)))))))



  (theta =  atan(G)), camber-function - thickness-function * cos(theta)."
  [individual x]
  (let [thickness (individual :corrected-thickness)]
    (- camber-function (* (thickness-function thickness x)
          (Math/cos (Math/atan (gradient-function individual x)))))))

;;;---------------- Area Functions ---------------

(defn left-rule
  "Creates a lazy seque of points to evaluate a function at for a left rule riemann sum
  Takes a number of particians"
  [pieces]
  (range 0 1 (/ 1 pieces)))

(defn right-rule
  "Creates a lazy seque of points to evaluate a function at for a left rule riemann sum
  Takes a number of particians"
  [pieces]
  (range (/ 1 pieces) (+ (/ 1 pieces) 1) (/ 1 pieces)))

(defn riemann-sum-abstracted
  "Will do a riemann sum on the function:
  State will be a function, either left, right, or middle, based on the style of riemann sum.
  Pices is how boxes it makes, aka the resolution of the riemann sum"
  [function state pieces]
  (reduce #(+ %1 (* (/ 1 pieces) (function %2))) 0 (state pieces)))

(defn riemann-sum-production
  "same as riemann sum but if might be faster, you need to figure our left, right, middle
  functions on your own"
  [function start-x end-x increment pieces]
  (reduce #(+ %1 (* (/ 1 pieces) (function %2))) 0 (range start end increment)))

;;(defn lift-function
;;  [])
(right-rule 4)

