Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-03-12 07:39:08

Niels
Guest

How to get the equations of a line in 3D if I have two points?

I should know how to figure this out buy my brain in dead and all my math from school is missing sad

I have 2 3D points how do I calculated the a,b,c,d in the following equation:

a*x + b*y + c*z + d = 0

What I'm trying to do:

I'm reverse engineering gradients that has been draw as bitmap into SVG. My goal is to approximate the positions of the gradient stops.

My idea is to compare a set of colors, as long they have the same a,b,c and d between them there there should be any stop between them.

Thanks for you help!

/Niels

#2 2008-03-12 22:24:41

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: How to get the equations of a line in 3D if I have two points?

You might fiddle with (x,y) separately ignoring z.
then fiddle with (y,z) separaely ignoring x.
then try (x,z) separately ignoring y,
and see if it all goes together.
That would be like looking from orthogonal
angles parallel to the axes without
perspective to get 3 separate views.


igloo myrtilles fourmis

Offline

#3 2008-03-13 03:30:17

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: How to get the equations of a line in 3D if I have two points?

isnt f(x,y,z) = ax + by + cz + d = 0  the equation of a plane? if so then 2 points isnt enough to get a unique set of values for a,b,c,d?


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#4 2008-03-13 10:08:34

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: How to get the equations of a line in 3D if I have two points?

I am going to explain the 2
points in 3-D question.  If
the line goes in the (2,3,4)
direction and goes through
the point (7,8,9), then the
equation might be:
(x-7)/2 = (y-8)/3 = (z-9)/4

Last edited by John E. Franklin (2008-03-13 10:10:12)


igloo myrtilles fourmis

Offline

Board footer

Powered by FluxBB