How do you check to see if a curve intersects itself?
13225 19 2-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
Howdo all,
I am still relatively new to all this and have got myself into a bit of a fix.
How do you see if a curve intersects itself and extract the xyz co ordinates at that point?
I started in vex trying to compare the curve with a section of the curve which carves along the length of the curve. If the intersection happens then the angle between the curves should be greater than zero, but I cant seem to get the angle between the curves.
This also seems a long way round if anyone has a better solution. I did try checking for a collision on the loop with itself but if is always colliding with itself
Any help greatly appreciated
I am still relatively new to all this and have got myself into a bit of a fix.
How do you see if a curve intersects itself and extract the xyz co ordinates at that point?
I started in vex trying to compare the curve with a section of the curve which carves along the length of the curve. If the intersection happens then the angle between the curves should be greater than zero, but I cant seem to get the angle between the curves.
This also seems a long way round if anyone has a better solution. I did try checking for a collision on the loop with itself but if is always colliding with itself
Any help greatly appreciated
-
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- jesta
- Member
- 311 posts
- Joined: July 2005
- Offline
ok, i have a solution for you, but it's a dirty lttle hack.
it presumes your curve is on one plane.
I didn't check for a non-plananr curve, but this might work with some tweaking.
duplicate and offset the curve, then skin it.
feed it into both inputs of surfsect and set that to intersect. It'll give you a bunch of mess, but somewhere in there is an intersection curve. use a profile SOP to extract the profiles. you'll have 4, so select one of them which you can either carve down to the intersection point or use a point expression to get the value you want.
as I said, it's a little dirty, but it worked for the example you iluustrated.
hope that helps
jerry
it presumes your curve is on one plane.
I didn't check for a non-plananr curve, but this might work with some tweaking.
duplicate and offset the curve, then skin it.
feed it into both inputs of surfsect and set that to intersect. It'll give you a bunch of mess, but somewhere in there is an intersection curve. use a profile SOP to extract the profiles. you'll have 4, so select one of them which you can either carve down to the intersection point or use a point expression to get the value you want.
as I said, it's a little dirty, but it worked for the example you iluustrated.
hope that helps
jerry
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
i dont think I have got it quite right
I sweeped the nurbs curve with an opened arc nurb circle, feed both into the surfsect node on intersect but I have been left with the solid shape of the swept curve!!? Changing the options havn't given anything except for the shape ot the curve?
if I have got it right how do i extract the information of the points?
I sweeped the nurbs curve with an opened arc nurb circle, feed both into the surfsect node on intersect but I have been left with the solid shape of the swept curve!!? Changing the options havn't given anything except for the shape ot the curve?
if I have got it right how do i extract the information of the points?
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
I have solved my curve intersection over a time range. If you use the HUD slider the green section will travel the curve so you can do a collision test.
It still dosnt do it instanttaniously though as it might with the surfsect sop though. doesde mine not work as the curve dosnt have a surface to bolean?
Ed
It still dosnt do it instanttaniously though as it might with the surfsect sop though. doesde mine not work as the curve dosnt have a surface to bolean?
Ed
-
- jesta
- Member
- 311 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- jesta
- Member
- 311 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- edward
- Member
- 8083 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- edward
- Member
- 8083 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- edward
- Member
- 8083 posts
- Joined: July 2005
- Offline
-
- Dryrainstudios
- Member
- 49 posts
- Joined: July 2006
- Offline
-
- Quick Links




