fun with curves
by Orion Elenzil · 10/22/2010 (3:09 pm) · 4 comments
i haven't been using GG technology for about a year now, but for some reason this still feels like my tech-blogging home.
i spent some weekend time recently writing a general 2D parametric equation plotter in javascript. why ? because i love math, and geometry especially. a parametric curve is one where both variables (x and y) are functions of some other parameter, t. eg, the parametric equation for a diagonal line is {x = t, y = t} and for a circle is {x = cos(t), y = sin(t)}. this has been done before in many forms, but i was also motivated to re-do it for a few reasons. primarily i wasn't able to find one which had all these features:
* arbitrary function input.
* cartesian (x, y) or polar (theta, r) form.
* "associated curves" such as the pedal curve.
* animation.
additionally, i didn't find any in javascript, and i love javascript because of it's highly portable nature and improving performance.
anyhow,
that's the haps.
if you like math and/or geometry, you might have fun playing with it:
---> elenzil.com/progs/curves <---
i spent some weekend time recently writing a general 2D parametric equation plotter in javascript. why ? because i love math, and geometry especially. a parametric curve is one where both variables (x and y) are functions of some other parameter, t. eg, the parametric equation for a diagonal line is {x = t, y = t} and for a circle is {x = cos(t), y = sin(t)}. this has been done before in many forms, but i was also motivated to re-do it for a few reasons. primarily i wasn't able to find one which had all these features:
* arbitrary function input.
* cartesian (x, y) or polar (theta, r) form.
* "associated curves" such as the pedal curve.
* animation.
additionally, i didn't find any in javascript, and i love javascript because of it's highly portable nature and improving performance.
anyhow,
that's the haps.
if you like math and/or geometry, you might have fun playing with it:
---> elenzil.com/progs/curves <---
#2
Tried the js code. I just made a Rebel Alliance sign!
10/22/2010 (10:56 pm)
I knew from the title it was gonna be your blog, heh. Nice to see an update from you, Orion - even if it is just a few lines. I was hoping to hear about the projects you've been working on. Anything math related?Tried the js code. I just made a Rebel Alliance sign!
#3
10/23/2010 (11:19 am)
Good to see you posting Orion. I've always enjoyed seeing you talk math -- and all your cool little programs too :)
#4
good to hear from you.
i'm working these days on a facebook game, both on the flash client and the C++ back-end.
we've pretty much written our own mmo engine, it's been fun.
idle-games.com
our first title is in closed beta, and should be opening the doors up in the next couple months.
for the Curves thing the next step is to provide a way to share the equations.
eg, encode all the params up in the URL.
10/23/2010 (9:52 pm)
hey guys !good to hear from you.
i'm working these days on a facebook game, both on the flash client and the C++ back-end.
we've pretty much written our own mmo engine, it's been fun.
idle-games.com
our first title is in closed beta, and should be opening the doors up in the next couple months.
for the Curves thing the next step is to provide a way to share the equations.
eg, encode all the params up in the URL.

Associate Orion Elenzil
Real Life Plus
given any curve, the "pedal" of that curve is a new curve which is a function of the original curve and some arbitrary point in space. specifically for the pedal, for each point on the original curve you make a new point by taking the tangent to the curve at that point and then projecting the arbitrary point onto the tangent. it looks cool. in the javascript app above, the arbitrary point is naturally the cursor position.