Create an (axis independent) 2d arrow in a single add SOP?

   5511   6   0
User Avatar
Member
121 posts
Joined: July 2005
Offline
Hey all,

been a long time since my last visit here. I need to create a 2d arrow in a single add SOP. pt0 and pt1 are the (changing) start/end points of the line, and now I wanna draw an “arrow head” at the start/end points.

I actually wanna do this in Houdini's little brother (touch), so I have no access to python expressions.

Any ideas how to do this
Thanks
Achm
Edited by - May 4, 2009 10:41:35
User Avatar
Member
1145 posts
Joined: July 2005
Offline
I would suspect that a a careful arrangement of points would do at the trick.
Add a bunch of points with the Add sop, translate them into appropriate positions and then connect them.

Attachments:
arrow_from_points.hip (35.8 KB)

“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
121 posts
Joined: July 2005
Offline
thanks peter. Seems like I haven't made myself to clear. Sorry for that.

What I'm looking for is a way to draw that arrow independent of a fixed axis, i.e. I have two points (start and end) which are not aligned to any of the xyz axes, but are at some (usually animated) xy position. For example
pt0 .5 4 0
pt1 -10 1 0

What I can't figure out is how to position the points of the arrow head so that they take the current orientation of the line/arrow into account.

Hope that made it more clear

thanks again
User Avatar
Member
345 posts
Joined:
Offline
Hey,
Sounds like normals can solve your problem. Have a look at this quick digital asset example - dive inside to see more details. Is that what you are after?

Cheers,
kuba

Attachments:
arrow.hip (94.7 KB)

User Avatar
Member
121 posts
Joined: July 2005
Offline
that's basically what I'm after, but I need to create this in a single add SOP. I'm pretty sure Houdini can do this. Hopefully I'm not wrong. But thanks for this file kuba!
User Avatar
Member
311 posts
Joined: July 2005
Offline
you use point0 and point1 to dynamically control the placement of points 2-6 and points 7-11 ( your arrow heads ) respectively with expressions.

You need to figure out the trigonometry to get the angling of the arrow heads, but it should be acheivable.
User Avatar
Member
121 posts
Joined: July 2005
Offline
thanks again. It's a little bit easier, as I just need a line forming the arrow, so only 4 points in total. Good to know its possible, but unfortunately I've no knowledge of trigonometry. Any hints?
  • Quick Links