Page 2 of 2
Posted: Tue Oct 04, 2005 8:27 am
by Maugrim_The_Reaper
Big text book with lots of squiggly symbols and numbers...
Just kidding - I do need a reference though. My memory though vast is not infallible. Also most math texts will generally have fair organisation of math branches. Maybe I just like my reference texts too much...
Posted: Tue Oct 04, 2005 9:19 am
by sweatje
One thing I have not seen replicated in PHP is a three dimensional graphing library. JpGraph works well for 2D charts, but I have not stumbled across anything which does surfaces, etc.
Posted: Tue Oct 04, 2005 11:30 am
by Maugrim_The_Reaper
So I'm NOT the only one looking for that..

Posted: Tue Oct 04, 2005 4:13 pm
by Charles256
I have a math book. I actually own three right now, a calculus book, a linear algebra book, and an advanceds math techniques book (which I don't think is possible to explain to a computer. ) . BTW, our project is also going to branch into 3D graphs after we get the math library done.

It'll just take some time is all.
Posted: Tue Oct 04, 2005 4:21 pm
by Charles256
the source forge project got approved in under 12 hours

Either way here is the unix name php-mat-lib.

Just had to share the good news.
Posted: Wed Oct 05, 2005 4:44 am
by Maugrim_The_Reaper
Making a few links... I generally get involved in projects if they are interesting and possibly applicable to my game development. This lib seems to, there's also another project LIFE (see the General Discussion "Let's build a rainforest" topic). There may be a little overlap in that LIFE may require certain math functions at a future point. I assume any LIFE project will be looking at distance and possibly other more complex operations as it proceeds.
Might be interesting to track that project, and see if there's any overlapping both projects could unite on...
It's a possibility.
Posted: Wed Oct 05, 2005 7:22 am
by patrikG
take a piece of string, tie to one point, go to other point, make knot where second point meets string. Measure string.
Voila - and without even touching a computer. Don't like technology anyway, they used to make things out of wood, I have you know.
Posted: Wed Oct 05, 2005 7:53 am
by Charles256
there's something ironic about a man with near 3k posts on a message board saying he doesn't like technology:)
Posted: Wed Oct 05, 2005 8:41 am
by Ambush Commander
take a piece of string, tie to one point, go to other point, make knot where second point meets string. Measure string.
Or you could bust out the plain old paper and pencil and figure out the 3D distance using the square root of the sums of the squares of the differences between x y and z.
Posted: Wed Oct 05, 2005 9:02 am
by Maugrim_The_Reaper
I hear tape measures are very useful...
Posted: Wed Oct 05, 2005 9:05 am
by Grim...
3D distance is a piece of <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>. It's just 2 triangles, innit?
Posted: Wed Oct 05, 2005 12:18 pm
by Charles256
on topic you buggers.. :: kicks them all:: 3d distance is the same formula as 2d distance, just add your z's.
Posted: Wed Oct 05, 2005 12:30 pm
by Ambush Commander
Now, what would really be cool is if you create a new datatype to represent polynomials.
Posted: Wed Oct 05, 2005 12:38 pm
by Skara
that doesn't sound hard to me, until you get into the messing with y/f(x). Just use a string and replace the second... err.. something like this:
$p = new Polynomial("y=2*x",'y','x');
If you always used y and x, you wouldn't need the second two params. You could just split it at the = and do the math for x/y if you wanted to solve for something. If you wanted to perform functions on them it would be a bit harder, but doable. It all depends on what you want to do with the polynomials.
Posted: Wed Oct 05, 2005 1:10 pm
by Ambush Commander
Probably this.
Code: Select all
class Polynomial {
function getCoefficient($degree) {}
function &multiply(&$polynomial) {}
function &add(&$polynomial) {}
function &subtract(&$polynomial) {}
function evaluate($x) {}
function getRoots() {} //we'll need Complex for this one...
function &differentiate() {} //polynomial return
function integrate($a, $b) {} //no indefinites...
function getDegree() {}
function getVertices($lowerbound = null, $upperbound = null) {}
function graph() {} //heh heh...
}