[MWForum]Calling mathcats: geometry help please

Daniel Ajoy mwforum@lists.mathcats.com
Thu, 12 Aug 2004 20:46:31 -0500


On 12 Aug 2004 at 17:13, Jeff Knope wrote:

> I'm trying to read your code, but since I understand 
> neither the mathmatical principles it's based on, nor the 
> meaning of terms like "t1, it's not making any bulbs flash 
> for me. Is there a name for this strategy?

I think it is called representing lines parametrically.

the equations of the lines look like this:

[vector x1] + [vector d1] * t1
[vector x2] + [vector d2] * t2

x1 and x2 or the origins of the lines
d1 and d2 are the directions of the lines
t1 and t2 are numbers that express how much the lines
extend, form the origins, in their respective directions.

This line:

[vector x1] + [vector d1] * t1

Can also be represented as:

x = x1x + d1x * t1
y = x1y + d1y * t1

If we are talking about a line segment that goes through

[[1 1] [5 5]]

the representation would be:

[vector x1] = [1 1]
[vector d1] = [5 5] - [1 1] = [4 4]

(the line origin is [1 1] and it goes in the direction [4 4])

x1x = 1
x1y = 1
d1x = 4
x1y = 4

x = 1 + 4 * t1
y = 1 + 4 * t1

t1 can be any value between 0 and 1, when it is 0
we are talking about the origin

x = 1 + 4 * 0 = 1
y = 1 + 4 * 0 = 1

When t1 is 1, we are talking about the end of the
line segment:

x = 1 + 4 * 1 = 5
y = 1 + 4 * 1 = 5


Daniel
OpenWorld Learning