is it possible to define vector angles based on one of them when they are all on the same 2D plane?
Maybe think of a kind of a flower. One incoming vector (the stalk) and then like 6 vectores going in 60° from the endpoint of the stalk vector on a 2D plane.
If the angles go clockwise it would be like 60, 120, 180, 240, 300, 360° right? From basevector, if the “stalk” is the base direction.
But how can i define one vector as base and how gh starts meassuring the angles? Clockwise from base?
I dont want to make a flower…
Its part of a hex growing system and i have to define the next growing points.
So my latest idea was to define the angles so i can cull the ones i dont need. The hex grid changes anglewise, so i have to cull something like 0°-90° and 180°-360° and not specific angles.
Big thanks in advance!
In the “Angle” component (“Compute the angle between two vectors”) you can input a plane and so the angle will be calculated counterclockwise from the projection on the plane of the first vector to the second, and so you can have angles larger than Pi (180°).
Otherwise, if you don’t specify a plane, gh will find the shortest rotation/angle from first to second, and it will be always lesser than or equal to Pi.
It is not clear to me if you want to create new vectors by rotating a starting one or to measure angles, just you know that +/- 360° is the same as 0, or if you are measuring, you’ll never find a +/- 360° angle, max is +/- 359.99… if you provided a plane.
thank you for the fast reply.
I want to crate new vectors (or even just lines). Or i want to choose already existing ones based on their angles to a certain one. just what is easier.
i have just 6 options because i work on a hex grid. i need 3 branches going forward, the other 3 have to get sorted out. For me it doesnt matter if all the 6 get created first and then the unwanted culled or just the 3 needed produced.
My solution so far is with sorting the list out by hand, but thats not that useful. And i would like to implement a hoopsnake loop and im pretty sure the list thing is not going to work there like that.
the tree is maybe very odd, but im quite new to grasshopper and dont have a code background.