Hello,
I've only recently learned to use Grasshopper, and I've already had to use it for a few school projects. My current project is fairly confusing and complex. Essentially, my goal is to create a height field through Grasshopper over a bitmap of a satellite image of the LA River that I've placed in Rhino. The heights are determined by an Image Sample (based on the light and darkness of the color) that I created in Photoshop and is also placed over the bitmap. I think I have this part down. However, I've tried to create conditional statements in order to give myself the ability to modify heights within the height field based on proximity to such things as highways, the LA River, schools, and parks (by representing them as lines and/or clouds of points and using Curve CP or Point CP). I'm having trouble with the lists, though. For instance, if you look at my code, you can see that the part I'm currently trying to get working involves taking the distance from the center point of the mapped grid to the curves representing the LA River. If it is greater than 5, the numerical value for height generated by the Image Sampler is left alone. If it is less than 5, the height is multiplied by 0. I then need to recombine these 2 lists of numbers that were generated back in the same order from which they were originally derived, so that when the heights are then mapped, the 0 heights appear over and around the curves representing the River. To do this, I feel I either need to be able to generate the lists of true/false statements and keep the null sets, or I need a way to regenerate their order in the original listing based off of the Image Sampler. I've spent the better part of 2 days on this and can't figure it out.
I apologize for my wall of text and possibly difficult/inefficient code. As I mentioned, I'm new at this. Any help would be greatly appreciated.
Chris Tietjen
It's better to post the actual GH file rather than a picture of it. Nobody wants to spend the time to recreate it off of a picture if the file is available.
Feb 5, 2013
Sherif Tarabishy
Hope this helps.
Feb 5, 2013
Sherif Tarabishy
Also on your own script you can just use the same values you are inputting for "dispatch pattern" to the weave's "pattern" input -you might then need to switch the weave's 0 and 1 inputs to work correctly with the true and false values.
Feb 5, 2013