How to make sure perp frame Z axis is upwards?

the curve is a 2D planar curve
somehow the red axis is pointing up:

image

image

The red axis is the X axis of the plane. Perpendicular Frame orientation depends on the shape of the curve up to the evaluation parameter, so it may be at any rotational angle. The only rule is that the amount of rotation between adjacent frames is minimized.

If you wish to have specific directions, then you’ll have to evaluate the curve tangent vector, and create a plane out of the World Z vector and the cross product of the tangent and World Z.

2 Likes

A bit ago I made a cluster that puts X pointing up so it aligns the plane Z with the curve direction.

Here it is, you’re welcome to use it:

Perp Frame:
image

Perp Frame “World Aligned” Cluster:
image

Graph Space:
image

EDIT: updated to be slightly simplified to what @DavidRutten suggested as previously I was using a Rot3D component. The Cross Product simplifies it. Thanks!

20231005_Perp_Frame_World_Aligned.gh (14.5 KB)

2 Likes

It looks like you since edited your post or I misread it initially but if you want an evaluated Z positive frame on your curve by default use the Horizontal Frame component instead.

Cheers!

1 Like

Ahh! You forgot to post your file!
you got a few answers but next time… :slightly_smiling_face:

thanks all :slight_smile:
before reading here, I finally made this, it works too :slight_smile:

1 Like

Before reading replies but after creating the thread? And without posting any code / geometry.

That’s good you were able to solve it for your definition!

In my opinion, this doesn’t seem to make sense with what you were initially asking for/posted as your topic. Only bringing this up for clarity to understand what your intent was/is.

Your Logic:

A Z Upward Perp Frame isn’t possible (since a perp frame has the Z (Plane Normal) aligned to the Tangent Curve Direction, a Horizontal Frame is:

Alternatively a Z, curve aligned Perp Frame with a upward X vector is possible (as I posted earlier).

Just curious if you could show a screenshot or larger definition of what your end result intent is.

Thanks!

3 Likes