algorithmic modeling for Rhino
I have a problem which I was hopping to get some help on. I'm trying to use grasshopper to draw an arc of given radius tangent both to a straight line of given length which passes through a fixed point and to a parabola/spline curve. I've attached a picture which will hopefully help clarify what I am trying to do. The two parameters that are not constrained are the angle of the straight line (alpha) and the angle of the arc (beta). I would appreciate it if someone could help me draw this shape using grasshopper for any given curve, straight length, and radius. I've included a grasshopper file with the point and curve internalized as a starting point. I appreciate any help and suggestions.
Tags:
try using the tangent lines component, found under the "curves/primitives" menu
I'm trying to draw an arc tangent to 2 curves rather than a line tangent to a circle. I don't see how I can apply the tangent lines component to get the desired result. I did look at "Circle Tan Tan" but it doesn't look like the center point guide is actually the center of the circle so I can't set the radius the way I need to.
The dashed part is just to show that I need the arc to continue until it intersects the curve at a point tangent to the arc, its not a separate arc, sorry for any misunderstanding. I'm trying to generate the straight line and the arc.
I think I have a working solution using galapagos but i have to manually solve for the alpha angle every time which is an inconvenience. Is kangaroo similar?
Your solution is a lot neater than what I came up with, but I need to be able to specify a radius for the arc. The only way it looks like I can do that is to use Galapagos to solve for the direction vector of the straight line while setting the desired radius as the goal. Unfortunately I would have to solve for the direction every time the geometry changed, is there any way to avoid having a manual element to the solution?
Ah sorry Ayed, I failed to notice the fixed radius rule~. Than I don't know...
Where's your attempt?
I had to separate out that bit from my overall grasshopper file so it may be a bit messy, and some of the things I did are to address specific issues I ran into since I was trying to make this a cluster that would work for multiple sets of fixed points and curves. The desired output was a single curve containing the straight line, the arc, and the curve past the arc.
Hi all,
here is my attempt:
If R=arc's radius and L=straight line's length,
then you can locate the center of the arc by offsetting the curve by R and drawing a circle from the point (the radius of this circle is the hypotenuse of a triangle with sides= R and L). The intersection of these 2 is the center of the arc. From there on, it's just Shattering and selecting the right pieces to join.
Of course it is far from becoming a component, since all these offsets and shatters and items should be replaced with something that can actually check (which side to offset, which part of the curve to keep, etc).
Cheers, Nikos
Thank you so much, your solution seems to work perfectly. I just need to think of a way to set the direction of the offset. I had a crude way of setting the direction of the curvature of the arc based on comparing the angle of the straight line to that of the tangent of the point on the curve closest to the end of the straight line. This only worked because the process was iterative so I have to think of an alternative.
One solution could be to offset to both sides (provide the positive as well as the negative value) and from the two curve, keep the one closer to the point. Or you could use the [Curve Side] component and, depending on the outcome, offset with positive or negative value...
That's clever Nikos!
I decided to try and figure this out.
Based on your geometric insights, I think I have something close to automatic segment selection.
edit: Actually I'm trying to circumvent having to figure out which segment to pick.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by