Posts Tagged ‘trigonometry’

The Final Trigonometrical Equations (Hopefully!)

Monday, March 8th, 2010

Well well well! I am still going with my trig work, but the more I equate, the easier it becomes. The first set of functions described what to do with the values and this set calculates how to get said values.

The equation I spent the entire afternoon working on takes a distance between 2 points seen by the Wiimote and uses triangulation to calculate the distance of the sensor bar from the Wiimote. Unfortunatley, because the distance between the points is measured in pixels and the distance between the sensor bar and the Wiimote is measured in ‘real’ units (i.e. cenitmetres or inches) there is a conversion or ‘scale’ factor to be taken into account.

…and after all these scribbles, the final equation is as follows:

$$d = {s \over 2 tan \langle{{s \over 2}\times \langle{{\langle{Horiz FOV \over 1024}\rangle + \langle{Vert FOV \over 768}\rangle} \over 4}\rangle}\rangle}$$

Where:
d = distance between Wiimote and sensor bar
s = distance between the 2 points as seen by the Wiimote (pixels)
Horiz FOV = Horizontal field-of-view of the Wiimote, roughly equal to 41° (to be measured)
Vert FOV = Vertical field-of-view of the Wiimote, roughly equal to 31° (to be measured)

The problem, as I mentioned is that the scale of the model has not been set, and d may need to be multiplied by a certain number to make the numbers work, but nevertheless the relationship between d and s should work out to be correct.

Yet more maths to follow!

GCSE Trigonometry

Monday, March 1st, 2010

Well now that I have the technicalities (kind of) worked out, I had to think about how I would work out the viewing angles needed for my screen/window project. Sounds simple, eh? Below are a few drawings for the planning of my system.

As it turns out, I had forgotten a lot of what I had been taught in GCSE Maths, but I eventually got going and used my powers of substitution and diagram-drawing:

To see if the final equations worked, I created a Max patch to check the variable inputs for a 2-dimensional system. The full system will be the same, but with values for the y-axis as well.

Amazingly, the patch returns values that are believeable, but I will only know if it truly works when I get my homebrew Wii Sensorbar made up. I already have on my desk a Wiimote and I have downloaded the Max5 patch to get the data from it:

So expect to see some tech-tests uploaded soon!