Forums - Open Redstone Engineers
Quadratic Grapher - Ice's Return - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Projects & Inventions (https://forum.openredstone.org/forum-19.html)
+---- Forum: In Progress (https://forum.openredstone.org/forum-20.html)
+---- Thread: Quadratic Grapher - Ice's Return (/thread-4634.html)



Quadratic Grapher - Ice's Return - Iceglade - 09-02-2014

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


RE: Quadratic Grapher - Ice's Return - greatgamer34 - 09-02-2014

very nice, i wish you luck! Smile


RE: Quadratic Grapher - Ice's Return - Iceglade - 09-02-2014

I've just posted the algorithm. I... may or may not explain it in this thread.


RE: Quadratic Grapher - Ice's Return - jxu - 09-03-2014

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)


RE: Quadratic Grapher - Ice's Return - Iceglade - 09-03-2014

(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?


RE: Quadratic Grapher - Ice's Return - jxu - 09-06-2014

You bet your goddamn ass I am