algorithmic modeling for Rhino
Hi,
I am trying to make a surface from set of points - which are live coordinates of about 15-30 vessels that change every two minutes -. So that the surface changes shape every two minutes since these points are supposed to be the control points of the surface. I attached that live data to P, and have been trying to find the right value for U and I on the SRFGRID. Yet it still says UCount Value is not valid for this amount of points.
I have attached the file, would really appreciate if someone could assist.
Thank you,
Levent
Tags:
I manage to do it however since the number of boats change all the time even if I either make the U value 9 or 3 (there are 27 boats at the moment), it wont work when the number of boats change. Is there a way to set this up in a way that lets say when there are 28 it will go for one of 4, 7 or 14 and if it is a primer number it will exclude enough number of boats to obtain the closest suitable number - lets say there are 29 boats but it will only show 28 and go back to selecting 4,7 or 14.
Hi Levent,
Can you explain what exactly you are trying to do?
Even when a surface is created it looks too strange to be of any use.
Some shots in the dark:
1. using a [sort points] component before the [SrfGrid] might be able to help a little bit.
2. With this definition you can make sure you always have even number of boats:
3. Are you trying to draw the convex hull of thes points? Then there is a gh native component for this.
Which can then produce a surface with a U of 2.
If you can provide some more info on what you are trying to do, maybe I can be of more help.
cheers,
nikos
I messed up my reply with the edit,
just ignore the "Which can then produce a surface with a U of 2." line and it should make sense.
Dear Nikos,
Thank you for your help, it was very effective. I did adjustments in the light of what you said. What I am trying to do is a topoligical model representing the vessel traffic in Dalgety Bay, Scotland. I already have the coordinates of these vessels as live API data. The second file 'reaction_forces' is doing something similar to what I am trying to do. Yet in my case I want the peak of those spikes to be the changing coordinates of the vessels so that everytime I press play on kangaroo it gives me a different surface/mesh.
In summary, a rectangular mesh/surface,
Coordinates at a different height from that surface, creating those changing spikes like in the reaction forces example.
Hopefully from that point I will be able to plug that in to the same Kangaroo component add more layers to this representation.
Thanks again,
Levent
Hi Levent,
Some notes:
The kangaroo definition you posted is a typical mesh relaxation definition (all mesh edges trying to reach zero length with some fixed points to keep the mesh from shrinking to nothingness).
Some of these fixed points (anchor points input in kangaroo component) are raised in Z so that a 3d shape is created (I believe these are the spikes you are refering to).
My understanding is that you want to do something similar but with the vessels' points being raised in Z, right?
I gave it a try with some custom points because I am getting an error from the XML parser (ABOVE SERVICE CALL LIMIT) and this is the result:
If I have got it all wrong, then maybe a simple scetch of what you have in mind could help.
cheers,
nikos
Nikos,
The logic you have made is perfectly fine, the reason it says above service call limit is it can only obtain a new data every 2 minutes so you would have to put a timer of 2 minutes if there aren't any.
I will open the file you have uploaded now and try to understand the logic behind.
Thanks a lot,
Levent
Nikos,
I tried and it works for the live points. I am very grateful for your help!
One last thing, I was wondering if you would be able to recommend any other components or more generally methods to make this surface smoother / aesthetically more pleasing.
Best,
Levent
Hi Levent,
I had a look at your previous posts (I don't know why they went unanswered by the way...) and I think I've got a better idea of what you are after...
I don't believe kangaroo is necessary in your case (plus it has the drawback of having to reset the component).
I would suggest working with attractors. This way you can have more control over the final surface (and you can actually work on a surface instead of a mesh).
What this definition does is:
create a grid of points inside the rectangle,
for each point of the grid calculate the distance to the nearest vessel
remap these distances from 1 to 0 (the smallest distance is now 1 and the biggest is 0)
pass these numbers through a graph mapper so that you can control how the numbers "travel" from 0 to 1 (by changing the curve and looking at the result you will get what it does)
multiply with a variable for the maximum height
move each point in Z by this number
create a surface through these points.
By changing the resolution of the grid (U and V), the graph mapper curve and the height slider you can have enough control over the final surface (and It should work with the changing vessel coordinates).
good luck with your project,
nikos
Nikos,
Sorry to bother you again, however in the last file it gives an error saying 'a point in the grid is null, Fitting operation aborted. How can I solve that?
Lastly, I am trying to make a drawing which will show a defined time, lets say an hour of the traffic - which means 60/2=30 topological models. Is there way in Grasshopper to record each of these models without me baking each of them one by one. It has to bake each model individually because I realised when I wait for the second one when the first one is already on play the result of the merger of the points is not delivering clear information to the eye.
Best,
Levent
Try this file. I had kept both definitions in the same file and the first one was probably causing a problem. Now it's just the second. If it still gives you an error please provide more details and, if possible, a screenshot (is it an error on opening the file, on a component,...?)
For the second question you will need to explain to me how the xml parser works. You said the site, you are linking to, refreshes every 2 minutes. Does that mean that if you leave the gh file open, the points inside your rectangle will change? Also, does the order of the incoming list of coordinates change? (is the first item always the same vessel etc?)
Nikos,
I am afraid its still not working, attached is the screenshot.
For the second question, yes the points inside the rectangle change, the order changes but it is not important. We are just trying to show somewhat a density of ships in the field.
Thanks!
Levent
I really can't understand why this is happening...
Does this error occur the moment you open the file or after changing anything? Have you made any changes to the initial rectangle and points?
If on opening the file you get this error then all I can think of is that we have different rhino units settings and this somehow creates a problem.
Can you please re-upload the gh file for me to check it?
Anyway, before going there you might want to check this definition I made, which uses the [record data] component to record the vessels' positions every two minutes.
You will have to double-click the "record" boolean toggle to start recording. You can see a list of the recorded topological models, which will grow every two minutes and you can chose which model you want to display through a slider.
Let me know if you get the same (or a different) error on this file.
nikos
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by