math

Constant speed for wheel of any radius when setting speed in radians per second?

In box2d physics engine I can set a motor speed for a joint on my wheel in Radians/Second. What would be an expression I could set the speed to so the final actual "speed" of the wheel would be the same regardless of wheel radius. Presently, I'm setting the Wheel speed as a constant, wheelSpeed = 20. But this has the effect of making...

The Hungarian Algorithm (Also Munkres' Assignment Algorithm)

I've stumbled on this algorithm recently and am having difficulty explaining it to myself. The algorithm solves the assignment problem in O(n4) (and apparently can be improved to O(n3)) but I can't see why. Intuitively I can see that the algorithm would tend to find good to optimal solutions but I can't see a proof! All the proofs I hav...

Suggestions for factorising polynomials

As part of some volunteer work for our local school. I was wondering about putting some kind of GUI (Windows) software together to guide the students through the process of factorising polynomials e.g. a step-by-step guide of how to get from: x**2 + 2x - 3 to (x + 3)(x - 1) This would preferably be C# but Java is also OK. There is c...

Basic Math Book for a Programmer

After a decade(s) of writing web applications, I have realized that I have forgot most of my high school (not to mention college) math. Now I would like to try to learn the math all over again, starting from the basics. I mean, really basic stuff. Maybe in some distant future I will need this in order to lend some job in financial indust...

datatype for math calculations like BMR function

Hi, I'm writing a BMR function, should I be using a decimal type as my return value for highest percision? (C#) ...

GIS Draw a parabola flight path in kml for google earth

Hi, I have to display flight paths on google earth and (still I got the exact flight plan path) want to show in a parabola way (markting side). From the taking off to the landing points. Basically I'm looking for the math formula to calculate latlng point with altitudes to display the parabola path. I see how to do the parabolic view wi...

Is Multiplying the Inverse Better or Worse?

When dealing with double data types is multiplying by the inverse better or worse? Which way is faster? Which way uses less memory? Which way is preferred? How does MSIL handle this? SquareInches = MMSquared / 645.16 SquareInches = MMSquared * 0.0015500031000062000124000248000496 NB: 10K users will note that this is a duplica...

Normal Distribution function

edit So based on the answers so far (thanks for taking your time) I'm getting the sense that I'm probably NOT looking for a Normal Distribution function. Perhaps I'll try to re-describe what I'm looking to do. Lets say I have an object that returns a number of 0 to 10. And that number controls "speed". However instead of 10 being t...

Modulo with long long integers in Objective C

I'm trying use the modulo operator (%) on long longs, and it seems to return 0 if the number is above the range of an unsigned int. Is there an operator or function that I should be using instead, or should I roll my own? -- Update: sorry for the lack of example code before, I was in a hurry, heading out the door -- Here's the code: l...

How can I divide two integers to get a double?

How do I divide two integers to get a double? ...

What is the algorithm to convert an Excel Column Letter into its Number?

I need an algorithm to convert an Excel Column letter to its proper number. The language this will be written in is C#, but any would do or even pseudo code. Please note I am going to put this in C# and I don't want to use the office dll. For 'A' the expected result will be 1 For 'AH' = 34 For 'XFD' = 16384 ...

Clear/Standard name for a Unit Range [0->1]

Hi, I'm writing a Range class at the moment and I'm looking for a good name for the common range [0->1]. If it was a vector of length 1, I would call it a Unit vector. Is there a clear name to give this range/interval? Possibly a Unit Range? ...

Calculating point on a circle's circumference from angle in C#?

I imagine that this is a simple question, but I'm getting some strange results with my current code and I don't have the math background to fully understand why. My goal is simple, as stated in the title: I just want to find the point at some distance and angle from a center point. My current code: Point centerPoint = new Point ( 0, 0...

What should I really name the variable which represents the sum of a vector's components?

Is there a valid math term? I could just name this guy "sumXY", but that is (a) lame, and (b) not scalable, since going up a dimension would require a rename. While typing I thought of "componentSum", but I'd love to know if there's a real name for it. ...

algorithm to find best combination

Assume that I have a list of 100 products, each of which has a price. Each one also has a energy (kJ) measurement. Would it be possible to find the best combination of 15 products for under $10 of which the sum of the energy (kJ) was greatest, using programming? I know C#, but any language is fine. Cheers. Update: Having a bit of tro...

How to calculate the odds of a collision in hash algorithms?

Say I have a hash algorithm, and it's nice and smooth (The odds of any one hash value coming up are the same as any other value). Now say that I know that the odds of picking 2 hashes and there being a collision are (For arguments sake) 50000:1. Now say I pick 100 hashes. How do I calculate the odds of a collision within that set of 10...

Formula for a orthogonal projection matrix?

I've been looking around a bit and can't seem to find just what I"m looking for. I've found "canonical formulas," but what's the best way to use these? Do I have to scale every single vertex down? Or is there a better way? A formula would really help me out, but I'm also looking for an explanation about the near and far z planes relativ...

Math symbols in vim

Does anyone know how to have vim convert the html entities of math symbols into the math characters? For example: ≠ becomes ≠ ∴ becomes here is a table with the symbol html entities http://barzilai.org/math_sym.htm Updated: Solved, bignose came through with the solution. using the :digraphs functionality of Vim. with a ...

how to do a program to solve three functions using improve euler's method?

I was given three functions: dx/dt = a(y-x) dy/dt = x(b-z)-y dz/dt = xy-cz All the variables are set by the user. I can do it if its just the basic one-equation problem. But now, i need to make a program using the improved Euler's method. Can the method solve three functions at the same time? Or can I use the Runge-Kutta method? ...

How does one convert world coordinates to camera coordinates?

I have an input 3D vector, along with the pitch and yaw of the camera. Can anyone describe or provide a link to a resource that will help me understand and implement the required transformation and matrix mapping? ...