Monthly Archives: May 2010

Mondrian was missing out.

Posted by in Ramblings Comment on this

If he’d used TiKz and LaTeX he’d have got his work done so much faster.

Here is my coded version of ‘Composition II in Red, Blue, and Yellow’. Yes, it has a black border that isn’t there on the original. But I left it there to provide some contrast.

Code?
Since you ask so nicely:
\begin{figure}
\begin{tikzpicture}
\draw[black, line width=0.3cm, fill=red] (-3.5,-3.5) rectangle (7,7);
\draw[black, line width=0.3cm, fill=blue] (-7,-7) rectangle (-3.5,-3.5);
\draw[black, line width=0.3cm, fill=white] (-3.5,-3.5) rectangle (-7,3);
\draw[black, line width=0.3cm, fill=white] (-7,7) rectangle (-3.5,3);
\draw[black, line width=0.3cm, fill=white] (5.5,-3.5) rectangle (7,-7);
\draw[black, line width=0.3cm, fill=yellow] (6,-5.25) rectangle (7,-7);
\draw[black, line width=0.3cm, fill=white] (6,-7) rectangle (-3.5,-3.5);
\draw[black, line width=0.3cm] (-7,-7) rectangle (7,7);
\end{tikzpicture}
\end{figure}

Get laid? What’s that? :-P



I'm wondering…

Posted by in Ramblings Comment on this

if it’s possible (and hence challenging myself) to fit my entire thesis onto a floppy disc. Yup, what will probably be a 300ish page, upto 120,000 word document, plus numerous images… onto a floppy disc. A 1.4mb disc. Seems a bit ludicrous I admit, and by no means am I going to break my back doing it, but I reckon it’s feasible. This beloved readers is part of the joy of LaTeX. No, no, not latex however much joy that may bring, LaTeX.

For example. this evening (yes a Friday evening) I stayed in the office till gone nearly 11pm working out some code. (Sad bastard, yes). You don’t need an image editor or anything fancy (or even basic like Paint) to create images. All you need is code, beautiful code. And it comes with advantages too.

Take this image here, this is what I was working on. It doesn’t look much, but it shows exactly what I need it to. Now, it could have been created in minutes in Paint or whatever, but, and this is the crucial bit, the size of the file would vary massively and you would be constrained by the dimensions you set-out initially. So if you make your image one size that’s it. If you want it bigger it’s going to pixelate and look shoddy. If you code it then it has no strict boundaries or limits, it will be regenerate freshly each time depending upon the size you specify, therefore meaning no degradation in quality. Always crisp and beautiful.

Now for size.

A LaTeX timeline

A LaTeX timeline

The image shown here is 66kb as a jpg (62kb incidentally when generated as a pdf). But this is post code generation; the actual code is much, much less. This image in code form is 1,519 bytes, or 1.48kb. Or in more nutty terms, almost 42 images for the same size as one pdf image. Now being realistic I’m probably not going to need many more images than 42, but if I needed to I could, and still more than happily fit them and all the text onto the floppy disc.

So there you have it. Perfect sense.

Now if anyone is actually debating this, I promise with a bit of practice it’s not that bad. OK I lie, it’s infuriating and I’m capable of managing basic stuff but learning more everyday. So here’s the code required for this image. Have a pleasant evening, I have!

\begin{figure}[ht]
\resizebox{15cm}{!}{
\begin{tikzpicture}
%Draw rectangles and overlay using xshift and yshift
\draw[black, thick, fill=white] (-3,-2) rectangle (3,2);
\draw[black, thick, fill=white, xshift=4cm, yshift=-3cm] (-3,-2) rectangle (3,2);
\draw [black, thick, fill=white, xshift=8cm, yshift=-6cm] (-3,-2) rectangle (3,2);
\draw [black, thick, fill=white, xshift=12cm, yshift=-9cm] (-3,-2) rectangle (3,2);
% Text within rectangles aligned with above figures
\node [scale=2] {[Task Cue]};
\node [xshift=8cm, yshift=-6cm, scale=2] {[Target]};
% Text below rectangles
\node [xshift=-2.25cm, yshift=-2.25cm] {1000ms};
\node [xshift=1.75cm, yshift=-5.25cm] {1000ms};
\node [xshift=6.5cm, yshift=-8.25cm] {Until Response};
\node [xshift=9.75cm, yshift=-11.25cm] {150ms};
% Enclosing curly brace and text above
\draw [black, decorate, decoration={brace, amplitude=5pt}] (-3,-9) — (2.75,-9)
node [black, midway, above=4pt] {\LARGE Target Stimuli};
% Mini stimuli images
\draw (-2.5,-10) node[draw,circle,minimum size=1cm,fill=red!100,draw=black,thick]{};
\draw (-1,-10) node[draw,minimum size=1cm,fill=blue!100,draw=black,thick]{};
\draw (0.5,-10) node[draw,circle,minimum size=1cm,fill=blue!100,draw=black,thick]{};
\draw (2,-10) node[draw,minimum size=1cm,fill=red!100,draw=black,thick]{};
% adjustments for line width choose: line width=2pt or very thick etc
\draw[->>, line width=2pt, blue, dashed] (4,2)–(15,-6);
\node [xshift=12cm, yshift=-9cm, scale=6, red] {\smiley};
\end{tikzpicture} }
\end{figure}



Tom's Music Picks – Splash

Posted by in Music Comment on this

Today’s music pick is Splash by Sub Focus, who you may very well have heard at the Radio 1 Big Weekend. This track has gone and dug itself into my head, and I can’t help but love it more every time I play it. Enjoy.



Muse 8-bit?

Posted by in Music Comment on this

I love finding random geeky crap on the internet, so here’s Stockholm Syndrome by Muse in 8-bit.



The Radio 1 Big Weekend

Posted by in Ramblings Comment on this

Now I’ve had a shower, and downed a few pints of water, I think it’s time for the obligatory Radio 1 Big Weekend post. Had an awesome day today, and while I’d love to sit here and reel off every single great memory, I’m up early for work tomorrow, and you’d get bored. So I’ll condense much of the awesomeness into nifty bullets.  Here are some of the best moments:

  • Having a go at Tai Chi – really enjoyable actually!
  • Plan B’s cover of Seal – Kiss from a Rose.
  • The fact that wherever you went, you ran into someone you knew.
  • Not catching Bieber Fever.
  • The Pendulum set (which was epic) wearing a helmet (yes, as in a helmet…it has goggles).
  • Playing rock, paper, scissors with the car behind us in the car park traffic jam at the end.

Most of all, today I felt more happy and smiley than I’ve been in a long time, and yes, that’s down partly to the excitement over the event.  Really though, 99% of it, is down to the people I spent today with, and my happy memories from today will stick with me long after my time in Bangor.

As of a few minutes ago, we’ve reached the end of what has been a surreal and really quite different week for the city. I for one will be sad it’s over, and will be sad to see Radio 1 leave.  So, with that thought, I shall now retire to my bed, to dreams that probably, by comparison to today will seem quite boring.

Night all (and thank you BBC Radio 1).



Just a quickie

Posted by in Ramblings Comment on this

So I’m prepping music and chilling out ahead of this evening – it promises to be quite a novel time. But the chilling aspect requires decent music – check this:

Stornoway – Zorbing. They’re playing at The Big Weekend too, so make sure you check them there if you’re heading that way. Anyhow, I only came across them because a friend directed the video for them. He does lots of quality stuff and his career is really taking off. So yeah, check his work too on www.brownboy.co.uk or www.daveyinc.com.

Anyhow, here’s the music (and video)



Gears of War 3: Ashes to Ashes

Posted by in Geekery Comment on this

While I’m still engrossed in Battlefield Bad Company 2, I’m always looking out for a new game to leech my time.  So, with that in mind, here’s a trailer for Gears of War 3.  While it doesn’t give much away, it hints strongly to the mood of the game, which is due out in April next year.

If you’re wondering what the music is in the background, it’s Heron Blue by Sun Kil Moon.



The home stretch…

Posted by in Ramblings Comment on this

…is under way and this week is a bit of shitter so far. Exam on Friday… Boooo, hiss, hiss and thrice hiss! I quite fancy a piece of dead animal, a smoke and BEER. Like, now.



Tom’s Music Picks – Neutron Star Collision

Posted by in Music Comment on this

If you happened to tune in to Zane Lowe’s show on Radio 1 last night, you probably caught some brand new Muse.  Neutron Star Collision (Love is Forever) is featured on the Twilight Saga: Eclipse movie soundtrack, and while I’ve never understood the whole sparkly vampire thing, the track itself is actually well worth a listen.

The music video is due to debut on MTV this Thursday 20th May, and the track itself is available now via iTunes.




Tom’s Music Picks – Sunday Remixes

Posted by in Music 2 comments so far

Not really a musical pick, but more of a audio cluster bomb of goodness. Here’s a selection of remixes that are currently filling my Sunday. Click read more for remixes of everything from the Yeah Yeah Yeahs to Radiohead.

(more…)