pelos Posted January 3, 2019 Share Posted January 3, 2019 I have a point {0,0,0} and another one in {1,0,0} how can I add one or more points (equidistant) between this 2 points? I know I can use addpoint({.5, 0,0}) but how can I get the new position? should I delete the first P with the second? or there is an function for that? thanks =) Quote Link to comment Share on other sites More sharing options...
bonsak Posted January 3, 2019 Share Posted January 3, 2019 (edited) First find the vector from point one to point two and then divide by two: newpointpos = ( vector two - vector one ) * 0.5 So with two add nodes and a wrangle it would look something like this: Regards Bonsak Edited January 3, 2019 by bonsak Quote Link to comment Share on other sites More sharing options...
pelos Posted January 3, 2019 Author Share Posted January 3, 2019 that's what I was missing the division! lol thanks!!!I was hitting my head against the wall this time. thanks! Quote Link to comment Share on other sites More sharing options...
pelos Posted January 6, 2019 Author Share Posted January 6, 2019 this is strange I am know the math should be right, but it seems vex evaluation from 0,0,0? why is that? I even put a slider so I can see the point moving from point A to point B but it does it from 0,0,0? is that suppose to be like that? between_points.hip Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 6, 2019 Share Posted January 6, 2019 (edited) just use lerp lerp(A,B,0.5); means linearly interpolate b/n A and B with 'percentage' as 0.5 (ie. half way) Yes from Origin is correct, you simply missed the part that you have to add the 1st point as 'offset'. To me lerp is far simpler Edited January 6, 2019 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
pelos Posted January 6, 2019 Author Share Posted January 6, 2019 aja, need to move the first point from the origin =) vector one = point(0, "P", 0); vector two = point(1, "P", 0); vector newpoint = (two-one)*ch("perc"); addpoint(geoself(), newpoint+one); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.