Author Archive

C++ Error LNK2005 – item already defined in file.obj

Linker errors (LNK) can be a bit more difficult to solve than standard C errors if you don’t know how to read the error output. This is added to by the fact that you can’t double-click the error and be taken to the line causing the problem (if using Visual Studio anyway), so being able

Interpolating data points to produce colour maps – code examples

For a lot of the work I do in my research, I need to produce colour maps which can visualise data in a user-friendly way while still getting across the necessary elements of the analysis performed. In my current area of research, looking at wayfinding tools to analyse healthcare building design for natural wayfinding, I’m

Obtaining the angle between two vectors for 360 degrees

This previous post demonstrated how to obtain the angle between two vectors from three geometric points, providing an angle between 0-180 degrees. However, there may be times when you need the angle between 0-360 degrees instead, as I did earlier this week. As such, this post aims to complete the previous with the solution for

Calculating angle between two vectors from geometric points – code solution

Calculating the angle between two vectors is a fairly easy solution to find online – there are plenty of maths help websites which will take you through step by step how to work out the angle, however, not many sites will provide you with the necessary programming code to put this into your software. As

For loops – running method calls in the declaration

For loops are a key part of recursive code, allowing us to iterate over items in a vector, or perform actions a set number of times without repeating the lines of code. We all know how they can be applied and declared, however, something which may not be very well-known is the ability to call

Mouse Jiggle Tool – Create your own in C#

Mouse jiggling is rarely a useful tool or achievement except in cases where sending the computer to sleep would cause the interruption of another process – a system scan, render, or other such task which takes a large amount of time and you wish to leave it running over night. Even then, the usefulness of

CICE Conference 2015

Monday 22nd and Tuesday 23rd June 2015 saw the Centre of innovative and Collaborative Engineering (CICE) conference held at the Burleigh Court in Loughborough, collecting the minds of the current set of Research Engineers together for talks about the EngD process, writing up, networking and what happens after the EngD is completed. The Monday schedule

Obtaining the points that make up a polyline in Grasshopper/Rhino

As part of my EngD I work alongside other engineers solving day-to-day problems. James, a fellow research engineer at BuroHappold, and I regularly venture down the path of Grasshopper development. James works in Grasshopper for the majority of his work and his website (viewable here) contains a lot of hints and tips on getting Grasshopper

C# Global Keyboard Listeners – implementation of key hooks

In a previous post I briefly outlined the pros and cons of using global event listeners. Although the summary was to use them with caution, the entire use of listeners only came about due to a quick bit of personal programming I did yesterday, in which global listeners were a necessity (due to the program

Global keyboard listeners – pros and cons

As discussed previously, event listeners are a key component to GUI development and good software development. Being able to record mouse clicks, or keyboard keys can enhance the usability of software for the end-users. In this post, I intend to show you how to implement a global keyboard listener for C#. What is a global