algorithmic modeling for Rhino
Hi all,
I have a question about the field lines component.
I would like to know if there is a way to make the field lines periodic- so that they can be defined as enclosed areas.
Currently the field lines loosely follow the same geometry but seem to spiral outwards making them difficult to use and control unless modifying each curve individually thereby becoming non-parametric.
I was thinking that I need to start the field evaluation, extend it until it creates nearly a loop - and then shatter it - if it comes back to within for example 10m of the start point, divide the curve and then interpolate the division points.
Seems long winded - or am i missing something very simple?
any ideas?
Many thanks,
Chris
Tags:
How are you making the field lines?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,
I am using the field lines component that is now part of the standard components within grasshopper.
I seem to have stumbled across the solution. By changing the solver method to RK4 (i dont know what this means and imagine there is quite a complex mathematical answer after looking up Euler method which is beyond me im afraid!) and accuracy to 1.0 it seems to return curves that can be made periodic following the method that i described: ensuring enough samples that the field line extends back past its origin, evaluating and shattering the curves across a short distance then taking their original start point and finding the closest point parameter on the second part of the remains, shattering at that point and joining the relevant two curves back together.
As the 'accuracy' option of the field lines component is set to 0.1 by default and solver method RK3. Is this is decisive factor?
I still have some issues with it but it seems to be enough of a workaround that i can control it, though due to the complexity of the field - with six spin charges across a grid at varying heights there remain a few anomaly's that i have to manually cull or address through other means...
As you saw there are several solvers available for the field-lines; Euler, RK2, RK3 and RK4. The RK stands for the original authors of those sampling algorithms; Herr Runge und Herr Kutta. None of these 4 methods generate an exact answer, but they are (from left to right) increasingly more accurate. They also take (from left to right) more and more time to finish as they require more samples for each iteration.
You won't be able to create reliably closed curves using iterative sampling methods as small errors at any step may be amplified in successive steps. There is also no guarantee that the field-line ends up in the exact coordinate where it started.
The Grasshopper metaball solver on the other hand uses a marching squares algorithm which is capable of finding closed loops because it is a grid-cell approach and sampling inaccuracy in one area doesn't carry over to another. However the solving of iso-curves is a very different process from the solving of particle trajectories through fields.
I'm still a bit fuzzy on how you've defined your field. Typically field lines shoot to infinity rather than form closed loops. That is one reason why I chose the RK methods here, because marching-cubes is very bad at dealing with things that tend to infinity.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
The field stuff is still pretty new. The field line solver isn't quite as robust yet as I'd like and there's a bunch of other functionality I'd like to add before too long. That may explain why not that many people are using fields yet.
Hopefully in the future there will be better tools that will make what you want to do easier.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I look forward to it. Thanks again for the insight.
regards,
chris
You should look into the flowlines plug in for grasshopper. Its pretty cool and it can do something similar to what you mentioned below.
Hi Mike,
thanks yes i have used the flow lines plugin - however with it the same problem occurred. I have found a workaround for the problem now which does involve a method of manual re-interpolation, however, as far as the project that i am working on goes it is good for now.
Thanks for your reply.
Welcome to
Grasshopper
Switch to the Mobile Optimized View
© 2024 Created by Scott Davidson. Powered by