revelationsr Posted March 10, 2016 Share Posted March 10, 2016 I know one can do this with attribute transfer. But I would like to know how to do this in VOPs. I have a random curve sitting close to a grid. I would like to assign a value to the grids points based off the distance from the curve. But in vops. Also. Now that I think of it. Lets assume the grid had a mountain on it. Is there a way I can assign a value to the points based on their normals pointing to the curve. So for example if a normal is pointing straight at the closest point on the curve then it gets a 1. If it is pointing away it gets a 0. Cheers Quote Link to comment Share on other sites More sharing options...
Maurits Posted March 10, 2016 Share Posted March 10, 2016 I don't know how to make in in vopsop but the process is simple. Use the grid as input 1 and the curve as input 2 For each point on the grid go over all the points in the curve and calculate the distance. Calculate the distance between the grid point and the first curve point.Store the distance and point number in a variable. Then continue with the other points on the curve.calculate the distance. compare the distance to the stored distance. if i't smaller then the stored distance, overwrite the old distance and point number with the new ones. Once you been over all the points in the curve you know the what point is closes to the current point in the grid. Then copy desired attribute values from the saved curve point to the current grid point.Repeat for each point in the grid. Quote Link to comment Share on other sites More sharing options...
mawi Posted March 10, 2016 Share Posted March 10, 2016 if you want the closest pointnumber on curve use nearpoint vop. If you want the closest distance to curve use the xyzdist vop. 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.