I have four 2d points, p0 = (x0,y0), p1 = (x1,y1), etc. that form a quadrilateral. In my case, the quad is not rectangular, but it should at least be convex.
p2 --- p3
| |
t | p |
| |
p0 --- p1
s
I'm using bilinear interpolation. S and T are within [0..1] and the interpolated point is given by:
bilerp(s,t)...
EDIT: Now a Major Motion Blog Post at http://messymatters.com/sealedbids
The idea of rot13 is to obscure text, for example to prevent spoilers. It's not meant to be cryptographically secure but to simply make sure that only people who are sure they want to read it will read it.
I'd like to do something similar for numbers, for an appl...
ACM Question:
Simulations involving service times and queues are fairly routine despite using statistical distributions to generate data of interest. Most physical systems are far more complex.
Given
Weight of a Towel
Surface Area of Towel
Dryer Volume
Dryer Max Temperature
Dryer Revolutions/Minute
Boiling Point of Water
Weight ...
For use in a rigid body simulation, I want to compute the mass and inertia tensor (moment of inertia), given a triangle mesh representing the boundary of the (not necessarily convex) object, and assuming constant density in the interior.
...
So here's my challenge. I have a spreadsheet that looks like this:
prod_id | pack | value | durable | feat | ease | grade | # of ratings
1 75 85 99 90 90 88 1
2 90 95 81 86 87 88 9
3 87 86 80 85 82 84 37
4 92 ...
What book would you recommend for Discrete Math?
Thanks.
...
I have a C++ application in which I need to compare two values and decide which is greater. The only complication is that one number is represented in log-space, the other is not. For example:
double log_num_1 = log(1.23);
double num_2 = 1.24;
If I want to compare num_1 and num_2, I have to use either log() or exp(), and I'm wonderin...
Well as the questions says...
An equation might be more meaningful in its math-notated form than it is in code. Being able to put math in comments could improve readabibity on my projects.
In .NET btw.
...
I have the matrix system:
A x B = C
A is a by n and B is n by b. Both A and B are unknown but I have partial information about C (I have some values in it but not all) and n is picked to be small enough that the system is expected to be over constrained. It is not required that all rows in A or columns in B are over constrained.
I'm l...
The JDK documentation for java.lang.String.hashCode() famously says:
The hash code for a String object is computed as
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation.
The standard implementation of ...
I know that computer vision involves a lot of math, but I need some tips about how programmers gain that knowledge. I've started to use the OpenCV library but I have some major problems in understanding how the math works in the algorithms.
In college I have studied some math and we worked with matrices and derivatives, but I didn't p...
We are supposed to calculate e^x using this kind of formula:
e^x = 1 + (x ^ 1 / 1!) + (x ^ 2 / 2!) ......
I have this code so far:
while (result >= 1.0E-20 )
{
power = power * input;
factorial = factorial * counter;
result = power / factorial;
eValue += result;
counter++;
iterations++;
}
My problem now is tha...
Before everyone jumps on me for outsourcing my homework, my question is not a question on my homework. I'm just having a problem getting some stuff to draw properly.
I'm trying to draw lines perpendicular to a plane. I know the three points in space the make up the plane. From those coordinates I can calculate vectors and get the normal...
How to find whether a line intercepted in a polygon
...
I am familiar with O'Rourke's Computational Geometry in C, but it feels a little dated. Any recommendations for books, preferably with source code?
...
What are some good tips and/or techniques for optimizing and improving the performance of calculation heavy programs. I'm talking about things like complication graphics calculations or mathematical and simulation types of programming where every second saved is useful, as opposed to IO heavy programs where only a certain amount of speed...
I'll try to explain this problem the best way i can with code:
double power = 5000;
//picked up 5 power ups, now need to increase power by 10% per powerup
power += 5 * (power * .10);
//later on...ran into 5 power downs need to decrease power back to initial hp
power -= 5 * (power * .10);//7500 - 3750 -- doesn't work
So what i need i...
Can someone explain the second, third and fourth rows in the calculation? I cannot understand the calculation "66 fa = 9c". The sum is clearly over "ff", so I am confused. The topic is simple encryption algorithm.
Source
...
Hi,
Its friday, and in local time the clock is 3.22pm, so my brain wont give me a solution, so i ask:
Im trying to write a function/algorithm in Actionscript 3.0 that gives me the most average positions of x number of positions along a path of y number of available positions.
Y is always larger than X of course.
The background is, I ...
How can the following function be implemented in various languages?
Calculate the (x,y) point on the circumference of a circle, given input values of:
Radius
Angle
Origin (optional parameter, if supported by the language)
...