Friday, 25 July 2014

Dynamics of a Strandbeest leg

So one of my upcoming projects is going to be based off of a Strandbeest leg so I decided to to see about create some equations to fully plot how the leg moves given a set of lengths and crank rotations.

So to start off I have to define an origin. The best place i can think of to set the origin would be the base of the crank. After that I want to label each of the vertices.

So using the following diagram I am going to define the vertex between segments m and l as point
\[\begin{aligned} O &= (O_x, O_y) \\ &= (0, 0) \end{aligned}\].


From there I will define the end of segment m as point \[ A = (A_x, A_y) \]

I can easily define a set of equations for the the point A as \[\begin{aligned} A &= (A_x, A_y) \\ &= (O_x + m \cos(\theta), O_y + m \sin(\theta)) \end{aligned}\]

The next two points that are very easy to define are the fixed "knee" and "hip" points. 

The "hip" point is the vertex joining segment a and segment l. Because these points are fixed relative to the origin. I am labelling this point \[\begin{aligned} B &= (B_x, B_y) \\ &= (O_x, O_y - l) \\ &=(0, -l) \end{aligned}\] You may notice that I have predefined this to be directly below the origin which is not technically correct but it is in line with the original design of the leg.

Similarly the "knee" point is the vertex between the segments a, b, c, and d. This point can be defined as \[\begin{aligned} C &= (C_x, C_y) \\ &= (B_x - a, B_y)\\ &= (-a, -l) \end{aligned}\]


The first difficult point to define I am going to label point D and it is the vertex connecting segments j, b, and e. This is a difficult point because There are more restrictions on this point. The first way to define this point is relative to segment j.

\[\begin{aligned} D &= (D_x, D_y) \end{aligned}\]

I know that the point D has to be a distance \[ \|DC\| = b \] away from point C. I also know that point D is a distance \[ \|DA\| = j\] from point A.

\[\begin{aligned} \|D - A\| &= j  \\ \|(D_x, D_y) - (A_x, A_y)\| &= j \\ \|(D_x - A_x, D_y - A_y)\| &= j \\ (D_x - A_x)^2 + (D_y - A_y)^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + D_y^2 -2D_yA_y + A_y^2 &= j^2 (1) \end{aligned}\]

\[\begin{aligned} \|D - C\| &= b  \\ \|(D_x, D_y) - (C_x, C_y)\| &= b \\ \|(D_x - C_x, D_y - C_y)\| &= b \\ (D_x - C_x)^2 + (D_y - C_y)^2 &= b^2 \\ D_x^2 -2D_xC_x + C_x^2 + D_y^2 -2D_yC_y + C_y^2 &= b^2 (2) \end{aligned}\]


Subtracting equation (1) from equations (2) I end up with \[\begin{aligned} -2D_xC_x + 2D_xA_x + C_x^2 - A_x^2  -2D_yC_y + 2D_yA_y + C_y^2 - A_y^2 &= b^2 - j^2 \\ 2D_x(A_x - C_x) + 2D_y(A_y - C_y) + C_x^2 - A_x^2 + C_y^2 - A_y^2 &= b^2 - j^2 \end{aligned}\]

Substituting our equations for A and C we get \[\begin{aligned} 2D_x((O_x + m\cos(\theta)) - (B_x - a)) + \\ 2D_y((O_y + m\sin(\theta)) - (B_y)) + \\(B_x - a)^2 - (O_x + m\cos(\theta))^2 + \\ (B_y)^2 - (O_y + m\sin(\theta))^2 &= b^2 - j^2 \\ \end{aligned}\]

Adding in our equation for B we get \[\begin{aligned} 2D_x((O_x + m\cos(\theta)) - (O_x - a)) + \\ 2D_y((O_y + m\sin(\theta)) - (O_y - l)) + \\(O_x - a)^2 - (O_x + m\cos(\theta))^2 + \\ (O_y - l)^2 - (O_y + m\sin(\theta))^2 &= b^2 - j^2 \\ \end{aligned}\]

Finally substituting our values for O we get \[\begin{aligned} 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 - m^2\cos^2(\theta) + \\ l^2 - m^2\sin^2(\theta) &= b^2 - j^2 \\ 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 + l^2  - \\ m^2(\cos^2(\theta)  + \sin^2(\theta)) &= b^2 - j^2\end{aligned}\]

Using the Pythagorean formula for sings and cosines \[\begin{aligned} \sin^2(\theta) + \cos^2(\theta) = 1 \end{aligned}\] we can simply the above to: \[\begin{aligned} 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 + l^2  - m^2 &= b^2 - j^2 \\ 2D_x(m\cos(\theta) + a) + 2D_y(m\sin(\theta) + l) &= b^2 - j^2 - a^2 - l^2 + m^2 \\ D_x(m\cos(\theta) + a) + D_y(m\sin(\theta) + l) &= \frac{1}{2}(b^2 - j^2 - a^2 - l^2 + m^2) \\  D_y(m\sin(\theta) + l) &= -D_x(m\cos(\theta) + a) + \frac{1}{2}(b^2 - j^2 - a^2 - l^2 + m^2) \\  D_y &= -D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\end{aligned}\]

Plugging this equation back into our original equation (1) we get \[\begin{aligned} D_x^2 -2D_xA_x + A_x^2 + D_y^2 -2D_yA_y + A_y^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + \\ \left(-D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\right)^2 \\ - 2\left( -D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\right)A_y + A_y^2 &= j^2 \\  \end{aligned}\]

Let \[\begin{aligned}\beta &=  \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)} \\ \gamma &= \frac{m\cos(\theta) + a}{m\sin(\theta) + l} \end{aligned}\]


Then \[\begin{aligned} D_x^2 -2D_xA_x + A_x^2 + \left(-D_x\gamma + \beta\right)^2 - 2\left( -D_x\gamma + \beta\right)A_y + A_y^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + D_x^2\gamma^2 - 2D_x\gamma\beta + \beta^2 + 2D_xA_y\gamma - 2A_y\beta + A_y^2 &= j^2 \\ D_x^2(\gamma + 1) +D_x(-2A_x-2\gamma\beta+2A_y\gamma) + A_x^2 + \beta^2-2A_y\beta+A_y^2 -j^2 &= 0\end{aligned}\]

Using the quadratic formula we can solve for this as \[\begin{aligned} D_x &= \frac{-(2A_x - 2\gamma\beta + 2A_y\gamma) \pm \sqrt{(2A_x - 2\gamma\beta + 2A_y\gamma)^2 -4(\gamma + 1)(A_x^2 + \beta^2-2A_y\beta+A_y^2 -j^2)}}{2(\gamma + 1)}\end{aligned}\]

Substituting in the equations for A and O I can expand this out to be \[\begin{aligned} D_x &= \frac{-(2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma) \pm \sqrt{(2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2 -4(\gamma + 1)(m^2\cos^2(\theta) + \beta^2-2m\sin(\theta)\beta+m^2\sin^2(\theta) -j^2)}}{2(\gamma + 1)}\end{aligned}\]

Taking parts individually first I have \[\begin{aligned} (2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2  &=&\left(2m(\cos(\theta) + \sin(\theta)) - 2\gamma\beta\right)^2 \\ &=&4m^2(\cos(\theta) + \sin(\theta))^2 \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2 \\ &=&4m^2(\cos^2(\theta) + \sin^2(\theta) + 2\cos(\theta)\sin(\theta)) \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2\end{aligned}\]

Using the pythagorean formula for sings and cosines as well as the double angle formulas for sine and cosine I can simplify this to be \[\begin{aligned} (2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2  &=&4m^2(1 + \sin(2\theta)) \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2 \\ \end{aligned}\]

Next section: \[\begin{aligned} m^2\cos^2(\theta) + \beta^2-2m\sin(\theta)\beta+m^2\sin^2(\theta) -j^2 &= m^2(\cos^2(\theta) + \sin^2(\theta))-2m\beta\sin(\theta) + \beta^2 - j^2 \\ &=m^2 -2m\beta\sin(\theta) + \beta^2 - j^2\end{aligned}\]

Going back to our equation for dx we have \[\begin{aligned} D_x &= \frac{2\gamma\beta -2m\cos(\theta) - 2m\gamma\sin(\theta) \pm \sqrt{4m^2(1 + \sin(2\theta)) - 8m\gamma\beta(\cos(\theta) + \sin(\theta)) +4\gamma^2\beta^2 -4(\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{2(\gamma + 1)} \\ &= \frac{2(\gamma\beta -m\cos(\theta) - m\gamma\sin(\theta)) \pm \sqrt{4(m^2(1 + \sin(2\theta)) - 2m\gamma\beta(\cos(\theta) + \sin(\theta)) +\gamma^2\beta^2 -(\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{2(\gamma + 1)} \\ &= \frac{\gamma\beta -m\cos(\theta) - m\gamma\sin(\theta) \pm \sqrt{m^2(1 + \sin(2\theta) - 2m\gamma\beta(\cos(\theta) + \sin(\theta) +\gamma^2\beta^2 - (\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{\gamma + 1}\end{aligned}\]

This will give me 2 points that correspond to the 2 intersection points between a circle of radius b centered at point C and a circle of radius j centered at point A. One will be for the vertex described. The second one would appear somewhere below the point C. At this point I don't have a good idea of which point I will need.




math test

Lots and lots happening but right now I am working on building a mathematical paremeterization for the strandbeest walking leg. There are a lot of equations so to be able to keep a good copy I want to just write it right into LaTeX here but before I can do that I have to test if the js interpreter will work.

I will be trying to set up mathjax 



\[\begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned} \]
seems to work for me, now to try and remember how to write LaTeX

Tuesday, 24 June 2014

Ginger kids

So today was the day that i finished off making the ginger beer. Its a simple enough process sonce you have your ginger bug going.

For some reason my ginger bug didnt really get bubbly so its possible that not enough yeast survived to make it bubbly or it may have been that leaving the jar open caused too much of the co2 to escape. In either case it doesnt matter. Either i will end up with ginger beer or sugary ginger favoured water.

To make the beer i simply boiled some water with grated ginger with 1.5 cups of sugar for 15 minutes. I then let it cool to room temperature before straining the ginger out and squeezing in 2 lemons and adding the ginger bug.

Once that is all done all i had to do was top up the water to 4L and bottle it. I am currently trying to stay away from plastic bottles so i decided to put it straight into glass bottles. The problem with glass bottles is that they can xplode if too much pressure builds up so i have to remember to release some of the pressure every week or so. Hopefully i will still get some bubbles in the beer.

One thing that i did differently this time is that i actualoy measured the specific gravity of the beer before bottling. By comparing this measure to another measure after the ferment i will be able to calculate the amount of alcohol in the beer. Todays measure was 1.36.

~(' ')~

Saturday, 21 June 2014

Adventures

Fucking app doesnt save when you switch to another app. Get with it google. So this will be the super abridged version cause i dont want to type all this out again.

Lots of advetures. 6am made scones fir breakfast. Went to market on bikes. Went to street wide yard sale with parents. Found 2001 a space odyssey record. Went to small steampunk festival. Went to hydroponics store for project Talia is working on. Had dinner at cool ramen place on bloor called kinton. Not ad good as hokaido but kuch better than kenzo. Came home and crashed for a while then decided that i really wanted to get a record player since i had a record now. Walked up to a realoy nice store called june records and picked up a simple turntable. Not the best i could get but a nice one for the price. Came home and listened to theme from 2001 and then put in new daft punk album. Sounds really nice.

Bed time ~(> <)~

Thursday, 19 June 2014

Vacuuuummm fail

So today instead of doing some cooking i decided to concentrate on electronics. There have been a couple projects kicking around in my head but before i could do any of them i had to set up my new soldering iron and helping hands.

The first thing i have been working on is a fan to vent away the solder smoke while i work. This started as an instructable addition to the helping hands project that i have but my fans were much to heavy for the arms. Instead i decided to the and make a mini vacuum system using the fan.

I attached the fan to a funnel shared piece of plastic (its actually a platic martini glass from the dollar store) and then a long hose to the funnel in the hopes of having a vacuum.

To make everything fit together i used some scrap cardboard and hot glued it all.

Once everything was glued together it was time to hook up a power plug to the fan and see how kuch suction i got. Thankfully i had a random 12v power pkug floating around and my fan required 12V.

After some soldering confusion in which i soldered the ground lead to the wrong wire on the fan I was good to test...

Sadly the project was a flop. Somewhere between the fan and the end of the 10 ft tube i was using as a hose i lost all suction power. :( oh well. It did give me a chance to use ky soldering iron fir the first time as well as my helping hands.

The soldering iron is working great. It heats up quickly and for the first time i am able to heat the joint and have the solder flow in instead of having to heat the solder and try to glob it on.

The helping hands on the ither hand is a little less than perfect. I found it evry difficult to line up the hands together as the tubing is ver stiff and doesnt like to mive small amounts. As this is my first set of helping hands ever i dont know if this is a common problem or something specific to using the tubing for the arms. Either way the hands are much better than trying to grow a thrid or fourth hand to hold things.

~(' ')~

Wednesday, 18 June 2014

Chilies

So tonight i finished my chili sauce recipe that i started on the weekend. After letting the macerated chilies sit for three days i decided that it was time to process them.

To make the sause all i had to do was blend up the chilies to a nice smooth paste and cook it for about 10 minutes. After cooking i then strained the sause through a seive and brought it back to the boil before canning it in jars.

I did notice a lot of foam building up while i was cooking the sauce which i have now found out that i should have skimmed off but at the time i wasn't sure. Thankfully i still keep in tought with one of my cooking school teachers. Despite not skimming he foam i think everything should be fine since by the time i started putting the sauce in the cans the foam had all disappeared.

I only had three small jars so i filled those first and then filled one and a bit of larger jars (125ml).

The one part jar i didnt bother canning at it has to be eaten first anyways so it can sit in the fridge. All in all it wasn't that spicy. I added extra sugar because i knew it would be hot.

~(' ')~

Tuesday, 17 June 2014

Kraut

So for tonights cooking adventures i decided to use up the last of a cabbage we had in the fridge by making my first saurkraut.

The process is surprisingly simple.  All you have to do is chop up the cabbage and mix with salt. I did it in batches so after chopping a couple leaves i would toss it in a bowl and sprinkle a pinch of salt.  Occasionally i would take a break from chopping to give the salted cabbage a good beat with my fists. Very therapeutic.

After i finished chopping everything i tossed it all into a clean bottle only to find that the jar i had was way to big. I then moved it into a smaller jar onoy to find out the mouth of the jar is too small to put a weight in to press the cabbage down. Unfortunately  i dont have any other jars so im gonna have to just keep an eye on it and make sure to press it down every so often.

The last picure shows some plastic wrap under the lid just in case there is any kind of reaction with the metal top

~(' ')~

Monday, 16 June 2014

Brewing up a storm

So tonight i decided to try my hamd at some gingerbeer again since i haven't made it in a while. The process is simple but does require some prep work so tonjght i decided to start by making a ginger bug.

A ginger bug is simply a starter mixture used to ferment the larger batch of beer. It's made by pixing some chopped up ginger with sugar and water. I used 2 tsp of each ginger and sugar along with 1 cup of water. Every day for the next week or so i have to mix in some more ginger and sugar until the mixture becomes nice and bubbly.

The big difference in this batch compared to previous ones is i am going to try and measure the alcohol content using a  hydrometer.

~(' ')~

Sunday, 15 June 2014

Things i have been doing

Ok. Im terrible at keeping this updated. So here is some pictures of what i have been up to.

I am currently trying to make my own hot sauce. The recipe seems simple but damn does it look hot. For the first batch i actually used five different types of chillies including thai green chillies, jalapeneos, and scotch bonnets. In an attempt to make it not so deadly i deseeded all of the chillies excet for the thai green cause they were too small to deseed. I also added extra sugar so we will see how things go. Currently the chopped up chillies are sitting in the sugar and vinegar mixture with garlic and salt. Next step is to blend them into a smooth paste and then can them. This is just one of the many canned recipies i picked up in my canning and preserving class that i just finished.

The next two photos are a cooking based art project i found on youtube and throught i would give a try. The idea is to clean chicken bones and use them to make dragon skeletons. This is the second time i have tried to clean chicken bones. The first time didnt work out to well for me. This time i started wih boiling the bones with some dishwasher soap and when that failed i got an old toothbrush and a parring knife and cleaned things by hand. Now that the bones are clean i can whitten them with peroxide and then connect them with jewelers wire. I think the first dragon i am going to attempt to make is going to be toothless from how to train your dragon 2 which is a pretty good movie btw.

~(' ')~