In the example file I have a point drawing a line between a point and its closest neighbor using a parameter I call “draw curve”. I'm using linear interpolation, so the point is tracing out an arc but because the line only has two points its always drawing a straight line. How can I create points along the path the point is tracing so that I can hold the curved shape as the line is being drawn by the “draw curve” parameter?
Many thanks in advance if someone can assist with this problem.
Draw parametric curves that connects points using VEX help!!!
3784 3 1-
- traileverse
- Member
- 365 posts
- Joined: Nov. 2015
- Offline
-
- BabaJ
- Member
- 2142 posts
- Joined: Sept. 2015
- Offline
You have your algorithm that traces a path.
All you have to do is decide what ‘resolution’ you want.
You have your draw line parameter which depending on it's value, determines where a potential point will lie according to your method.
So decide how many times along that curve you want to add a point that will go towards defining your curve.
Once you've decided that, add a point for each step along the curve you want, at the same time creating an array of the point numbers of those newly added points.
Give that array of point numbers to the addprim function that will connect all those points.
Of course to get a well defined poly curve you need a lot of points.
If you want a similarly smooth curve but with less points you could try looking into one of the vex spline function variations.
All you have to do is decide what ‘resolution’ you want.
You have your draw line parameter which depending on it's value, determines where a potential point will lie according to your method.
So decide how many times along that curve you want to add a point that will go towards defining your curve.
Once you've decided that, add a point for each step along the curve you want, at the same time creating an array of the point numbers of those newly added points.
Give that array of point numbers to the addprim function that will connect all those points.
Of course to get a well defined poly curve you need a lot of points.
If you want a similarly smooth curve but with less points you could try looking into one of the vex spline function variations.
-
- traileverse
- Member
- 365 posts
- Joined: Nov. 2015
- Offline
BabaJ
You have your algorithm that traces a path.
All you have to do is decide what ‘resolution’ you want.
You have your draw line parameter which depending on it's value, determines where a potential point will lie according to your method.
So decide how many times along that curve you want to add a point that will go towards defining your curve.
Once you've decided that, add a point for each step along the curve you want, at the same time creating an array of the point numbers of those newly added points.
Give that array of point numbers to the addprim function that will connect all those points.
Of course to get a well defined poly curve you need a lot of points.
If you want a similarly smooth curve but with less points you could try looking into one of the vex spline function variations.
Ahh thanks @BabaJ, will try to see how that works out for me! I dont mind getting a low-rez poly curve because I could use the convert SOP later to make it a bezier curve.
hou.f*ckatdskmaya().forever()
-
- BabaJ
- Member
- 2142 posts
- Joined: Sept. 2015
- Offline
-
- Quick Links