equation of cone intersection

S

S. Nurbe

Hi,

How can I program this math. equation:
a1*n1 + a2*n2 + a3*n3 = cos(alpha1)
b1*n1 + b2*n2 + b3*n3 = cos(alpha2)
n1^2 + n2^2 + n3^2 = 1

The problem is, that when you solve for n1, n2 and n3 (anything else
is known) you get really huge results.
So is there maybe another way to compute this?
BTW:
These equations describe 0, 1, or 2 lines when two cones with the same
origin (cone ends) intersects. (Maybe anyone knows another way)

Thanks in advance,

S. Nurbe
 
H

Howard

S. Nurbe said:
Hi,

How can I program this math. equation:
a1*n1 + a2*n2 + a3*n3 = cos(alpha1)
b1*n1 + b2*n2 + b3*n3 = cos(alpha2)
n1^2 + n2^2 + n3^2 = 1

The problem is, that when you solve for n1, n2 and n3 (anything else
is known) you get really huge results.
So is there maybe another way to compute this?
BTW:
These equations describe 0, 1, or 2 lines when two cones with the same
origin (cone ends) intersects. (Maybe anyone knows another way)

Thanks in advance,

S. Nurbe

How are you computing this now? And what do you mean by "huge results"?
The third formula above pretty much restricts the values to all be under 1,
doesn't it? If the sum of their squares is one, how can they be large
numbers? Perhaps if you show your current code, and your current results
for some given input values, then someone here can show you if you've made a
coding error.

-Howard
 
V

Victor Bazarov

S. Nurbe said:
How can I program this math. equation:
a1*n1 + a2*n2 + a3*n3 = cos(alpha1)
b1*n1 + b2*n2 + b3*n3 = cos(alpha2)
n1^2 + n2^2 + n3^2 = 1

The problem is, that when you solve for n1, n2 and n3 (anything else
is known) you get really huge results.

What do you mean by "huge results"?
So is there maybe another way to compute this?

Another way compared to what way?
BTW:
These equations describe 0, 1, or 2 lines when two cones with the same
origin (cone ends) intersects. (Maybe anyone knows another way)

AFAICT, from eq 1 and eq 2 you can express n2 in terms of n1 and n3 in
terms of n1. Once you substitute those expressions into eq3 you get
a quadratic equation that is very easy to solve. Then substitute the
result (n1) back to get n2 and n3. That's like, ninth grade math...

Your problem doesn't seem like a language problem. Perhaps you need to
post to sci.math.*...

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top