Category Archives: Miscellaneous

It’s a CKP!

Chi-ku-pa! Chi-ku-pa! CKP! CKP!

Chi-ku-pa! Chi-ku-pa! CKP! CKP!

Not too long ago, the song ちくわパフェだよCKP (Chikuwa Parfait da yo CKP) came out on Japanese Bemani rhythm games. You can listen it here (it’s catchy!).

Thanks to the song, Viva and I set out to create a chikuwa parfait! For reference, chikuwa is a squishy tube-shaped food with a fishy taste. They’re great in noodles but why someone would put it in a parfait, I have no idea.

Chikuwa!

Chikuwa!

From the lyrics, the ingredients are:

Cream vanilla ice cream strawberries and banana and the main is

Of course (of course! (*’ー’*)♪) chikuwa meu (chikuwa (*゚ ワ゚) ?)

And if you add melted chocolated it’ll be complete

It’ll be fine. It’ll definitely be fine! ヽ(‘ヮ’)ノ

Layering these ingredients, with the addition of chocolate-flavoured cereal (a custom addition), we created a chikupa. I have to say, the taste was… interesting. The chikuwa tasted horrible on its own but if you can manage to eat it along with lots of cream or ice cream, you won’t taste any fishiness.

But next time I’ll stick to normal parfaits.

Advertisements

Graph drawing in LaTeX

Graphs? No, not pie graphs. Not even graphs of functions. THESE graphs.

Yesterday I tried making LaTeX notes for one of my maths courses. Not so much because I needed digital notes (to be honest it would have been much faster on paper), but because I wanted to get some practice at typing up documents in LaTeX.

I aimed to finish the discrete maths half of the course in a day, just to see how quickly I could make the document. After all, LaTeX has a steep learning curve, and some people, like me initially, probably have the impression that LaTeX would be slower than other what-you-see-is-what-you-get word processing software. Well, I met my aim.

However, to be fair, discrete maths only involved a lot of equations, which are easy to type up once you’re used to it. Graph theory, the other half of the course however, would definitely take longer due to the diagrams that had to be drawn. Well I thought it would take a very long time, but that’s because I only started looking into how to draw LaTeX graphs today.

It’s a shame that I only know a few words of French. At least the code’s in English though

I found out, after some research, that there is a tkz-graph package for LaTeX. It makes graph drawing pretty easy. Installing it took some figuring out, but it turned out that MikTeX has an installer for packages inbuilt, which was very useful.

The good thing about tkz-graph is that you can define vertices, and then reference them when creating edges. I haven’t worked out most of the features yet, but I can make some simple graphs now at least.

Simple graphs.

Here’s the code I used to generate the first of the graphs (the other two are similar):

\begin{minipage}[b]{0.3333\linewidth}
\centering
    \begin{tikzpicture}[scale=.5]
        SetGraphUnit{2}
        \GraphInit[vstyle=Classic]
        \tikzset{VertexStyle/.style= {fill=black, inner sep=2pt, shape=circle}}

        \begin{scope}[rotate=135]
        \Vertices[Lpos=135, unit=2, NoLabel]{circle}{A, B, C, D}
        \end{scope}

        \Edges(A, B, C, D)
    \end{tikzpicture}
\end{minipage}

For those interested, here’s a few quick notes about what I know, and don’t know about the above code:

  • The \begin{minipage} is what allows me to show three graphs side by side. Make sure your minipage blocks of code don’t have any empty lines in between them though, or your diagrams will appear under each other as opposed to adjacent (empty lines are like telling LaTeX “I want a new paragraph!”)
  • I’ve got SetGraphUnit{2} there, which refers to how far about everything is. However, I’ve also got unit=2 when defining the vertices – I put that there because for some reason some graphs were turning out smaller than others if I didn’t have it…
  • In the \tikzset command, inner sep=2pt makes the vertices smaller than their usual size.
  • The Lpos=135 argument of the \Vertices command refers to the positioning of the vertex labels in relation to the vertices (135 degrees rotation). I’ve also set labels off with NoLabel though, so it’s not actually doing anything.
  • \Edges draws edges continuously, so \Edges{A, B, C, D} draws the edges AB, BC and CD.  For a single edge, use \Edge(A)(B).

I’m only just starting out though, so this will get interesting when I have to draw more complex graphs. As a forward reference though, here’s some things I’ll be expecting to use:

  • There is a label option for the edges, which will come in handy for weighted graphs.
  • tikz supports a \foreach command, which is like a programming for loop for repetitive tasks. This will probably come in useful for drawing complete graphs.

An overview of past projects

High school quality graphics.

Over time you learn new things, and find new ways to apply what you know. Or maybe there’s something you don’t yet know but want to learn, so you decide to look it up and play around with it.

That, in a nutshell, is how my post-primary school life went. I’d (infrequently) embark on new experiments, generally digital ones, and make something small over the course of a few days. Rarely did I ever create a large project which gave off a sense of completion, but nonetheless even the small projects were nice learning experiences.

Here I thought I’d share… quite a lot of these projects. Maybe you’ll find my journey amusing, and consider this a nice read. Or maybe I can somehow motivate you to try things you’ve never done before. Either way, enjoy.

(This is quite a long post, so feel free to skim the page and read the parts that look interesting. My heartfelt thanks goes to you if you end up reading it all though.)

Continue reading