Global registration in grasshopper

Hi everyone!
I have two lines that intersect at a common point. The endpoint of each line is located at a different position in space. I want to rotate one of the lines around the common point of intersection so that it aligns with the other line while maintaining its original length and keeping its common endpoint fixed in position. The other line is allowed to change its length, but its points must remain fixed in position. In other words, I want to find a transformation that rotates the line around the common point of intersection while preserving its length and position, so that it lines up with the other line.

Attach a sample file
I would appreciate any help!
Many thanks
Tal

sample.gh (14.0 KB)

sample Edited V0.gh (12.1 KB)
Use Cross Product.

Thanks Quan Li!
i dont familier with the Cross Product component.
BUT how I can make it be align/collinear/on top of the first fixed line?

again many thanks

Tal


Cross Product gives you a rotation axis.
Measure the angle and feed it into Rotate Axis.

it works amaizingly!
Thank you!
Is there a way to do the same but without the sharing point between the lines?

Yes.

What i’ll have to change to establish it?

Cross Product V0.gh (23.7 KB)
There are two random lines red and blue.
The red is fixed, blue is moving.
Green is the moved blue.
Black is a cross-product vector of red and blue.
Honeycam 2023-05-04 20-07-22

Dot products and Cross products are not easy for people not familiar with them. Take your time.

WOW.
Honestly, i don’t really know how to proceed from here or what is going on in the gh file you attached(which is amazing). I’ll keep learning and investigating the file you sent/ again; it is amazing! Thank you