MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: "infinite" line through 2 3D points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67905] RE: [mg67870] "infinite" line through 2 3D points
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 12 Jul 2006 05:06:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Daniel,

Suppose you have two points...

pta = {xa, ya, za};
ptb = {xb, yb, zb};

Then you can parametrize a line through the two points as...

line[s_] := pta + s(ptb - pta)

The line goes from pta to ptb as s goes from 0 to 1, and you can extend in
either direction by making s < 0 or s > 1.

{line[0], line[1], line[2]} // Simplify
{{xa, ya, za}, {xb, yb, zb}, {-xa + 2 xb, -ya + 2 yb, -za + 2 zb}}

Or you might define a generalize line where the two points are parameters.

Clear[line]
line[pta : {_, _, _}, ptb : {_, _, _}][s_] := pta + s(ptb - pta)

line[{1, 2, 3}, {-2, 3, 1}][s]
{1 - 3 s, 2 + s, 3 - 2 s}

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: daniel_of_vienna [mailto:e0026484 at student.tuwien.ac.at]
To: mathgroup at smc.vnet.net


Dear Experts,

I've got a set of 3D points, which result in a movie, the points
describes two triangles, which are moving in 3D in time (frame). Now I
needed to draw the "height" of the triangles, which lines shall
intersect somewhere outside of the triangles. Now I konw, how to draw a
line betweeen two points, but how do I "lengthten" them in one
direction?

I hope, I was clear so far :DDD
Thanx,
Daniel



  • Prev by Date: Re: Queueing Theory - Series and Recursive Functions
  • Next by Date: Re: List Question
  • Previous by thread: "infinite" line through 2 3D points
  • Next by thread: Re: "infinite" line through 2 3D points