math

how do i convert speed and bearing to azimuth and elevation in c#?

i have no clue to it. can someone help me out? ...

Back with another math question

What happens when memdiff and/or totaldiff are negative? I was hoping for a negative memperc, but it doesn't seem like that's happening. Messing around in Python gives all sorts of confusing results when I plug in negative numbers. local mem, percent, memdiff, totalMem, totaldiff = GetMemUsage("StarTip") if mem then if totaldiff ==...

"Center of Mass" between a set of points on a Toroidally-Wrapped Map that minimizes average distance to all points

edit As someone has pointed out, what I'm looking for is actually the point minimizing total geodesic distance between all other points My map is topographically similar to the ones in Pac Man and Asteroids. Going past the top will warp you to the bottom, and going past the left will warp you to the right. Say I have two points (of ...

Mathematic WYSIWYG html editor

I'm looking for a mathematical WYSIWYG HTML editor. So it has to be capable of producing well formed mathematical expressions like in this example: http://www.blau-test.be/files/example.jpg ( the font really doesn't mather, considering it can be styled using css ) Pricing doesn't matter, but it can be free 2 offcourse. If it is , the c...

c# ordered combinations algorithm

Hi, I'm trying to develop a c# application that will generate a list of all possible permutations, within a limit, and cost. For example, I have a list of 80 jobs. Each job has a value (1-5) (typically 3) and each engineer has a limit of how much they can do, typically a value of 20. At the moment I've started by producing a list of ...

Calculate point and circle segment collision

If I have calculated an intersection point between a line segment and a circle, how can I tell whether or not this intersection point lies on a segment of the circle? I have the equations to tell whether or not a line segment intersects with the circle, and I also have the intersection point on that circle, but what I need to know is w...

Converting academic mathematical notation to C code

Those of you that are even moderately knowledgable of math will likely laugh, but I don't remember what much of the notation rules in math and I need assistance converting this into C code. Your help is greatly appreciated: 214 10,000 {(10,000 × [1+.0599/365] )} +300 answer = ────────...

How to get rotation angles of Image Plane relative to the World Plane?

So we have such situation: In this illustration, the first quadrilateral is shown on the Image Plane and the second quadrilateral is shown on the World Plane. [1] In my particular case the Image Plane has 3 quadrilaterals - projections of real world squares, which, as we know, have same size, lying on the same plane, with same rotat...

Ruby core Matrix vs NArray's NMatrix

There seems to be two matrix modules in Ruby that I've found Matrix: Part of core Ruby it seems NMatrix: Part of the NArray library At the moment it seems NMatrix is faster, has some more helpful methods, but require a bit more setup. Is there anyone with experience of both who can give a rough overview of why I should use one over ...

Text doesn't fade into right position due to multiplication issue in javascript

Hey all, It's strange that the same functions are being called here but the #group3 text doesn't fade into the right position. I think it's a math issue: var triggerID = $active.attr("rel") - 1; var image_reelPosition = triggerID * imageWidth; //The first time the 'rel' attribute is 2 and the second time the rel attribut...

PHP bizarre math

Hi, I'm very new to PHP...and I'm getting unexpected values for variable calculations: $var1 = $var2 * (((1 + $var3)^$var4)^$var5); I've verified that $var2 is 3, $var3 is 0.1, $var4 is 1, $var5 is 1.1 so, $var1 = 3*(((1+0.1)^1)^1.1) = 3.3316 but in PHP, $var1 = 3 if I change $var4 to 2, $var1 = 3*(((1+0.1)^1)^1.1) = 3.6999 but i...

From latex math formula to big jpeg file

Hello, I am wondering whether anyone knows a easy way to convert a latex math formula to a big jpeg file? Here is the latex math formula: \[ \lim_{u\rightarrow 0_+} \int_0^u \ud s \int_{-\infty}^\infty \frac{f(u-s,x-y)}{\sqrt{2\pi s}} \exp\left\{-\frac{y^2}{2s}\right\} \ud y \] Thanks! ...

Radius of projected Sphere

Hi again, i want to refine a previous question: How do i project a sphere onto the screen? (2) gives a simple solution: approximate radius on screen = world radius * cot(fov / 2) / Z with: fov = field of view angle Z = z distance from camera to sphere result is in clipspace, apply viewport to get size in pixels Now my problem ...

What is the formula to calculate the font-size for tags in a tagcloud?

I have a tag cloud and I need to know how can I change the font-size for the most used tags. I need to set a min-font-size and a max-font-size. ...

How would YOU compute IMDB movie rating?

I'm doing this only for learning purposes. I've no intentions of reversing the methods of IMDB. I asked myself I owned IMDB or similar website. How would I compute the movie rating? All I can think of is Weighted Average(which is nothing but Arithmetic Mean) For a movie data provided below computation would be (38591*10 + 27994*9...

Math.max seems to be returning the wrong answer

I have a list of double values that I don't know the range of and I want to find the maximum value. However, the Math.max function is giving a curious result for this sample code: double a = -100.0; double maxA = Double.MIN_VALUE; maxA = Math.max(maxA, a); System.out.println(maxA); And the output is: 4.9E-324 So for some reason, Do...

Problem using Java's Math functions to come up with a page number for view pagination

If I have 2 database records and 25 records per page, then the following code: System.out.println("page count: " + (double)2/25); results in this output: page count: 0.08 But because I am using this figure for pagination, I need the next highest integer, in this case: 1. Both Math.ceil and Math.abs produce the result 0 or 0.0. Ho...

Need help with a math trick question

Possible Duplicate: Easy interview question got harder: given numbers 1..100, find the missing number(s) Hi guys, I wasn't sure where to ask this but since this is an algorithmic question here it goes. I've come face to face with a math problem and can't seem to get over it for the last couple of days. It goes like this: Y...

[AS3] curveTo finding the curve point dynamically

Hi Everybody, My math knowledge has never been very broad, so this maybe a simple question but I'm not really sure. Basically I'm using the curveTo function to draw some lines for flight paths, what I'm not sure how to do is dynamically finding the curve points, so for example if you look at the ryan air site: http://www.ryanair.com/en/...

Making a circle out of . (periods)

I am trying to make a function that will draw a circle out of periods with only being given a starting x and y and a radius. Is it possible? I would like to have the full code for it will an explanation for how it works; I've been trying this for 1 year now and I still can't fathom how it may be done. ...