(50g) interception of two lines
|
10-25-2015, 05:10 PM
Post: #1
|
|||
|
|||
(50g) interception of two lines
Hello folks,
This program calculates the resultes of interception and give them back with exact values. The program uses the command LINSOLVE that is the fastes way because the numerical MSLV needs a lot of more time even for linear systems. And if there is no solution (parallel or skew lines) it will take a lot of more time to come to an end. But the LINSOLVE only works correct in exact mode. So if you have an input with real vector componets you have them to convert into exact ones (the program does it automatically). The program recognizes the 2D or 3D input by itself. A line (2D or 3D) can be represented in the form: \[ \vec{x} = \vec{t} + \alpha\cdot\vec{r} \]. ti an ri are 2D or 3D vectors stack 4: ta stack 3: ra stack 2: tb stack 1: rb Here we go: Code:
output has for all three cases the same two stack form: stack 2: {[x y (z)] A B} (for interception point for 2D or 3D, coordinates of the point and parameter values for the line representations ) stack 1: 1, or stack 2: 'ta + A*ra' (for identical lines) stack 1: 2, or stack 2: {} (for no interception) stack 1: 0 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)