Create a point in between (by percentage) of two other points distance.

Create a point in between (by percentage) of two other points distance.

Anonymous
Not applicable
822 Views
4 Replies
Message 1 of 5

Create a point in between (by percentage) of two other points distance.

Anonymous
Not applicable

I can figure out the math behind it but i cant get it to maxscript! Can you guys please help? Im looking to create a point between two other points (in between distance to be set in percentage). Something like 

Point along AB : the point at 25% between A and B: 

fn alongPoint pA pB prop = (pA+((pB-pA)*prop))

 

 

0 Likes
Accepted solutions (1)
823 Views
4 Replies
Replies (4)
Message 2 of 5

istan
Advisor
Advisor
0 Likes
Message 3 of 5

Anonymous
Not applicable
I guess I didn't explained it right! I know the math behind what I want. My problem is how to right it down in maxscript.
0 Likes
Message 4 of 5

Anonymous
Not applicable
Also... I wrote the math on my question, don't know if it's understandable.
0 Likes
Message 5 of 5

Swordslayer
Advisor
Advisor
Accepted solution

Your function is okay, what's the problem? To create a new point 25% of the distance from Point001 to Point002, the command would be

 Point pos:(alongPoint $Point001.pos $Point002.pos 0.25)