Jump to content

Finding a right angle to a normal


LaidlawFX

Recommended Posts

Hello,

I am trying to get a 90 degree angle to a normal to re-orient my normal so I can use a peak sop tangential to a curve. If needed I can provide the upvector, which by default is in the positive Y direction.

My test case is that I have a circle(curve) with each point normal looking at the next point in the circle(curve), via point sop with a sort or vop sop. My circle(curve) is on the XZ plane, and my upVector is pointing up in the positive Y by default. So I should be able to find a 90degree angle to my normal that I can peak something along, call it finding a Z-axis for each points co-ordinate system. I believe this is a simple vector match problem for vop sops, but I'm stumped at the moment, how to get this Z-axis as a second vector.

As for cheats I do not want to use another curve scaled in to orient with because with complex shapes you can not get an even angle set on the normal's.

Thanks

-Ben

Link to comment
Share on other sites

I am trying to get a 90 degree angle to a normal to re-orient my normal so I can use a peak sop tangential to a curve. If needed I can provide the upvector, which by default is in the positive Y direction.

If Y is always up, then a simple VEX SOP can transform the normal by 90' on the Y axis. Just take the P normal from the global input, and then use a VEX transform. Optionally write out the new value to an attribute instead of replacing the input normal.

Link to comment
Share on other sites

If Y is always up, then a simple VEX SOP can transform the normal by 90' on the Y axis. Just take the P normal from the global input, and then use a VEX transform. Optionally write out the new value to an attribute instead of replacing the input normal.

Thanks... lol, one node, how sad...

Link to comment
Share on other sites

A cross product gives you a vector perpendicular to both input vectors.

I think of it as the the two input vectors defining a plane, then the result of a cross product is the normal of the plane.

Also, if all you want is a tangent, use the polyFrame SOP to give you tangentu and/or tnagentv.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...