Showing posts with label art. Show all posts
Showing posts with label art. Show all posts

Saturday, 4 July 2015

MiniBlog: Paint Applications, and Splines

My friend and I recently had a conversation where he and his dad were talking about splines, which reminded me of how my professor taught me a good software application for splines.

What are Splines?

I honestly think the Wikipedia definition is much more clear than whatever way I could define a spline, so here you go:

In mathematics, a spline is a numeric function that is piecewise-defined by polynomial functions, and which possesses a sufficiently high degree of smoothness at the places where the polynomial pieces connect (which are known as knots).
In interpolating problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results to interpolating with higher degree polynomials while avoiding instability due to Runge's phenomenon. In computer graphics, parametric curves whose coordinates are given by splines are popular because of the simplicity of their construction, their ease and accuracy of evaluation, and their capacity to approximate complex shapes through curve fitting and interactive curve design.

Polynomial interpretation is where you have a set of dots/points, and you try to fit ONE polynomial function over the whole thing. Runge's phenomenon is where you try to fit a high-degree polynomial function over a set of equidistant data points, but then near the edges, really bad and big oscillations occur, which isn't really good for data analysis and prediction!


Rutger's phenomenon, where the blue curve is a 5th order interpolating polynomial, and the green which is really oscillating, is a 9th order interpolating polynomial

The problem of most simple drawing applications

When I was a newb at android application development, I tried to make a simple drawing application to learn more about touch gestures of a mobile device. Android has good APIs for gesture detection. In your custom Canvas class that you make for your drawing application, you can override the OnTouchEvent method and handle the incoming user gestures.

To draw what the user draws, you simply have to get the x-y point when the user first presses down on the screen, and then draw a line between that point and the point the user moves to next. This means that as the user moves his finger across the screen, Android is getting x-y coordinates every XXX milliseconds, and each XXX milliseconds, Android draws a line between the previous x-y coordinates the user was at and the current x-y coordinates the user is currently at.

This has some problems, of course. Let's say the user swiped his finger really fast in a short amount of time. Because the Android API only gets x-y coordinates of the user's finger vs. time every XXX milliseconds, the resulting line that the user drew on the drawing application doesn't look smooth. It looks like a piece-wise function of straight lines connected to each other by dots, instead of a smooth curve. Below is an illustration I made about this:

Notice the lack of smoothness due to the C shaped curve being composed of multiple straight lines

So, in order to fix this, all you would have to do is take the history of all these points as the user first initially presses down, until the user releases his finger, and using that list of point objects, you use spline interpolation to make the whole line smoother, and then draw that smooth line onto the canvas!

Sunday, 7 June 2015

Tell Your World



To remember the intangible feelings that I hold dear in my heart
I broke free from this life, this somber life that some of you know
I hummed these secret songs for years, but now I want to share one with you…
So spread this news far wide… and let it fly high with soaring birds in the blue clear sky!

It’s all those words to share and bare with others
It’s all those notes to sing and send to others
Each and every link forms a new connection
It echoes far away into the distance...

It’s all those words to share and bare with others
It’s all those notes to sing and send to others
Then all your links combine into a circle
With everyone together “tell your world” it’s everywhere!

The dark encapsulates your room, you're blinded by terrible heartache
But the light that shines right through, those gaps between your fingers, brilliantly
I've caught this little tune, and tapped its beat on top of the window sill
And it'll reverberate... and resonate throughout the air and into the sky!

It’s all those words to fare and bare with others
It’s all those notes to sing and shout to others
Each and every link forms a new connection
It echoes far away into the distance...

It’s all those words to fare and bare with others
It’s all those notes to sing and shout to others
Then all your links combine into a circle
With everyone together “tell this world” it’s everywhere!

Never doubted the days, this song that I played
will heal everyone's sorrows,
Life is such a wondrous journey that some people may lose their footpath on...
Now every moment shakes, with each tapping beat, so our world begins to change,
Tell your world today... about the sounds within our hearts!

It’s all those words to share and bare with others
It’s all those notes to sing and send to others
Each and every person forms a connection
We echo far away into the distance...

It’s all those words to share and bare with others
It’s all those notes to sing and shout to others
Then everyone holds hands in a big circle
With everyone together “tell your world” it’s everywhere!

---------------------------------------------------------------
The tune of these lyrics are to the beat of the Japanese vocaloid song, "Tell Your World" by Hatsune Miku. It is not a direct translation, as I wanted to be more creative. You can find the music video for this song here.

The chorus' lyrics specifically is inspired by Zessei Bijin's English cover. You can find it here. Everything else are 100% my own words.

Sunday, 16 October 2011

Metamorphosis of Life



 This is just a poem I wrote for my English AP class. Hope you enjoy it.


Life
is-like a
CATerPILLar, piller, pillar, piller..,

You-begin-as-a
small,
deformed,
image that reflects your
potential,
enlightened,
self,

You commence to
eat,
grow,
consume other beings,
all,
to,
self.

You finally start, after.
Leeching.
Crawling.
You've grown to adolescence,
you-begin-to-con-SEAL
yourself..

Hiding...
In...
Shame.

Break-ing our of the womb,
this is your sec-ond time again.
You have grown older,
you reappear....

Life
is-like a
BUTterFLY...

Wing-Ed wings of triumph,
oh, how've_you've_becomed.
Wings spanning eons.
eons. eons.

The colour of your wings
represent
your life. GLORY!

Isn't the saying true,

Life
is-like a
BUTterFLY....................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................

My poem was inspired by a popular anime, Turn A Gundam. Here's the ending theme song for the anime, Tsuki no Mayu. (English Translation: Cocoon of the Moon)

Friday, 23 September 2011

Earth and I

Our Pale Blue Planet


"We only inhabit one of the eight planets around an insignificant sun, and on this planet, Earth, rests over 1.7 million species. You are right - we are specks, among specks, among “billions and billions of specks” on the cosmic scale. However, Earth is significant to us, and we are significant to family and loved ones; for me, that is all that I need to feel significant."

Friday, 17 June 2011

The Influence of Roman Art

Just something I wrote because I'm a history fanatic...

The Influence of Roman Art

The Romans left a legacy and a colossal footprint in the history of humans. The times back then were prosperous, and are now considered the golden age of western civilization. However, as Alaric sacked Rome in 410 AD, it was the beginning of the end of the Roman Empire. The Dark Ages began, and people grew barbaric once more. It seemed as if all art, all intellectual creativity, had suddenly disappeared. Some notable figures such as Charlemagne have tried to break this barrier, yet all of them failed. It wasn’t until the Renaissance when the Dark Ages had finally come to an end, and creativity prospered. The Renaissance looked backed at the marvel of Ancient Rome, and its art. Many Renaissance artists and scholars dwelled upon the ancient works of the Romans for answers and creativity. In addition, after the Renaissance came the Age of Enlightenment (17th and 18th centuries) and it was here where neoclassicism was born. Neoclassicism is the movement to bring Classical Roman and Greek art back into popularity.


You might think this is a Roman building. However, as the American flag suggests, this was built in the mid 1800s, more than half a millenium after the Romans. This is actually the picture of the Treasury Building in Washington DC. It is a good example of just how many cultures were inspired by the Ancient Romans.

Edit: I should have included a tidbit on how the Romans actually stole from the Greeks in terms of the architecture style, art, and culture. This written piece was for a report in my high school Latin class, however.

Tuesday, 17 May 2011

Did it give you this feeling?




Did it
give you this feeling
?
inside your heart
?
I don't know how to describe the feeling
maybe I should describe it better
It's that joyful feeling. It's that feeling that makes you cry
When you see these smiling people
You know that these were real people
And the artists have painted with all of their emotions and poured their life
into this person
into this painting
you're looking at humanity
don't you feel
 even a bit moved
 touched
 . . .
 you know
 just that feeling
 and the great thing about it is that
 it's in everyone...
 It's that spark of wonder
 Ingenuity
that feeling of epiphany
happiness
sadness
the deepest of our emotions
people find joy in playing music
people find joy in art
It's what makes us different from other people
it's also why twins are different
they aren't the exact same people in the exact same space at the exact same time (even in the scientific sense)
They experience reality differently
all of us do
we all have a limited perspective on reality
I find it beautiful
have you ever felt that beautiful feeling
?
But I know you know it
I know you've felt it
when you look at beauty
when you feel something tremendous
have you ever felt fascinated
?
by the wonders of our universe?
that's a feeling of this god
‘’What’s in a name? That which we call a rose. By any other name would smell just as sweet.’’
not just that though
 its a feeling of consciousness
 it's a feeling of embracing and realizing something new

Tuesday, 12 April 2011

Fear

I hide in the darkest corners, always watching you.
I can see your every step, and I can see your chest rising and falling as you breathe.
You don't even know I'm there.
I'll strike when you least expect it,
when the night is overshadowing the sun's daylight,
when everything you know and love,
you can never see with your own eyes.
You are frightened by what is unknown.
What you cannot see with your own eyes.
And when it is that time, I shall strike.

Monday, 4 April 2011

The Pale Blue Dot - Carl Sagan





Consider again that dot. That’s here. That’s home. That’s us. On it, everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every ‘supreme leader,’ every ‘superstar,’ every saint and sinner in the history of our species lived there — on a mote of dust suspended in a sunbeam.

The Earth is a very small stage in a vast cosmic arena. Think of the endless cruelties visited by the inhabitants of one corner of this pixel on the scarcely distinguishable inhabitants of some other corner, how frequent their misunderstandings, how eager they are to kill one another, how fervent their hatreds. Think of the rivers of blood spilled by all those generals and emperors so that, in glory and triumph, they could become the momentary masters of a fraction of a dot.

Our posturings, our imagined self-importance, the delusion that we have some privileged position in the Universe are challenged by this point of pale light. Our planet is a lonely speck in the great enveloping cosmic dark. In our obscurity, in all this vastness, there is no hint that help will come from elsewhere to save us from ourselves. Like it or not, for the moment, the Earth is where we make our stand.

It has been said that astronomy is a humbling and character-building experience. There is perhaps no better demonstration of the folly of human conceits than this distant image of our tiny world. It underscores our responsibility to deal more kindly with one another, and to preserve and cherish the only home we’ve ever known, the pale blue dot