Forums - Open Redstone Engineers

Full Version: Quadratic Grapher - Ice's Return
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After a 5+ month hiatus from redstone, I'm starting again with a medium-sized project - in particular, the second iteration of my grapher. Pictures will be posted as the project grows.

Features:
  • Constant, linear, and quadratic graphing
  • Four 16x16 quadrants
  • "Filled-in" curves
  • 2 bit signed coefficients
  • Fast, multiplication-free algorithm

Pictures:

[Image: W64PEqe.png]

The algorithm:

In pseudocode, the algorithm is as follows (with a, b, c the coefficients of the quadratic ax^2 + bx + c):
Code:
x := 0
y := c
e := a
while plotting:
    plot(x, y)
    x += 1
    y += (e + b)
    e += (a >> 1)

Explanation: coming soon
very nice, i wish you luck! Smile
I've just posted the algorithm. I... may or may not explain it in this thread.
My comments:
Why start x at 0? Unless you plan to mirror the image
AFAIK formula is just derived from F(x+1) - F(x)
(09-03-2014, 09:59 PM)͝ ͟ ͜ Wrote: [ -> ]My comments:
Why start x at 0? Unless you plan to mirror the image
AFAIK formula is just derived from F(x+1) - F(x)

1. Yes, I do.
2. Aren't you smart?
You bet your goddamn ass I am