Double Origin Graphing
Posted: Thu Apr 15, 2010 5:14 am
I graphed a = 2b:
So I was in a lecture about maths a few days ago and heard about these wacky things called Double Origin Graphs, where there are two origins (funnily enough) and each point on the graph is defined by the angle between each point (eg 1,2) would be a point 1 rad from origin 1 and 2 rads from origin 2. "linear functions" in this coordinate system are to the form a = nb+c, where a is angle from O1, b is angle from O2, n is any real number and c is a constant (also any real number), and come out as crazy patterns.
Anyway, I decided to create something to draw graphs for double origin coordiant systems.
Currently this project doesnt do recursion (and it should, as the graphs get way more funky as the revolutions tick on), or constants (which it also should, but i was neglectful). It graphs a function not as a line but as a cloud. I did this because drawing lines is for pansies and real men like their graphs with a healthy spattering of dithered neon glow, but mostly cause line drawing wasn't working , and it looked cooler this way anyway.
Oh yeah, drawing is broken when O2 is under and to the left of O1. You'll get a nice black area between them.
Anyone wanting to get recursion going, fix the draw function or put in a line drawing mode, be my guest.
EDIT: oh yeah, quick note, there's no real text editing and I didn't put error handling in. don't try and go ahead with NaNs in the fields, it doesn't like that.
DROPBOX HERE
So I was in a lecture about maths a few days ago and heard about these wacky things called Double Origin Graphs, where there are two origins (funnily enough) and each point on the graph is defined by the angle between each point (eg 1,2) would be a point 1 rad from origin 1 and 2 rads from origin 2. "linear functions" in this coordinate system are to the form a = nb+c, where a is angle from O1, b is angle from O2, n is any real number and c is a constant (also any real number), and come out as crazy patterns.
Anyway, I decided to create something to draw graphs for double origin coordiant systems.
Currently this project doesnt do recursion (and it should, as the graphs get way more funky as the revolutions tick on), or constants (which it also should, but i was neglectful). It graphs a function not as a line but as a cloud. I did this because drawing lines is for pansies and real men like their graphs with a healthy spattering of dithered neon glow, but mostly cause line drawing wasn't working , and it looked cooler this way anyway.
Oh yeah, drawing is broken when O2 is under and to the left of O1. You'll get a nice black area between them.
Anyone wanting to get recursion going, fix the draw function or put in a line drawing mode, be my guest.
EDIT: oh yeah, quick note, there's no real text editing and I didn't put error handling in. don't try and go ahead with NaNs in the fields, it doesn't like that.
DROPBOX HERE