4 Element Vector (3D Math)
Why is there a W term in a lot of 3D API's Vector class (i.e. Vector4(x, y, z, w) ) ? Are there math operations that absolutely require the W term? ...
Why is there a W term in a lot of 3D API's Vector class (i.e. Vector4(x, y, z, w) ) ? Are there math operations that absolutely require the W term? ...
What is the fastest way to calculate the n-th root of a number? I'm aware of the Try and Fail way, but I need a faster algorithm. ...
Hi, Having a bit of a brain freeze on how to do this. I have an image of an area of a soccer field which the user clicks on to indicate where something occured. I want to store the coordinates in real world units in my database so that I could change the image at a later time. However, I can't figure out the formula to do this (ignori...
It's more math question than programming, but.. I have some discrete points, with time t_n and value u(t_n). i perform discrete fourier transormation using values u(t_n). now i have some complex values, as i understood absolute value is amplitude and argument is frequency, right? well my teacher said i need to compute SOMETHING using t_n...
Hello, I am a fairly decent programmer, but I suck at math. I need help understanding this problem so i can write a program to solve it. I dont really understand the formula. https://cs.harding.edu/easel/cgi-bin/view?id=4896 ...
Possible Duplicate: Useful math for programmers I'm a 22 year old ASP.NET/C#/Front-End developer with roughly 5.5 years experience. Unlike some (well probably most) of you, I didn't go to University to do a CS degree (*sigh*). The reasons behind that are, well... complicated, so I ended up teaching myself by reading books, artic...
i want to show some data in percent. i have a mathematics formula like: (qty(S) + qty(B))/qty(id)*100% could i show the result for example like 25%? how do i do that? ...
Which investment gives a better return, assuming the face value of shares to be Rs.10? A) 5% stock at 75, subject to 30% income tax b) 4% stock at 90, tax free ...
I have a somewhat math-oriented problem. I have a bunch of bitfields and would like to calculate what subset of them to xor together to achieve a certain other bitfield, or if there isn't a way to do it discover that no such subset exists. I'd like to do this using a free library, rather than original code, and I'd strongly prefer somet...
I currently have sensor data being dumped into a database. This is raw data, and needs an equation applied to it in order for it to make any sense to the end users. The problem I have, is that I do not know most of the formulas yet, and would also like the program to be flexible enough that when a new sensor is added to the system, the ...
Hey guys, I have been looking all over google and cannot find a consistent method for finding the signed distance between a point and a plane. My planes are defined by a point and a normal. Here is what I have. JGCameraPlane p; // Calculate D part of plane equation float d = -dotProduct(p.normal, p.point); What do I do from here? Did ...
I'm reading through SICP, and the authors brush over the technique of average damping in computing the fixed points of functions. I understand that it's necessary in certain cases, ie square roots in order to damp out the oscillation of the function y = x/y however, I don't understand why it magically aids the convergence of the fixed po...
I need to implement a function which normalizes coordinates. I define normalize as (please suggest a better term if Im wrong): Mapping entries of a data set from their natural range to values between 0 and 1. Now this was easy in one dimension: static List<float> Normalize(float[] nums) { float max = Max(nums); ...
I want to create a native windows port for the sagemath project. Currently, an ongoing cygwin port exists. But, developers at Sage-Windows-Devel group told me that a windows port would be much more appreciated. Since, it takes a long time to build sage using cygwin/gcc. Therefore, I want to create, say MSVC project files for each of the...
how to compute the limit of f(x)=(log x)^(log x)? the logs have base 2. Is there a way to simplify the function further? many thanks in advance. ...
I need to choose an aray item based on the values of 4 variables, as shown below, in C. 0 | 1 | 0 | -1 | array[1][0] -1 | 0 | 1 | 0 | array[1][1] 0 | -1 | 0 | 1 | array[1][2] 1 | 0 | -1 | 0 | array[1][3] 1 | 0 | 0 | -1 | array[2][0] 1 | 0 | 0 | 1 | array[2][1] -1 | 0 | 0 | 1 | array[2][2] -1 | 0 |...
I need to convert strings with valid python syntax such as: '1+2**(x+y)' and get the equivalent LaTeX: $1+2^{x+y}$ I have tried sympy's latex function but it processes actual expression, rather than the string form of it: >>> latex(1+2**(x+y)) '$1 + 2^{x + y}$' >>> latex('1+2**(x+y)') '$1+2**(x+y)$' but to even do this, it requ...
OK, so I have a play field of 512x512 which wraps around, -32 becomes 512 for both x and y. Now I need to calculate the angle between two entities, I have the following code as a kind of workaround, it works most of the time, but sometimes it still fails: Shooter.getAngle = function(a, b) { var ax = a.x; var bx = b.x; if ...
Two DFAs (Deterministic Finite Automaton or Deterministic Fininte-State Machines - Which will be called DFAs from here on) Defined over the set DFA 1: L1 = {Q1, E, D1, s1, F} DFA 2: L2 = {Q2, E, D2, s2, F} Q is the list of states. Ex 1, 2, 3, 4 or a, b, c, d E is the the language Ex. 0, 1 D is the transition set Ex. {(a,0,b)} state a ...
Reading through more SICP and I'm stuck on exercise 1.3.8. My code works properly for approximating 1/phi, but doesn't work for approximating e - 2. (define (cont-frac n d k) (define (frac n d k) (if (= k 0) 1.0 (+ (d k) (/ (n (+ k 1)) (frac n d (- k 1)))))) (/ (n 1) (frac n d k))) (define (eulers-...