ANGLE - Different line direction, different result

No, a vector has no location in space, a line has. As I said, think of it as a direction. Saying I’m going north doesn’t tell you where you are at.

4 Likes

No. A line is a vector with an actual location. A vector does have a distance.

Vector = direction and distance
Line = direction and distance and location

A vector is not a line, but a line does have a vector.

4 Likes

Guys I have spent the last 12hrs debugging.
yes you are correct a line specifies the start and length of a vector. What I am getting at, is this module got the vector from the line. I expected it to use the line not the vector to calcualte the angle.
If only vectors are specified, there are more than one angle to output, and two vectors may never cross. I suppose you could argue that two lines might not cross in 3D space also, which leads to more question about wich plane to project the lines onto to get their angles. I presumed that was what the PLANE input was for.

I expected it to use the line not the vector to calcualte the angle.

I’m not saying the component shouldn’t warn you otherwise, but just read the component description.

If you use a plane, then the vectors get projected onto that plane by the planes z axis direction and the angle of those projected vectors is measured on the xy axes of that plane.

1 Like

You always get an angle inbetween two vectors. angle = acos(|v1|•|v2|). The plane is used to make it depending from the view, which is kind of tricky as well.

I think the component is working correctly taking into consideration the line direction.
The angles between two lines make sense to you in the plane they form, dividing that plane into 4 segments with angles alpha and beta (two of each according to the law of opposing angles - you can reduce the question into half of the plane (180° instead of 360° - your initial post shows this, if you add up 97.65 + 82.34 ~= 180°). The angle component gives you one angle, not both of them. You need the directionality of each line for this. Lets say you go from point A to the intersection B, then what? C1 or C2? The directionality of each curve tells you the order of the points. If you want a specific angle without paying any attention to curve directions, take a look at the attached script.

angle_clarification.gh (17.4 KB)

Guys this not complicated isn’t it? Many people don’t know the difference between a vector and line. I bet many of them are using Grasshopper. Also many don’t know that a vector gets extracted from the Tangent property of the Line or Linear Curve.

Now if a component allows you to feed in a line or curve to a vector operation, then this behaviour might lead to wrong expectations on casual users. So its working technically correct, but it expects the user to have certain understanding on how to read it. If you simply don’t allow to feed them in, then there is no misunderstanding. Thats my point.

4 Likes

I merely tried to put this into another perspective hoping to make it more clear - sorry for complicating it.

Thanks for that explanation. To answer this question, the LINE determines C1 or C2. Thats the purpose of geometry - to take the general (vector) to the specific (geometry). The behavior is counterintuitive, and this instant case, because the angles were so close numerically propagated an error that led to another horrific surface (picture with held to avoid offending the neophites).

At the risk of beating a dead horse, Grashopper is a fantastic edition to Rhino and has opened up a new world for me, but a manual with this kind of specifictiy is sorely needed.

Ideally detail for each module like this:

Why dont we all do one each )

1 Like

Apart from this, its actually quite rare to encounter such issues with Grasshopper. And there are great and plenty of explanations around. Grasshopper is quite beginner-friendly. Much easier to learn then doing it by plain code. I sometimes just wished to be more closer to the algorithmic behaviour and naming convention of Rhino. Basically the same commands as Rhino offers. But this is the limitation the RhinoCommon Api just has…

Perhaps someone could compile all these kinds of incredibly valuable posts into a manual

1 Like

i keep all valuables in my book mark so i can grab when ever i want !!

1 Like

perhaps you could post them )