Blog

21 Apr 2012 . .
Map a point within a triangle from low dimensions to high Comments

The work I have been doing recently is to explore a mapping from a low dimensional space(10d) to a high dimensional space(160d). Although is not a particularly common problem is something that requires a little thinking.

The obvious solution is to measure the distance, from the point to the three, triangle points. This of course is difficult to rationalise to a ratio that sums to 1.

Barycentric-BasicMapping

This problem becomes more obvious when a point lies on one of the points on the triangle. For example, this could result in a distance of [0, 50 50]. This distance means that if you project this using this information even if normalised, the point will not lie on the triangle coordinate in the higher dimensional space.

To be able to map between two triangles accurately the best solution is to utilise Barycentric coordinates. This turns the 3 points of the triangle into three vertices. Using this information you are then able to solve to find the ratios to accurately map between the two spaces.

Barycentric-Mapping

Therefore to generate a new point in 2D, you have:

To get to this point we need to solve the equations for lambda, resulting in n equations for each of the different dimensions.

This can be solved relatively easily using a linear solver.

So now using this information it is easy to project the point from one triangle to the other. We have provided a Matlab solution to be able to easily map using two triangles.

1 A = []; 2 B = [] ; 3 for i=1:size(ntA,1) 4 line = [(ntA(i,1) - ntA(i,3)) (ntA(i,2) - ntA(i,3)) ]; 5 B = [ B ; (ntA(i,3) - Qn(i)) ] ; 6 A = [A ; line]; 7 end 8 Lambda = linsolve(A,-B);

Therefore you can map the new point using

1 Lambda = [Lambda ; ( 1 - Lambda(1) - Lambda(2) )]; 2 3 pB = sum(tB .* repmat(Lambda',[],size(tB,1)),2);

 

You can view a complete version of this code, as well as a test case Files.

See: Files –>  Barycentric Coordinates

Equations thanks to the ever wonderful Wikipedia


Stuart James  


21 Apr 2012 . .
How smart phones change Comments

DSC_0435

Have just been routing through some old boxes, and discovered an Xda IIi, in fairness its not the oldest Xda I have owned. This is a nice comparison what I remember to be massive isn’t that big, the old Xda’s were just thick

DSC_0440


Stuart James  


16 Mar 2012 . .
Windows 8 on Low Res Netbook (with Touch...ish) ... continued Comments

Prev Post: Windows 8 on Low Res Netbook

Let me start by restating I am aware that netbooks are below the resolution supported by the consumer preview tech specs. But today I was just heading out the door and needed to check an address online, so booted up Win8 swivel netbook. Sounds fairly sensible? well not as much as I thought. Hit the start key type Internet as you would but unfortunately that Internet found was the metro version. This of course hit problems for being able to run the application since it just displayed the previous error message.

Again I restate this is below tech specs, but I really hope they do something about this. I believe there is another way in Win8 to launch applications, will need to look into...


Stuart James  


15 Mar 2012 . .
Windows 8 on Low Res Netbook (with Touch...ish) Comments

I played around with Window 8 consumer preview for a while on a vm on a high-end laptop, but after a while got bored of the lack of touch support so decided would give it a try on my Asus EeePC with Swival Touch Screen. Before I say anything I am aware that the tech specs say that this screen is below resolution. I installed it primarily to find out what the result of installing on a very common piece of hardware.

Windows 8 Consumer Preview error on low res

Well as you can see the error is handled, but the problem comes is it essentially makes the merto interface completely useless. In fact it makes it more than useless it is very annoying pressing start key then being presented with a load of icons that you cant click... 

I hope they put in some fall back options for low res monitors, otherwise they will eliminate all notebooks atleast for update.


Stuart James  


15 Mar 2012 . .
Watch for a Baldur's Gate Announcement Comments

Baldur's Gate Countdown

Update: New Baldur's Gate game in the summer with updated graphics etc... meh too obvious


Stuart James