Hello guys,
Is there a simple way to create in dynamo an arc with given start-end points, and length of that arc?
I feel that I should start with start-end-center point arc, but I have no idea how to calculate center point with length given
Have you read this thread?
Create a line between the points rotate it ninety degrees around the centre point. Use point at parameter from the rotated line as the centre point. Adjust the parameter of the centre point location until you reach desired arc length.
Edit: ARC BY LENGTH.dyn (29.4 KB)
Maybe someone can use Optimo to find the correct parameter.
While you can definitely solve this with a while loop, that’s too boring and hard to accomplish with just nodes (you can use the LoopWhile node, but it’s just too cumbersome).
Instead, let’s try to use linear regression. Lunchbox has a nice implementation for a popular ML library and is just the thing we need:
We start with a line that’s 50 units long, generate a range of test values and plug it all in. The final result is pretty close to our initial target:
arc by ML.dyn (38.7 KB)
I built Dimitar’s graph in Dynamo version 2.0.2. I had a bit of trouble getting the Lunchbox package, apprently it is no longer available on the package manager see link below.
Wow, thank you guys for your effort!
I wanted to use dynamo for domestic stuff, but I didn’t know that this case is so complicated.
I think, that there should be a mathematic formula for stuff like that. I will later try to figure sth out.
And thanks for the script. Some new way of dynamo thinking to study
I just have changed random list for domain list. It seems more precise for me, but I will have to change the way how colors are attached, from gradiation to random.
(I like how it was looking in original script )