Tuesday, 12 March 2013

Geodesic Domes using Python

Over the last few months I have been learning some of the maths behind geodesic domes. I was specifically interested in being able to generate the coordinates for all the points in a way which had enough accuracy to be able to use in a CAD program.

While I was investigating how the vertex points are generated I found this great site with all the information necessary to calculate the main points of the Icosahedron. From there the algorithm is fairly simple to explain, if a little harder to implement! Each of the 20 triangular faces is divided into smaller triangles according to the frequency of the dome. For example a 5V dome would have each face divided into 5 rows of equally sized triangles. From there each point is projected outwards onto a sphere to create the dome arrangement.

To make this easier and faster, I have written a small program in Python to do exactly this. At the moment it takes in the radius of the geodesic sphere and the frequency, and outputs the coordinates and edges. To make it easier I also made the printed output of the coordinates and edges as a piece of text which can be copied into the CATIA VB script tool, and then run as a VB script to automatically create the points and lines.

If you just want to print the cartesian coordinates then the printing of this CATIA code can be commented out.

As an example, here is a picture in CATIA of a frequency 9 dome with a 10 metre diameter.


Here is another one of a smaller frequency 5 sphere with a 4 metre diameter.


In order to share the code I have created a project on Google Code in a Subversion repository. You can download the code from PyDom or checkout directly with Subversion using the command:

svn checkout http://pydome.googlecode.com/svn/trunk/ pydome-read-only

Please let me know any suggestions for improvements!

The biggest enhancement to this script in the future will be the ability to calculate the angles at which the edges meet at each point. This would be crucial to enable the construction of the hubs to anchor all the edges.

Please let me know of any suggestions or fixes, keeping in mind that this is a work in progress!

Thanks,

Tim

4 comments:

  1. Thanks for making and sharing. I have tried making a 2v 600mm dome using this program to generate the coordinates and importing into solidworks. The problem I am having is the coordinates do not appear to be normalised or projected onto the sphere. Do I have to make any changes other than the configuration file to make the program generate a nice sphere? Thanks again

    ReplyDelete
  2. Hi
    I been building geodesic domes V4,5,6,7,8 with different sizes.
    You can check my free model in Grabcad.
    I always want to build a scrip for solidworks.
    Any idea?
    why are you using CATIA?
    it is better software?

    ReplyDelete
  3. Hi
    I been building geodesic domes V4,5,6,7,8 with different sizes.
    You can check my free model in Grabcad.
    I always want to build a scrip for solidworks.
    Any idea?
    why are you using CATIA?
    it is better software?

    ReplyDelete
  4. Hi , I don't know but due to some bizarre reason, that link is not working. Does anyone has an idea? Please do let me know.
    Thank You.

    ReplyDelete