Hello everyone,
I wrote a script to help me code in python and learn RhinoCommon and decided to share it with you π
As you may know, the rhinoscriptsyntax library is written in Python and uses rhinocommon functions, also in Python, under the hood. In order to look up the underlying code you can open up the full python file, you can use the inspect module or you can save the script below to your computer and run it each time you want to look up a particular function. For instance if you search for βboundingβ you get the following options:
I spend too much of my life sitting alone in an office working on my conputer or looking at my smartphone. My regular dose of fresh air comes from my bike - I ride to work and back regularly - but I also enjoy getting out into the garden when I can. Trouble is, I dont really enjoy gardening! I do get a lot of satisfaction from pruning the trees and shrubs, especially if it involves some climbing and as a result we now have an enormous pile of branches, leaves and twigs in the bottom of the garden. I recently found a new activity which satisfies my creative side and starts to diminish the stack o' cuttings : building 'dead hedge' style walls and fences.
Various ways to add leading zeros to a number, for instance a wind direction, using Python. Available as a Jupyter Notebook
First some definitions. The wind direction is measured in degrees clockwise from north and represents the direction the wind is blowing from. For instance an easterly wind, i.e. wind blowing from the east has a direction of 90 degrees. Let's generate 16 wind directions from 0 (north) to 337.5 (north by northwest).
```python interval = 22.5 # degrees assert 360 % interval < 0.001 n = int(360/interval)
directions = [interval * x for x in range(n)]
print(directions)
```
Read Full Post
I have had a few ideas for content to share recently and wanted a good way to do so. I wanted to find a good solution for blog publishing with a few criteria:
I saw that the static site generators Pelican and Lektor were available. That sounds like a good solution as it should be quick and have few moving parts which could break. Lektor looked simple, welcoming and modern enough so I downloaded and installed it. I listened to Talk Python episode 160 as I did so and that encouraged me that I was on a good path.
Listen to Talk Python Episode 160 - Lektor (2018)
My initial experience has been great - I got going with no problem except that at the time of writing I have been waiting over a week for free to get around to setting up my personal web space so I can deploy the site. At least that has given me enough time to configure a basic blog and write my first 2 posts.
OK so I have gone for GitHub pages for hosting with a custom web domain - buying the domain name and specifying it in Lektor and in GitHub pages was enough to get it working properly with https - no need to update certificates every few months !
These are my slides from my talk in 2009 at the Chartered Institute of Building Service Engineers (CIBSE) London HQ about Buro Happold's work on External Comfort and Wind Modelling, covering Computational Fluid Dynamics (CFD), wind tunnel, desk studies and masterplanning studies for projects around the world.
I included some images from our comfort mapping software, which we used to give clear indications of which areas around a new building development would be suitable for what activities based on the frequency of strong winds. I don't know of any other teams around the world who were producing this level of information at that time.
The software was written rather improbably using the Microsoft Access database to read data from a set of (usually 12) csv files representing wind speeds from different directions. A popup window let the user enter coefficients describing the wind speed frequency distribution, represented by a Weibull distribution, for each direction. It was reliable, effective and much faster than the alternative I had available at the time - scripting using the built-in calculators in the Ansys CFX software we used for the wind speed analyses. The end results were then imported and visualised using CFX.
The image below maps out simulated wind (dis)comfort levels around a proposed scheme for the Everton Football Stadium in Kirkby, later abandoned. Areas in reddish orange have a high frequency of uncomfortable wind speeds, blues have low frequency of strong winds. White areas are inside buildings. This was used as part of the project's environmental impact assessment to show the effects of the protect on comfort levels for local people. The indicated activities - seating, walking, are based upon the Lawson criteria, a widely used set of criteria based on research carried out in the UK.
