Hi all,
I have a set of 3D boxes with arbitrary dimensions, translations and rotations.
I need to force the boxes not to intersect by scaling them by a single constant over their 3 dimension components.
At the moment I am doing this iteratively by checking for intersection and then reducing the scaling iteratively until there is no i...
Given a quaternion q, and three 3D vectors (vx, vy, vz) which form coordinate axes, which can be oriented in arbitrary direction, but are all perpendicular to each other, thus forming a 3d space.
How can I check if the quaternion q is rotated to the same direction (or opposite direction) as some of the 3D vectors (vx, vy, vz)?
...
Say you have 2 numbers, for each typical mathematical operation is it possible to predict (without significant overhead) whether those operations would result in an overflow of the type which those numbers are currently represented as?
...
I'm using OpenTK for a game in C#, and it doesn't come with the project and unproject functions, which convert between world and screen coordinates. Well, it does, but they're deprecated and I couldn't get them to work. I took a shot at implementing them myself based on the opengl spec (see left hand menu, gluProject and gluUnProject, an...
Given an object quaternion q, and basis vectors vx, vy, vz forming a 3D space, how can I check whether the quaternion is parallel or perpendicular to all of the basis vectors?
For example, I have basis vectors:
vx = (0.447410, 0, -0.894329)
vy = (0, 1, 0)
vz = (0.894329, 0, 0.447410)
and quaternion
q(w,x,y,z) = (-0.973224, 0, -0.22986...
I know this may seem like a math question but i just saw this in a contest and I really want to know how to solve it.
We have
a (mod c)
and
b (mod c)
and we're looking for the value of the quotient
(a/b) (mod c)
Any ideas?
...
I have a quite big development experience and I wonder is it possible to start learning math from scratch. I forgot almost everything I know, even school program. Please give me some guidance on this. Where to start what to do. Are there any math books for developers. May be with exercises to write code or experiment, etc...
Any help i...
Does anyone know of a basic beginners tutorial on how to read mark up like this notation when talking about algorithms or what this type of markup is officially referred to as so I know what to google for?
taken from here.
...
Given a set of points in 2D the resulting polygon can be convex, concave or 'not a polygon'. The definition that I am using for 'not a polygon' is that the line connecting two points crosses another 'polygon' line. I know about taking the dot product (Green's Theorem?) to show convexity and concavity of a polygon. I know that the sum of ...
Hi everyone!
I just saw this question and have no idea how to solve it. can you please provide me with algorithms , C++ codes or ideas?
This is a very simple problem. Given the value of N and K, you need to tell us the value of the binomial coefficient C(N,K). You may rest assured that K <= N and the maximum value of N is 1,000,000,...
How do I add/subtract/multiply and divide integers using only 20 bits instead of 32 bits in C#?
Will these operations be faster than 32bit precision?
For example this .NET library is featuring 20 and 30 bit arithmetic with different speeds: http://complex-a5.ru/polyboolean/index.html
Thanks.
...
I have a basic solution file (.sln) where I was able to reproduce a problem I have been facing recently.
It contains 3 projects:
1.) MathTest.lib - containing methods that might cause a mathematical error, like acos(1.1).
2.) MathTestDll.dll - calls the methods from the above lib.
3.) UnitTest.exe - calls the exported method in the DLL ...
As you know finding maximum independent set is NP. Is there an algorithm to find out whether a given graph has an Independent set of at least k vertices? Note that we don't want to find it. We just want to find out if such thing exists.
...
Hi all
I started reading 'Introduction to Algorithms' today, but I've gotten a bit confused over one of the exercises.
Exercise 1.2.2 asks the reader
Suppose we are comparing implementations of Merge sort and Insertion Sort on the same
machine. For inputs of size n, insertion sort runs in 8n^2 steps,
while merge sort runs in...
How does the system perform the 2^56 modulo 7, if it's 32 bits operating system in cryptography for example?
And how it stored in memory?
...
I have the following scenario where i invest variable amount of principal every month,
Investment Month
$300 Jan
$200 Feb
$100 Mar
and i get a return of,
Returns Month
$1000 Apr
How do i calculate the nominal annual interest rate if the amount is compounded monthly?
...
Possible Duplicate:
Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7
I was asked a simple question (purely in interest), in it there's a function which supplies a random number between 1 and 6, now with based off that function you need to...
Is there any service that provide a public API to perform mathematical calculations (such as linear algebra decompositions etc)?
Thanks
...
Full Disclosure: I am a mathematical moron
int hours = totalSeconds / (60 * 60);
int minutes = (totalSeconds / 60) % 60;
int seconds = totalSeconds % 60;
//int milliseconds ???
calculatedExposureTime.text = [NSString stringWithFormat:@"%02d:%02d:%02d:%02d", hours, minutes, seconds, milliseconds];
Say totalSeconds was a fraction of a s...
How would i turn the secant method of iteration into php?
The formula is xi+1= xi - (f(xi) (xi-xi+1))/f(xi)-f(xi-1)
where f = function and i is an iteration.
so xi+1 is the next iteration after xi
So far I have seen this, but there is somethning wrong somewhere in it so i want to make one from scratch, unless someone here can see wha...