LoginSignup
3
2

More than 5 years have passed since last update.

東京オリンピックのロゴの 原案の方を再現しようとしたらより簡単だった件

Last updated at Posted at 2015-08-29

例のロゴ、原案があった?!

おでんやのり弁で再現されたり、ある意味おもちゃと化している例のロゴですが、
原案があったそうです

これも、比較的容易に再現できます。

インスパイヤ元

東京五輪エンブレム for Ruby
http://qiita.com/Peranikov/items/5997cd4437e7aaa8ddab

kawasaki.rb の発表でオリンピックのアレがあったので、早速再現してみた。
cairoが必要です。

まず先に、環境を整える

インストールに手間取りましたが・・・。
http://qiita.com/minos1st/items/723e1aa3f4e73ff339ae

ソースコード

インスパイヤ元のに少し手を加えただけですが・・・。



require 'cairo'

format = Cairo::FORMAT_ARGB32
width = height = 480

surface = Cairo::ImageSurface.new(format, width, height)
context = Cairo::Context.new(surface)

a = 160

background

context.set_source_rgb(1, 1, 1) # white
context.rectangle(0, 0, width, height)
context.fill

top left triangle

context.set_source_rgb(0.7, 0.57, 0.27) # yellow
context.triangle(0, 0, a, 0, 0, a )
context.fill

top right triangle

context.set_source_rgb(0.7, 0.7, 0.7) # gray
context.triangle(2 * a , 0, 3 * a, 0, 3 * a , a )
context.fill

centar black bar

context.set_source_rgb(0, 0, 0) # black
context.rectangle(a, 0, a, a * 3)
context.fill

bottom right circle

context.set_source_rgb(0.9, 0, 0.08) # red
context.arc(2.5 * a, 2.5 * a, 0.5 * a, 0, 2 * Math::PI)
context.fill

surface.write_to_png("tol2.png")

実行結果

tol2.png

解説

原案の方がより単純な仕組みです
1:白い背景領域を用意する(当初のと変わらない)
2:領域上部に三角形のパーツを2つ、配置する(四角形から変更)
3:黒い長方形を配置する(当初のと変わらない)
4:領域右下に、赤い円形のパーツを配置する(位置が異なる)

なお、手元のフォルダ情報によると、
当初のほうのファイルサイズが9KBに対し、こっちは7KB。
(たしかに、形状がより単純だし)

ねっ。簡単でしょ!

蛇足

cairoのインストールのほうが、より大変だった。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2