قُلْ إِنَّ صَلَاتِي وَنُسُكِي وَمَحْيَايَ وَمَمَاتِي لِلَّـهِ رَبِّ الْعَالَمِينَ - الأنعام: ١٦٢

Thursday, October 29, 2009

Color Map Editor

Al Salam 3alikom w ra7mat Allah w barakatoh :)




It's an assignment we took in visualization. The color map editor.


Does this picture look familiar?
I guess most of us has seen similar pics in our geography study @ school

How was this picture drawn??
As u can see, the brown parts represent high areas (like mountains), green parts are just ground & blue will be the see level.
These colors map to specific heights. This is shown in the gradient between colors. like this between beige & brown.
This is color mapping!

Why do we need this?!
We need color mapping because if this data was given in its numerical form, it would be really difficult for ppl to interpret. This visual form makes things easier & more fun.

How do we make this color mapping?
we have 2 main methods to this
  1. using a look-up table
  2. using a transfer function
what are these methods, and which one will we be using?
It depends on the problem we have.
If we have specific discrete values, we can use the look-up table. It will probably do the job required and it is easier to implement.
If we have continuous values (like the gradient mentioned above), we'll need to use the transfer function. Because when we use the transfer function we not only map 2 colors (for example) but we map all the gradients that lies between them, which represents more data.

Now let's talk about the 2 methods we have
Look-up table (LUT)
as mentioned b4, it is suitable when we have specific discrete data.
as you can see here, there are only 6 colors that represent some ranges of data
  • less than 18 --> baby blue
  • 18 - 20 --> light blue
  • 20 - 22 --> off white
  • 22 - 24 --> orange
  • more than 24 --> red
  • if the depth is less than 1000m then it's mapped to white
this can be reflected in a table that contains these colors (array).
when given a value "S", this value is mapped to a color "C".
Index(c)=([(S-Smin)/(Smax-Smin)]*numberOfColors)
if S was the min value, then Index(c) will be equal to 0*numberOfColors = 0 (1st color)
if S was the max value, then Index(c) will be 1*numberOfColors = numberOfColors (last color)
and of course if it was in between them it will give us an index in the array of colors we have.

This is briefly how the LUT works.

Now what about the transfer function?
What's special about it?

Transfer Function
The special part about the transfer function is mapping every gradient between any 2 colors.
as you can see in this picture, every color is a start in a range of values, till another range begins.

How will we get a value to a specific degree of the color?
Using Interpolation.
Let's start with an easy example.
if the first color is red (C1) & the 2nd color is yellow (C2)
C1 represents a value of 100 and C2 represents 200
and we want to know the value of the color corresponding 150
what will we do?
This is a simple case, as we know that the required color (C3) lies exactly in the middle of C1 & C2
so we deduce that C3=0.5*C1 + 0.5*C2

what if it didn't lie exactly @ the middle of 2 colors?
We'll calculate where exactly does it lies. This will be i (index of previous color) + f (fraction). (i+f) will be smaller than (i+1), as it lies between i & (i+1).
i = floor ((S-Smin)/∆S)
f= (S-Smin)/∆S – i
then, C = (1-f)*Ci + f*C(i+1)




i: is the index of a color
f: is the fraction in a given index

This will give us the exact color of any value in our continuous data. Hence, we'll be able to formulate a visualization like the one shown above :)

I hope you find this post interesting & useful :)



Al Salam 3alikom w ra7mat Allah w barakatoh

Thursday, October 22, 2009

Alhamdulillah


Al Salam 3ailkom w ra7mat Allah w'barkatoh


Sometimes I wish I had a simple life, just like a rock or a tree

But Alhamdulillah - Alhamdulillah I'm a person

And Allah has given me a choice that's free

So, Alhamdulillah - I choose to be a Muslim

And there's nothing else I'd rather be

Thursday, October 15, 2009

Effective Motivation Tips..

Al Salam 3alikom w ra7mat Allah w barakatoh

I don't know if I'm the only person here feeling "I still want my Vacation!!" or what
but anyway, some motivation tips won't harm.

The following is ALL collected from the Internet

This is a really nice video and it's only 1 min & 18 sec.s

Life = Risk


Always Remember to...


Effective Study Motivation Tips :

Get yourself to pick that book up now!

Well you’re not the only one feeling this way. Whether you are currently a student studying in school or an adult picking up new knowledge, all of us have experienced lack of motivation to study. This is especially so when the subject you’re studying interests you as much as watching paint dry!

Fortunately, with will power, determination and some simple tips & techniques, anyone can turn their dislike into study motivation.

Studying can be fun, interesting and exciting. Never label studying as “boring”, “painful” or “uncomfortable”. That way you’ll be pre-framing yourself negatively even before you start. You’d have lost the battle before it even began. In fact, don’t even call it a battle.
Studying is a meaningful journey of discovery.






Skipping seminars to stay in bed? Here's how to avoid
sleepwalking through your course, and get motivated.

----------------------------------------------------------------

Videos from the YouTube:
nevergive1680x1050.jpg (1680×1050)


and always remember to have good intentions :)
بسم الله الرحمن الرحيم
قل إن صلاتي و نسكي و محياي و مماتي لله رب العالمين * لا شريك له و بذلك أمرت و أنا أول المسلمين
سورة الانعام اية 163 - 162

Wednesday, October 14, 2009

Steps [0]: Utopia...A Deeper Look

Al Salam 3alikom w ra7mat Allah w barakatoh


Steps [0]: Utopia...A Deeper Look
Steps [1]: A Vision


Utopia...المدينة الفاضلة
The Perfect Place
That place that doesn't exist in real life.
I really wish some day we would come to a point where people are seeking to build this Utopia.

I have this paper now on my notice board

It's as shown "my steps to paradise" paper..
It should contain steps that I'm already taking right now and stuff that may encourage me.
Now it has an intentions paper & a statement which says: "Utopia...a deeper look".

For me "Utopia" always referred to the conference held in Talaee el Kamal School. but in this paper I meant another Utopia.
A bigger Dream that I have...

1st you'll need to know my motive...so check this fatwa about cartoons for kids and search for:
"وهذه بعض الإيجابيات من مشاهدة الطفل لهذه البرامج :"
and start reading from there.

The following was concluded:
بعد تبيّن هذه الإيجابيات والسلبيات ، يبدو الموقفُ الشرعيّ بعدَ ذلك واضحًا إن شاءَ الله تعالى ، فكلما وجدت السلبياتُ أكثر اقتربَ الحكمُ إلى التحريمِ أكثر ، وما أمكنَ فيه تجنبُّ هذه السلبيات اقتربَ إلى الجواز ، وهذا يدلنا على ضرورةِ السعي لإيجاد شركاتِ إنتاجٍ لأفلامِ الكرتونِ الإسلاميةِ ، بحيث تُغرَسُ فيها جميعُ الفضائل ، وتُنفَى عنها جميع المضار والرذائل .

This was how I had this Dream..
I came to this fatwa when i was searching for something which is totally unrelated to it.
I read it & I had my vision of this company...The R&D department not only wiz employees but also with kids to develop the most interesting cartoons & games EVER.
I remembered "Richie Richie" and how the little boy & his friends began in developing the chocolate to have a better taste. Well they are the target market, so their opinions must be highly appreciated & most probably will be VERY valuable!

I can see the kids enjoying watching these cartoons & gaining wonderful experience & developing their skills. I can see their parents feeling safe that their kids are not harmed in anyway by watching these cartoons, in the contrary they're always gaining more information & their behavior is getting better.

Well it's not just that. They're also learning about The Prophet -peace and mercy be upon him- & the noble companions. I see a 10 years old boy/girl knowing as much information as if they've read encyclopedias. I see them enjoying their science class @ school, because they saw the real thing in the cartoon & they can relate to it.
I see them having a vision to their life & a Big goal :)

I see a whole new better generation coming up to raise this Umma!

you may think of it like: "give me a break, all of this gonna happen because of a cartoon company?!"
well have you ever heard about the story of Microsoft, Apple or Pixar animations??
They all started small, ended BIG.
What make them special or better than us??
I guess it's the will. and the wish to change.
"Dare to make a difference".

i've always been praying Allah to Use me :$
and Subhan Allah I've passed by this fatwa wiz no apparent reason.
I had this idea & I took some steps towards it (okay little ones, but @ least i'm thinking about it now).
So here I am again praying Allah "اللهم استخدمني و لا تستبدلني"
and asking for the HIS Help & Mercy
and hoping that one day I'd make something that deserve to be brought with me yawm Al Keyama to tell prophet Mohammed "I did that for Allah, for You & for Islam".

May be "Utopia...a chance to change" is the nawah (seed) for "Utopia...A Deeper look"
May be both together would affect the new generation & would make people happier.
A Chance to Change...

sorry if i've been talking a lot about an idea...that may or may not be true one day
and most probably ain't important to most of the readers now :$ :$

I just wished to share...may be this would motivate someone to make something good and may be it would push me to take more real steps :)
Thanks for reading =)
Al Salam 3alikom w ra7mat Allah w barakatoh