Waterline entrance angle


I have a bit of a situation where i can’t climb out… I want to calculate the angle of a waterline (planar curve) at a certain distance from the center line. See picture below:

Firstly I made a GH definition (see below), the first component is the waterline. I could, with perp frame component and the curve length component, calculate the angle between the x-axis and the waterline at the end of the waterline.

How can I alter this definition to calculate the angle at the point in the first picture?

Many thanks!

/\ Matthijs

Hi Matthijs,

Use the curve tangents instead of the perp-frame to calculate the angle:

Intersect both curves, this gets you the parameters on the curves,
Evaluate the curves at these intersection parameters and calculate the angle between the tangent vectors (T)

In your definition, you feed the curve length into the perp-frame component. This is not reliable as the perp-component expects a parameter on the curve and not a length value.

Do note that the curve direction is relevant, a reversed curve will yield different angles:


angle_WD.3dm (25.6 KB) angle_WD.gh (9.1 KB)

1 Like

Thanks Willem!

1 Like