doing this with the current tools or a bit of scripting since the Flickr API allows you to make requests in a REST format, but utilizing the Flickr.net API library makes it much simpler.
First and foremost, you need a Flickr API key...do you have one of those?
A great way to get to know the Flickr API is with the API Explorer. Here is a link to the page for the flickr.photos.search method explorer: http://www.flickr.com/services/api/explore/flickr.photos.search
The cool thing about this page is that it generates the REST Http call towards the bottom. So, here is what I did:
1. Grab the coordinates of the bounding box per Flickr API request:
bbox (Optional)
A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched. The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude. Longitude has a range of -180 to 180 , latitude of -90 to 90. Defaults to -180, -90, 180, 90 if not specified. Unlike standard photo queries, geo (or bounding box) queries will only return 250 results per page. Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).
So, I went to Google Earth, picked a city (London, UK) and dropped two pins:
This gave me two locations, which I can put into the Explorer Page next to the bbox option. Here is what I put for these two points: -0.155941,51.496768,-0.116783,51.511431
2. Check has_geo
3. In extras, type in geo
4. Make the call!
You will see a list of responses in an XML format, these responses will be from the first page. Geolocated photos are limited to 250 / page, so you will have to grab them page by page.
If you want to add more options (minimum upload date, maximum upload date, etc) you can do this as well)
The best is at the bottom, you get the full http call for this: http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ffd44f601393a46e86aa3a5f8a013360&bbox=-0.155941%2C51.496768%2C-0.116783%2C51.511431&has_geo=&extras=geo&format=rest&api_sig=b42330e5d1523bd5fe60c2ad43acde99
Notice this call has some other api key, you should eventually replace this with your own.
You could copy and paste this into a browser and you will get the results with the latitude and longitude:
So this is really what you need to know to do this through GH. Since gHowl has an XML parser component that can access files on the web, you should be able to use the same http call into this component.
Eventually, we get a response, and we need to grab the lat and lon data. With gHowl we can map these to xyz coordinates, and generate the heatmap...this is just a linear mapping:
Attached are both the Rhino file and the Grasshopper file, as well as the image underlay.
I am working on a series of components that makes this more straightforward, but for now, this should get you started.
…
hino Mc Neel, autore di "Architettura Parametrica - Introduzione a Grasshopper", il primo manuale su Grasshopper. I corsi PLUG IT nascono dalla volontà di promuovere le nuove tecnologie digitali di supporto alla progettazione e condividere il know-how maturato attraverso ricerca, collaborazione con i più importanti studi di architettura e pubblicazioni internazionali. Verranno introdotte le nozioni base di Grasshopper approfondendo le metodologie della progettazione parametrica e le tecniche di modellazione algoritmica per la generazione di forme complesse. Il corso è rivolto a studenti e professionisti con esperienza minima nella modellazione 3D e si articolerà in lezioni teoriche ed esercitazioni. Argomenti trattati: - Introduzione alla progettazione parametrica: teoria, esempi, casi studio - Grasshopper: concetti base, logica algoritmica, interfaccia grafica - Nozioni fondamentali: componenti, connessioni, data flow - Funzioni matematiche e logiche, serie, gestione dei dati - Analisi e definizione di curve e superfici - Definizione di griglie e pattern complessi - Trasformazioni geometriche, paneling - Attrattori, image sampler - Data tree: gestione di dati complessi - Digital fabrication: teoria ed esempi - Nesting: scomposizione di oggetti tridimensionali in sezioni piane per macchine CNC Verrà rilasciato un attestato finale. INFO E PRENOTAZIONI: http://www.arturotedeschi.com/wordpress/?p=2914…
robablemente las uniones son forzadas/rotadas levemente para que calcen.
Probablemente se puede variar el angulo de 90° entre cada pieza a un angulo que permita crear el octagono perfecto, pero habría dos posibilidades de giro entre cada pieza.
Tal vez el problema hay que repensarlo desde el octagono/poliedro que forman los triangulos en el modelo y luego generar los triangulos.
Bueno aca mi definicion y algunos comentarios:
- Hoopsnake pide una condicion inicial que solo la utiliza en la primera iteracion (input S).
- Luego hay que definir el algoritmo reiterativo/recursivo que es toda la parte de abajo. Como input se utiliza el output S de hoopsnake (en la primera iteracion es la misma informacion que ingresaste en S).
El resultado de este algoritmo/proceso vuelve a ingresar a hoopsnake en el input D para una nueva iteración.
- El output H es el historial de toda la geometria/datos procesados en las iteraciones.
Ahora te explico el algoritmo:
- Se toma el triangulo y se sacan los puntos en las esquinas.
- Se revisa si los puntos estan contenidos en otro triangulo existente y hago cull para dejar los libres (ocupo el output H del hoopsnake para ver los triangulos de las iteraciones anteriores). En la primera iteracion hago un bypass para dejar todos los puntos iniciales libres (ya que no hay historial en el hoopsnake).
- La parte de abajo es para elegir una de las dos opciones max disponibles (tu comentaste arriba que habia tres opciones... en realidad son tres opciones en la inicial, luego son solo dos opciones. No se que va a pasar si se se completa el octagono, teoricamente habría solo 1 opcion disponible, pero no pude reproducirlo por el problema geometrico).
A modo de ejemplo, en la imagen le deje todas las opciones disponibles y conecte directamente (dos para el triangulo) para tratar de generar los octagonos.
- La parte final es simple, desde el centro del triangulo se genera una linea hacia las opciones disponibles para generar un plano perpendicular para la simetria y luego se rota en 90° (que creo debería ser otro angulo). Puedes mover el slider del plano perpendicular para generar la interseccion deseada en los triangulos (0.5 para interseccion completa).
Como ya te indicaron, yo tampoco hice el tema de las areas.. pero deberia ser simple en mi definición: Calculas el area del output H (triangulos), aplicas flatten, mass addition y si el numero resultante es mayor al area de la placa que quieres, debería generar un valor falso que va en el input B de hoopsnake.
Sorry que no haya ocupado tu definicion, pero ocupe un grasshopper antiguo y ademas ya había solucionado un problema similar con un alumno el semestre pasado, asi que realicé lo que me acordaba :D
Saludos y suerte!
…
oCommonSDK, I modified a working C# component that does something similar (ReduceMesh, written by Andrew Heumann). Both scripts are attached.
Aside from changing the component name and eliminating the P parameter, I made two modifications to the script:1) changed line 87 from private void RunScript(Mesh M, double P, ref object A) to: private void RunScript(Mesh M, ref object A)2) changed line 93 from: Rhino.RhinoApp.RunScript("_-ReduceMesh _ReductionPercentage " + Convert.ToString(P) + " _Enter", false); to: Rhino.RhinoApp.RunScript("_-MatchMeshEdge " + " _Enter", false);When I run the ReduceMesh component, the mesh object I feed it gets baked, the ReduceMesh command is run, the temporary object is deleted, and the reduced mesh result is returned. (Thanks, Andrew).When I run the MatchMeshEdge component, the mesh object I feed it is baked, the MatchMeshEdge command is run, but the temporary object is not deleted and no result is returned. The runtime error reads: "Sequence contains no elements (line 0)". I have a feeling that the command line string I am handing to RunScript is incomplete. When I enter it manually on the Rhino command line I see that it wants a mesh and three parameters. Of course I can hit Enter to accept the default values, but when you invoke a command through RunScript do you have to supply all parameters regardless? Also, where would I find details on the argument types that the command wants? For example, the last parameter reads "RatchetMode=On" or "RatchetMode=Off". How do I know if the type is Bool or the literal string "On" or "Off"?I am a complete novice at this so any help you can provide would be greatly appreciated! …
t, you can see 6 (+) signs with what you can add (A,B,C,P,Q,R).
Let's say you add A = 90 and B = 50.
Now you can't add the third angle (cause its 180-(50+90) = C output).
What you can add at the moment is P,Q,R.
You choose to add P = 10.
There is no more a possibility to add Q and R.
All component outputs now give us the data.
2. Triangle with P,Q,R
When you zoom the component, you can see 6 (+) signs with what you can add (A,B,C,P,Q,R).
Let's say you add P = 15, Q = 20.
Now if you add R, the component's outputs all the angles and edge lengths.
If R > P+Q then component throws warning. (> or >= ?)
You cannot add A,B or C anymone.
3.Triangle with P,Q and C
When you zoom the component, you can see 6 (+) signs with what you can add (A,B,C,P,Q,R).
Let's say you add P = 15, Q = 20.
Now if you add C (angle), the component's outputs all the angles and edge lengths.
You cannot add A,B or R anymone.
To make it all easier, disable the possibility to internalize the data.
Tolerance issue... Maybe round the angles always to floor , with 0.1 precision ?
…
We are posting a few experiments, created with the work-in-progress RABBIT 0.2. We plan to release it within a week or two…
RABBIT 0.2 has a lot of new features:…
Added by Morphocode at 8:42am on February 23, 2010
being driven by the wii nunchuck... But, here's my issue. I tried it first by having the output from the listener be a 6-digit number... so, I'm using the (CInt(Val(StoredValue))) command and it's writing out 181130... and I can easily split it up selecting the Left(x,3) or Right(x,3)... I first rant that number through a Format("{0:000000}",x) so that even if one of the accx or accy numbers were a 2-digit number (so my overall number would only have 5-digits)... with this Format function... I'm always assured a 6-digit number. And this method works... except...
If the first group of numbers coming in only has 2-digits... So, lets say the accelerometer read out of the first one (accx) is 89. Let's say the accy read out is 119. So, when I run this through the Format function to make it have at least 6 digits, my number now reads 011989. So, if I were to take the first three numbers on the right, my read out would be 989... which is much higher than my expected (60-180 range that is really coming over the Serial Port)... So, I'm back to where I started... in that I need to figure out a better way to split up the data.
Which brings me to your method. I tried it as well... in fact, I added a comma in the serial readout, so the string coming out of the listener reads 89,119. So, I can use your trick to go look for a delimeter and then read to the left and right a certain number of digits... The problem I still have is that the data going into the function is a string, and thus even if I split the 3 digits to the right of the comma out (so, my output says 119)... it's still a string, and my number parameter is still red. In your picture above, was your original 181 130 a number or a string? My guess is that it was understood as a number, because your number parameters at the end are accepting the value. But, in my case... I'm still stuck with the inability to convert a string to a number... Does this make sense? And are their any other workarounds?…
Added by Andy Payne at 9:42am on September 3, 2009
ned' as this is kind of unknown to me, which is why I wanted to look for a tool or script that might generate some geometry between the two. The fundamental principle is that the input meshes must retain 90+% of their original geometry (ie not deformed into an approximated wrapped shape) but be joined together by some sort of mesh geometry which acts as a link between the two shapes. The form for this could be highly abstract and doesn't need to conform to any parameters other than allowing the original meshes to be highly visible. I hope that makes sense, it may only be clear in my mind now that I have pursued it this far!With regards to the geometry wrapper, I found the example file that you sent us and attempted to plug in similar variables with my meshes, however the values returned by the geometry wrapper are constantly zero, no matter what I seem to change. I am currently plugging the mesh into a bounding box, which forms the box for both the geometry wrapper and iso surface and then inputting integers for the remaining parameters, though I'm not quite sure what actions these are performing. Would it help if I could send you my definition? I'm currently trying to internalise my meshes, though my rhino keeps crashing when I try! If you aren't able to follow any of the above let me know and I'll try and put together some simple diagrams that may explain it better.
Thanks,
Tom…
Added by Tom Jelley at 3:28pm on November 12, 2014
unique properties (color, UV map, vertex normal) the vertex is duplicated. So if you weld a mesh using the weld command with an angle tolerance of more than 90 degrees you're left with a box with 6 faces and 8 vertices.
It's quite a common way to describe meshes, Also the way your graphics card consumes meshes, so there's little CPU processing needed to process the meshes and feed them to the graphics card. If it's hard drive space you're worried about, there may be some compression possible. Apart from primitives, I don't know a geometry that do not represent a box by having four faces (including maya's polygons).
A mesh is considered closed when there are no naked edges. So for boxes this does not return false. I assume that internally spatial queries are used (or perhaps a check if the vertices are exactly the same)(see https://github.com/mcneel/rhinocommon/blob/master/dotnet/opennurbs/opennurbs_mesh.c )
Conclusion: If you want faces to show as having a (semi) creased edge, you'll have a vertex direction for each vertex.
However, if your goal is to make gears, I'd skip the whole part of creating meshes, and leverage Breps and extrusions to create the geometry, or using Extrusion (the geometry) might be a solution to create lightweight geometry, and forget about creating meshes yourself.
…