First Success

21 10 2008

Check this out. A truncated dodecahedral Polywell rendered in CAD.

I created this using ruby to pass draw instructions to mged (the main command line tool for BRL-CAD):

require 'matrix'
phi = (1+Math.sqrt(5))/2
icosahedron = Matrix[
[0, +1, +phi],
[0, +1, -phi],
[0, -1, +phi],
[0, -1, -phi],
[+1, +phi, 0],
[+1, -phi, 0],
[-1, +phi, 0],
[-1, -phi, 0],
[+phi, 0, +1],
[+phi, 0, -1],
[-phi, 0, +1],
[-phi, 0, -1]

icosahedron.row_vectors().each_with_index do |v,index|
`/usr/brlcad/bin/mged -f -c test3.g 'in torus#{index}.s tor #{v[0]} #{v[1]} #{v[2]} #{v[0]} #{v[1]} #{v[2]} 1.0 0.125'`

This basically iterates through the vertices of the icosahedron, and draws a torus normal to the origin. Now we are tantalizingly close to having a CAD file we can render in metal.

About these ads



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 630 other followers

%d bloggers like this: