Archive for the ‘Code’ Category

No Hyper-Threading – Speed up your python code and Rhino commands

Hyper-threading splits up each of your physical processor cores into two virtual or logical cores. This technology can improve the performance of some applications which are optimized for hyper-threading. However, all python code I wrote and almost all Rhino commands do not benefit from hyper-threading technology. You can often run your code (and Rhino commands) twice as fast by simply disabling hyper-threading in your BIOS setup. Just enter your BIOS setup during start-up, go to Config -> CPU -> Intel(R)Hyper-Threading Technology -> Disable -> Save and Exit.


Texlipse viewer settings on Mac

Texlipse is a LaTeX plugin for Eclipse. It’s great. I even find it more convenient than dedicated LaTeX editors. However, I seem to have to figure out how to configure the different viewers over and over again, so therefore a quick post about it.


ShapeOp Python bindings

Recently, the Computer Graphics and Geometry Laboratory of EPFL released the ShapeOp library, which is “a header-only C++ library for static and dynamic geometry processing, using a unified framework for optimization under constraints“.

The process of creating Python bindings for the library is described in the official documentation. However, if you are on Mac and using a non-framework version of Python, such as one provided by macports, anaconda, homebrew …, you may need a few more instructions. I will describe the process for the macports version of Python.


Profile your code

Research in the field of Structural Design is more about developing concepts than implementations. If a concept is sound, the details of the implementation can be figured out later, by someone with more computational and/or programming experience.

Of course, while developing concepts and approaches, we need some kind of implementation to test and prove they actually work. And, let’s face it, we all like writing reasonably fast and robust implementations. Therefore, at one point or another, we all rewrite code to optimise and make it run faster.

In my experience, the slowest part of your code is almost never the part you imagined. Profiling your code before optimising will save you a lot of work.


RhinoVAULT – Scripting and Grasshopper

Just updated and compiled rhinoVAULT v1.1.0.0. It now features RhinoVAULT-specific scripting methods callable in all your scripts (rhinoscript, ironpython). This enables you to easily access RhinoVAULT data such as node coordinates, connectivity information, force magnitudes and more. For example, it is now possible to directly apply geometry components during the actual form finding process.


LaTeX, and how to find those darn symbols

Ever wonder why most if not all your lecture notes have the same layout? Most likely, they were made using LateX.  LateX, pronounced `lay-tech’, is a markup language in which documents can be written before being automatically typeset by a TeX program. It offers programmable desktop publishing, instead of visual (WYSIWYG) desktop publishing offered by programs like Adobe InDesign or Microsoft Word. The reason for using LateX is to focus on content, not on the layout. This does mean giving up a certain amount of control over presentation, or spending disproportionate amounts of time if you wish to enforce certain things in the layout. LateX is also a means to write and possibly share equations. Visual equation editors like MathType use LateX, and all equations in Wikipedia are interpreted from LateX code.