*On 28/02/2003 at 22:55, xxxxxxxx wrote:*

User Information:

Cinema 4D Version: 8.012

Platform: Mac ;

Language(s) : C++ ;

---------

i'm trying to make a 3d linear gradient between two points, but i'm having trouble with my math... can anyone help?

ok, to make it clear in math terms , i have two points in space (gdata.start and gdata.end), i want to work out the distance of my point "p" from the plane who's normal is defined by gdata.end-gdata.start, with the point gdata.start being on the plane.

what am i doing wrong? (oh and i want the result in terms of the length of the distance between my start and end points).

gdata.start=Vector(0,-100,24);

gdata.end=Vector(0,100,0);

Vector norm=(gdata.end-gdata.start);

r=(p-gdata.start)*!norm/Len(norm);

heeeelp!

]]>*On 28/02/2003 at 22:55, xxxxxxxx wrote:*

User Information:

Cinema 4D Version: 8.012

Platform: Mac ;

Language(s) : C++ ;

---------

i'm trying to make a 3d linear gradient between two points, but i'm having trouble with my math... can anyone help?

ok, to make it clear in math terms , i have two points in space (gdata.start and gdata.end), i want to work out the distance of my point "p" from the plane who's normal is defined by gdata.end-gdata.start, with the point gdata.start being on the plane.

what am i doing wrong? (oh and i want the result in terms of the length of the distance between my start and end points).

gdata.start=Vector(0,-100,24);

gdata.end=Vector(0,100,0);

Vector norm=(gdata.end-gdata.start);

r=(p-gdata.start)*!norm/Len(norm);

heeeelp!

]]>*On 01/03/2003 at 04:48, xxxxxxxx wrote:*

(!(end-start))*(p-start)

]]>*On 01/03/2003 at 10:58, xxxxxxxx wrote:*

great thanks, does the trick nicely :) (and much more consise than my equation)

]]>