Tuesday, November 22, 2016

Big-O Notation

By National Institute of Standards and Technology (NIST), the definition of Big-O notation is a "theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. " In essence, an algorithm's big-o notation is determined by how effectively it responds to different input, n. Would the process rate be different if we have 100,000 inputs instead of 10 inputs?

The measure of the execution can be expressed as f(n)=O(g(n)). O function is the order function, f(n) is your algorithm, and g(n) is the function you use to estimate f(n). For example, if you f(x)=n^2+3n-40. As n approaches infinity, the value of (3n-40) does not matter as much as n^2, so we can use n^2 to estimate your f(x). Below are some typical Big-O notations:



  • O(1) is the constant time function, where it takes the same amount of time to process any size of inputs. An example of O(1) algorithm is to determine if the binary input in odd or even. 
  • O(log n) is very efficient to analyze large inputs. The growth peaks at the beginning the marginal time decreases as you increase the number of inputs. For example, the algorithm takes 1 second to analyze the first 100 times, but only take 2 seconds to analyze the first 1000 items.  An example of O(log n) algorithm is to find an item in a sorted array.
  • O(n) is the linear function, where the time is proportional to the size of input. An example of O(n) algorithm is to find an item in a unsorted array.
  • O(n^2) is an quadratic algorithm that processes inner loops. An example would be what we learned in class on Thursday - bubble sort.
  • O(n^n) is an algorithm whose performance is proportional to the square of the size of inputs. To process each element, it will go through the entire set of data. An example would be merge sort.
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=big+o+notation&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjKg67hsMXQAhXnslQKHQQHBiQQ_AUICigD#imgrc=C161EKuPr8u7CM%3A
Writing References:
1. https://xlinux.nist.gov/dads/HTML/bigOnotation.html
2. https://justin.abrah.ms/computer-science/big-o-notation-explained.html
3. https://en.wikipedia.org/wiki/Big_O_notation
4. https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/
--------------------------------------------------------------------------------------------------------------------------

Tuesday, November 15, 2016

Everything about operators in Java

Remember in the midterm midterm, Professor Jory asked a question about operator as a bonus question? In fact, there are so many more different kinds of operators than what we learnt in class. Addition, subtraction, etc. are only a subset of operators, called arithmetic operators. 

Unary operators can be increment or decrement. (++), (-), (--) are all examples of unary operators. 

Binary operators has six major categories as listed in the picture above. We covered most of the arithmetic operator during the class. Assignment operator is (=) and it is used when you set the values of data, e.g. String name = "Cathy." Logical operators are (&&),(||), and (!). Relational operators are (==),(!=),(>),(<),(<=) or (>=), which we also discussed in the classroom. Compound operator performs operation on the two operands before assigning the result to the first operand. Compound operator works on both arithmetic and bitwise operator. There are 11 different kinds of operators and (+=) is the one we often use throughout this semester. The other compound operators include (-+),(*=),(/=),(%=),(&=),(|=),(^=),(<<=),(>>=),(>>>=).

The only operator we have never seen before is bitwise operator. Bitwise operator works on all integer data types including int, long, short, char, and byte. It converts all the integers to bits and perform bit-by-bit operations on integers. An example given on this website (https://www.tutorialspoint.com/java/java_basic_operators.htm) is a = 60 and b = 13. In binary world, a = 0011 1100 and b = 0000 1101. Bitwise operators include (&),( |), (^),(~),(<<),(>>) and (>>>). (&) is binary and, which copies a bit to the result if it exists in both operands, otherwise it will copy 0. (a&b)=0000 1100. (~) flips the bits, so (~a) returns 1100 0011. (<<) is binary shift and moves all the bits to the left. (a<<2) returns 1111 0000. (>>>) is zero fill right operator. The left operand is shifted by the number in the right operands and zero fills all the empty bits. (a>>>2) returns 0000 1111.

Ternary operator takes three operands and conditional operator is a ternary operator. The syntax for ternary operator is (?:) expressionA?expressionB:expressionC. Expression A is implicitly converted to a boolean. If it is true, expression B will be evaluated, otherwise expression C will be evaluated. A good example would be compute the minimum value of x and y. 

minimum = (x < y) ? x : y;
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=java+operator&biw=1280&bih=583&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjvzZnSoKvQAhXBylQKHcw5CLEQ_AUICygA#imgrc=G73VcUwBb5rsVM%3A
Writing References:
1. http://www.computernotes.in/java/core-java/operators-in-java/
2. https://www.tutorialspoint.com/java/java_basic_operators.htm
3. http://www.c4learn.com/java/java-operators/
4. https://www.tutorialspoint.com/cplusplus/unary_operators_overloading.htm
5. https://msdn.microsoft.com/en-us/library/e4213hs1.aspx
6. http://alvinalexander.com/java/edu/pj/pj010018

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

Wednesday, November 9, 2016

Inheritance: Single, Multilevel and Hierarchial

During the lab in Wednesday, we talked about inheritance. As we know, inheritance is one of the four design principles for object-oriented programs and it helps with the organization of large programs and has reusability feature. Inheritance is obtained by building new child classes from the existing parent classes. Through the magic word "extends," we can reuse and add all the methods and properties from the parent class. To reduce the chance of error and increase reusability, we can apply overriding and revise the methods in the parent class, instead of creating a new one. Inheritance represents IS-A relationship, also known as parent-child relationship.  

There are five types of inheritance in Java: single, multilevel, hierarchical, multiple and hybrid.  
However, there are only three types of them(single, multilevel, hierarchical) available in Java programming. 
Not supported directly in Java, multiple and hybrid inheritance are supported through interface. 

1. Single: one class inherits from the other
2. Multilevel: one class inherits from the other class which inherits from another
3. Hierarchical: multiple classes inherit from the same class
4. Multiple: one class inherits from multiple classes
5. Hybrid: a mixture of multilevel, hierarchical and multiple inheritance

The two diagrams below provide graphical representation of these types.
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=inheritance+java&biw=1280&bih=620&source=lnms&tbm=isch&sa=X&sqi=2&ved=0ahUKEwiZ7-WRjp3QAhXB5yYKHT0JBssQ_AUIBygC#imgrc=NTtuIobiMKjsUM%3AWriting
2. http://www.javatpoint.com/inheritance-in-java
References:
1.http://www.javatpoint.com/inheritance-in-java
2.https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html
3.http://docstore.mik.ua/orelly/java-ent/jnut/ch03_04.htm

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


Friday, November 4, 2016

How does Netflix make recommendations?

Do you like Netflix?
Have you ever watched netflix and just could not stop watching it?
If you, have you ever wondered why Netflix always make those wonderful recommendations to you?

Your wonderful Netflix experience is based on Machine learning algorithms. The recommendation system on Netflix and other apps/websites use complex algorithm based on linear algebra and matrixes to determine which content you might like. The Algorithm for Netflix was also referred to as "rating prediction" algorithm, which was the most important system in Netflix and was researched in the Netflix Prize in 2006 as the "Netflix Recommendation Algorithm." 

There are two major algorithms that are being used right now: Restricted Boltzman Machines (RBM) and a form of Matrix Factorization, which is also referred as Singular Value Decomposition. These two algorithms take user input, run through to determine their preferences and interests and finally output the recommendation for users. Both of these algorithms contain some error and inaccuracies bur a linear blend of these two methods reduced the error margin significantly.

--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=netflix+recommendation+system&source=lnms&tbm=isch&sa=X&ved=0ahUKEwigrObu3ZDQAhUF6CYKHbMKB9MQ_AUICCgB&biw=1257&bih=620#q=netflix&tbm=isch&tbs=rimg%3ACabzecxy0tsIIjilQUCjVaiql4Fx_1EXSAg32zmNGRo0kTcYaTEzXLj6mhshKArr74Kvr_1JicUsEGaUQTBlSzSePd0SoSCaVBQKNVqKqXEYjgkUhdbbLGKhIJgXH8RdICDfYR6yDoZR-bvTMqEgnOY0ZGjSRNxhE9_1vOiHwDGlioSCRpMTNcuPqaGEWltLkD-9BeoKhIJyEoCuvvgq-sRhbebbti3HIEqEgn8mJxSwQZpRBFOBZV95MKM8ioSCRMGVLNJ493RESAQ6MacSGeD&imgdii=P57_EbfDdSsDZM%3A%3BP57_EbfDdSsDZM%3A%3BcsgyFL_uUe6v3M%3A&imgrc=P57_EbfDdSsDZM%3A
Writing References:
1.http://www.businessinsider.com/how-the-netflix-recommendation-algorithm-works-2016-2
2.http://techblog.netflix.com/2016/02/recommending-for-world.html
3.https://www.quora.com/How-does-the-Netflix-movie-recommendation-algorithm-work#
--------------------------------------------------------------------------------------------------------------------------

Monday, October 24, 2016

How do you release a software?

A software release life cycle is a channel of all the stages of product development. It starts with initial development and testing and ends with release of a software/product. This post talks about each of this step, based on the picture below.

Pre-alpha: 
Pre-alpha refers to all activities performed during the software project before formal testing. These activities can include requirements analysis, software design, software development, and unit testing. In typical open source development, there are several types of pre-alpha versions. Milestone versions include specific sets of functions and are released as soon as the functionality is complete.
Alpha:
Alpha is the first letter in Greek alphabet and it is the first phrase to begin software testing. Alpha software can be unstable but by the end of this phrase, no more feature will be added to the software. So, alphaware is usually said to be feature complete.
Beta:
Beta is the second letter in Greek alphabet and it is a process to reduce error and increase stability of the software. The delivery of betaware is the first time that the software will be available to the public.
Release Candidate:
After the completion of beta phrase, a software will become release to candidate, unless significant problem occurs. This stage is referred as code complete, because all the features have been designed, coded and tested with no known significant bugs.
RTM:
This is the phrase when the product is ready to be released. The software is first released to hardware manufacturers for bundling. This process will help developers to work out all the products before general release to the public.
GA:
This is the phrase when the product is released to general public, after all the commercialization activities have been completed. The time between RTM and GA can be weeks to months, depending on the time taken to finish all the commercialization activities.
Production or live release:
Production or live release aka Gold: this is the phrase when the product has released.
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://en.wikipedia.org/wiki/Software_release_life_cycle
Writing References:
1. http://releaseboard.com/what-is-a-software-application-release-cycle.html
2. https://en.wikipedia.org/wiki/Software_release_life_cycle
3. http://www.brighthub.com/internet/web-development/articles/42592.aspx

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

Wednesday, October 19, 2016

How did google get started?


Google is coming to campus today and all the events are hosted in Jepson Hall.
While you can learn much about  Google’s hiring process, culture, job and/ internship opportunities, are you curious about how did Google get started?

Start:
Google started with two students Larry Page(at age 23) and Sergey Brin (at age 24), who were pursuing their Ph.D. at Stanford University. While they were collaborating on a search engine called BackRub in 1996, which was written in Java and Python and ran on several Sun Ultras and Intel Pentiums running Linux.

They achieved great success with the server and officially launched Google.com as a domain on September 15, 1997. The company was formally incorporated on September 4, 1998. The name Google was a word play on mathematical term "googol," which means ten raised to the power of a hundred (10^100). This term represented their mission to organize a seemingly infinite amount of information on the web.

Development and Today:
Instead of allowing pop-up advertisement in the search engine, Google only allows is single text ads. Even though the home page was still marked "Beta (development stage)," many articles already argued that Google provided better search results than its competitors. During the dot-com bubble, Google was also referred to as "the future of the Web", especially by stock market investors.

Over the next ten years, Google took a series of acquisitions and launched many applications including Google Group, Google Toolbar, Google News, Google Images and so much more. In 2004, Google had IPO of 19,605,052 shares of Class A common stock takes place on Wall Street. Opening price was $85 per share. It also owns websites including YouTube and Blogger. In August 2015, Google reorganized its interesting as a holding company named Alphabet Inc. 

--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=google&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiB5_nPkOfPAhVIHT4KHQQuBMMQ_AUICygE&biw=1249&bih=589#imgdii=7IKHjqDTO__xIM%3A%3B7IKHjqDTO__xIM%3A%3B2stnn3dUTo2FjM%3A&imgrc=7IKHjqDTO__xIM%3AICygE&biw=1280&bih=628#imgrc=mRJiumYp6_53fM%3A
2.https://www.google.com/search?q=Larry+Page+23+and+Sergey+Brin+24&source=lnms&tbm=isch&sa=X&ved=0ahUKEwji746UkefPAhXKWz4KHefRCCIQ_AUICSgC&biw=1249&bih=585#imgrc=hXyZDfTlNsffUM%3A
Writing References:
1. https://www.google.com/about/company/history/
2. http://www.steegle.com/about/google-101-facts/1-11-how-it-all-began
3. https://en.wikipedia.org/wiki/History_of_Google

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

Friday, October 14, 2016

Javacode, Java Virtual Machine, and machine code


Have you every wondered when you program with Java, why do you always have to compile your code? What does the ".class" file mean? Well, the answer is that your computer does not read English words, and the compiler takes your code and translate into machine-level code. This process is more complicated for Java. Your code is first translated into bytecode and then executed by JVM (Java Virtual Machine), and finally processed by the computer, as shown in the picture above.

Bytecode
Bytecode is the output from a Java compiler and is a form of instruction set designed for efficient execution by a software interpreter. It is composed of numeric codes, constants, and references (normally numeric addresses). Each bytecode is has one, or in some cases two bytes that represent the instruction (opcode), along with zero or more bytes for passing parameters. Below is an example of the bytecode:

Java Virtual Machine
JVM (Java Virtual Machine) is a virtual machine that executes bytecode outputted by Java compiler and enabled the computer to run the program. Java is powerful, because once a program is compiled, it can be run on any platform without having to be rewritten or recompiled. A Java virtual machine can interpret the bytecode one instruction at a time or interpret the bytecode with just-in-time compiler.

Machine code:
While humans understand languages, computer's CPU (central processing unit) only understand machine language, aka machine code, which is the most elemental language of computers, comprising a long sequence of zeros and ones.  Each machine code gives CPU an instruction to perform a simple operation or to store data in RAM. 
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=java+virtual+machine&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiW_ZSk5trPAhUGVT4KHd2UBfgQ_AUICygE&biw=1280&bih=628#imgrc=mRJiumYp6_53fM%3A
2.https://en.wikipedia.org/wiki/Java_virtual_machine#/media/File:JvmSpec7.png
3.https://en.wikipedia.org/wiki/Java_bytecode
Writing References:
1. http://durofy.com/10-major-differences-between-c-and-java/
2. https://en.wikipedia.org/wiki/Java_virtual_machine
3. https://en.wikipedia.org/wiki/Machine_code
4. https://en.wikipedia.org/wiki/Java_bytecode
5. http://www.theserverside.com/definition/Java-virtual-machine-JVM
--------------------------------------------------------------------------------------------------------------------------

Monday, October 3, 2016

Alan Turning - Turning Machine


Alan Turning is often described as the father of computer science. He was an influential computer scientist, mathematician, logician, cryptanalyst and theoretical biologist. His work laid foundation for algorithm and computation with Turning Machine.

This blog post explores the idea of Turning Machine, which is a hypothetical machine but can simulate any complicated computer algorithm.

Turning machine is an abstract model that consists of an infinitely-long tape which acts like the memory in a typical computer or any other storage devices. It is consisted of four parts:

  1. A tape that is divided into cells, one next to the other;
  2. A head that can read and write symbols on the tape;
  3. A state register that stores the state of the Turning machine;
  4. A finite table of instructions.
The machine is a 3-symbol machine, which means that it can only process the symbols 0, 1 and " "(blank). The picture below is an simplified example of the Turning machine. The squares on the tape are usually blank at the start and can be written with symbols.
The machine has a head, that is positioned over one of the squares at a time and the head can perform three basic operations:

  1. Read the symbol on the square under the head;
  2. Edit the symbol by writing a new symbol or erasing it;
  3. Move the tape left or right by one square so that the machine can read and edit the symbol on a neighboring square.
--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=alan+turing&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiQxLfqqr_PAhWI5SYKHQmuDXsQ_AUICCgB&biw=1280&bih=627&dpr=2#imgrc=_JwUeA8tUcu3AM%3A
2.http://www.express.co.uk/news/uk/553128/Alan-Turing-Notebook-crack-the-Enigma-Code-auction-1-million
Writing References:
1. https://www.theguardian.com/science/2015/apr/13/alan-turings-notebook-sells-for-more-than-1m-at-new-york-auction
2. https://en.wikipedia.org/wiki/Alan_Turing
3. https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/turing-machine/one.html
4. https://en.wikipedia.org/wiki/Turing_machine
--------------------------------------------------------------------------------------------------------------------------
The picture above shows the Turning's original handwriting detailing his work on the foundations of mathematical notation and computer science. The notebook was sold for  for $1,025,000 (£698,000) in a sale of fine books and manuscripts at Bonhams auction house.

Wednesday, September 28, 2016

Algorithmic trading robot

Sales and trading plays a central role in the financial stock market. Algorithmic trading has increasing popularity over the past few years, it can do so much more than a human trader. The picture below shows the percentage of algorithmic trading over the entire market transaction. 

What is Algorithmic trading?
Algorithmic trading uses computers to program a defined set of instructions for placing a trade in order. It is often used by banks, pension funds, mutual funds and hedge funds, and it was developed as a cost saving mechanism, because institutional traders need to executive large orders in markets that can not support all of the size at once. By setting by variables such as time, price, and volume, computers(algorithmic trading robot) can watch the stock market constantly and execute traders, whenever the conditions are met. Another benefit of algorithmic trading is that human trader does not have to watch the stocks constantly and repeatedly, which saves time for them to work on other projects. Since computers processes information at a higher speed and thus higher frequency, algorithmic trading generates more profits than a human trader.

How do you build a algorithmic trading robot?
MetaTrade4(MT4) is an electronic trading platform that uses the MetaQuotes Language 4 (MQL4) for coding trading strategies. It is one of the popular softwares to build a  algorithmic trading robot.

I will show you part of an example below with the free and open-source Quantiacs Toolbox which supports both Python and MATLAB by building a Heikin-Ashi indicator.
def HEIKIN(O, H, L, C, oldO, oldC):
    HA_Close = (O + H + L + C)/4
    HA_Open = (oldO + oldC)/2
    elements = numpy.array([H, L, HA_Open, HA_Close])
    HA_High = elements.max(0)
    HA_Low = elements.min(0)
    out = numpy.array([HA_Close, HA_Open, HA_High, HA_Low])  
    return out
Heikin-Ashi Candle Calculations
HA_Close = (Open + High + Low + Close) / 4
HA_Open = (previous HA_Open + previous HA_Close) / 2
HA_Low = minimum of Low, HA_Open, and HA_Close
HA_High = maximum of High, HA_Open, and HA_Close
Heikin-Ashi Calculations on First Run
HA_Close = (Open + High + Low + Close) / 4
HA_Open = (Open + Close) / 2
HA_Low = Low
HA_High = High
This is the beginning part of the code and you can read more from this link: https://quantiacs.com/Blog/Intro-to-Algorithmic-Trading-with-Heikin-Ashi.aspx. 

The code for algorithmic trading is very complex and advanced, but isn't it so encouraging that we start to understand the basics like "array" and "return"? Once, a finance professional told me, "we can teach you about algorithmic trading, as long as you know some basics of the computer science, even if you only took one computer science class. But even that basic knowledge will give you a good starting point." I did not truly understand what he meant until when I wrote this blog and googled the code for algorithmic trading. I open the website, expecting to know nothing about the codes, but I was excited to find that I do understand some basics. 

--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=algorithmic+trading&biw=1280&bih=625&tbm=isch&source=lnms&sa=X&ved=0ahUKEwiq_fb-zLjPAhUGPCYKHexED24Q_AUICSgE#imgrc=llwEXhaZbAXpnM%3A
2.https://en.wikipedia.org/wiki/Algorithmic_trading#/media/File:Algorithmic_Trading._Percentage_of_Market_Volume.png
Writing References:
1. http://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and-examples.asp
2. https://en.wikipedia.org/wiki/Algorithmic_trading
3. http://www.investopedia.com/articles/active-trading/081315/how-code-your-own-algo-trading-robot.asp
4. https://quantiacs.com/Blog/Intro-to-Algorithmic-Trading-with-Heikin-Ashi.aspx
--------------------------------------------------------------------------------------------------------------------------
Check the video below for how the basics of algorithmic trading

Friday, September 23, 2016

Amazon - Robotics and inventory management

Were you ever amazed by the fact that you can receive one-day free prime delivery at Amazon?
Have you ever thought about how did Amazon manage all of its inventories?
The answer is AMAZON ROBOTICS.

Traditionally, inventories are managed and moved around by conveyor system or forklifters. With increasing popularity of eCommerce, it is increasingly important to effectively manage the inventories. With Amazon Robotics, items are stored on portable storage units, as shown in the picture above. Amazon robots are way much more efficient and less error-prone than the traditional method.

This is how the robots operate:
When an order is entered into the database system, the software analyzes all of the items in the order and locates the closest robot to the each of the item and directs the robot to retrieve the item. The robots are controlled by a centralized computer with secured WiFi network for communication. The robots move by following the QR codes on the floor and have sensors inside to avoid collision. They also have powered wheels that allow them to rotate and move around.

When the robot reaches the target location, it slides underneath the pod/rack and lifts the pod/rack off the ground through corkscrew action. Then, the robot carries the pod back to the human operator to pick the items and returns the pod back.

Amazon has two types of robots: the "G" drive for light pods weighing up to 750 pounds and the "S" drive for larger racks and pallets weighing up to 3,000 pounds. Both kinds of robots are designed to operate on rotating schedule for 60 minutes and then to be recharged for 5 minutes.

The systems behind the robots are essential to how robots work. The sophisticated fulfillment system processes hundred of orders per second. When an order is placed, the system analyzes the shipping location and products, depending on the product type and availability. Also, the system assigns the priority to each product based on the customer's delivery preference. AmazonPrime same day shipping order has the highest priority, while a "Super Saver" order might wait a several hours before processed.  Once the priority is determine, the system sends order to robots to locate and move pods to assigned packing station.


--------------------------------------------------------------------------------------------------------------------------
Picture References:
1.https://www.google.com/search?q=amazon+robotics&biw=1280&bih=625&tbm=isch&source=lnms&sa=X&ved=0ahUKEwjNrurj-6bPAhXC24MKHU_KDMAQ_AUIDCgA#imgrc=BtRv2fLlZbf_XM%3A
2.https://www.google.com/search?q=amazon+robotics&biw=1280&bih=625&tbm=isch&source=lnms&sa=X&ved=0ahUKEwjNrurj-6bPAhXC24MKHU_KDMAQ_AUIDCgA#imgrc=mNBuqcz1JaweIM%3A
Writing References:
1. https://en.wikipedia.org/wiki/Amazon_Robotics
2. http://www.informationweek.com/strategic-cio/amazon-robotics-iot-in-the-warehouse/d/d-id/1322366


--------------------------------------------------------------------------------------------------------------------------
Check the video below for how Amazon Robotics work!

Wednesday, September 14, 2016

Zootopia - Fur technology makes Zootopia's animal believable



This is the last post about computer graphics and I want to ended it with my third favorite Disney movie- Zootopia. It tells a stony about anthropomorphized animals trying to realize their dreams and living in a metropolitan city. The movie is a comedy but also sheds lights on race relations and diversity.

Were you impressed by the fur of all the animals by real they all look? Animal means fur. In fact, one Animal in Zootopia Has More Individual Hairs Than Every Character in Frozen Combined.

Similar to how disney studies water waves in Finding Nemo, the Zootipia team are composed of directors, engineers and animators. They spent eight month studying animals and they went to San Diego's Safari Park, Disney's Animal Kingdom and all the way to Kenya to observe their movements and habits. To make look real, the team went to Natural History Museum and studied fur under a microscope and under lighting setups.


To make the animals look realistic, Disney's trusty team of engineers introduced iGroom, a fur-controlling tool that had never been used before. The software helped shape about 2.5 million hairs on the leading bunny and about the same on the fox. A giraffe in the movie walks around with 9 million hairs, while a gerbil has about 480,000 (even the rodent in the movie beats Elsa's 400,000 strands in Frozen).

The software gave animator so much more flexibilities that they could easily brush, shade and brush the fur. iGroom iterates very quickly and this immediate feedback enables the team to play around to achieve the effect they want. 


Next week - Robotics at Amazon 
--------------------------------------------------------------------------------------------------------------------------

Picture References:
1.https://www.engadget.com/2016/03/04/fur-technology-makes-zootopias-bunnies-believable/
2.http://fusion.net/story/275485/zootopia-police-racism-race-relations-commentary/
Writing References:
1. One Animal in Zootopia Has More Individual Hairs Than Every Character in Frozen Combined- http://io9.gizmodo.com/one-animal-in-zootopia-has-more-individual-hairs-than-e-1761542252
2. The fur-reaching tech of Zootopia- https://www.fxguide.com/featured/the-fur-reaching-tech-of-zootopia/

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

Another reason that I like Zootopia is their DMV scene. Have you ever been frustrated with the inefficiency at DMV? Everytime I go to DMV, the experience is painful and it seems like I need to wait there forever. Zootopia followed the comedy principle and famously slow sloths runs DMV in the movie.

Friday, September 9, 2016

Finding Nemo - The art of computer animation and water flow simulation


Last post discussed the snow simulation in Frozen, which is my favorite movie. 

As a Disney enthusiast, I will continue the discussion of computer graphics with the example of Finding Nemo(my second favorite movie) and explore the art of computer animation. John Lasseter, the executive producer of the film, said:“This movie absolutely raises the bar for Pixar and for the art of computer animation... The film is breathtakingly beautiful and filled with real drama, real emotion and depth, as well as great comedy."

Compared to the challenge of snow simulation Frozen, the biggest challenge in Finding Nemo was water flow simulation. First of all, the actions, textures and other details of water flow are hard to describe in English language and the staff at Disney had to invent new vocabularies in order to communicate. In addition, Disney invited scientists to present lectures on wave, swells and other motions. The team member even took a trip to Hawaii to study the water and sea life. 

Finally, water simulation was achieved by pioneering the new techniques in digital lighting, which were used to create realistic-looking water. Digital lighting is a technique that brightens evert scene in the same way as stage lighting. It further presents the emotion of each scene and better defines key, fill and bound lights. 

Key, fill, and bounce lights and room ambience are all defined and used to enhance the mood and emotion of each scene. Lighting takes its inspiration from the moody color scripts created by the art department. The underwater setting with lighting effect 

The water simulation technique was so realistic that the team decided to push back and de-emphasize to make the film more cartoony.


--------------------------------------------------------------------------------------------------------------------------
Picture References:
1. https://www.google.com/search?q=Finding+Nemo&biw=1280&bih=583&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiL0LmjtoLPAhUDZCYKHdl5CW0Q_AUIBygC&dpr=2#imgrc=4MsDpdUl--_MpM%3A
2. https://www.google.com/search?q=finding+nemo+animation+disney&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjLwarktoLPAhVLPCYKHUnjCnMQ_AUICSgC&biw=1280&bih=583#imgrc=dc-kQA_h1JgL9M%3A

Writing References:
1. Use of Technology - http://pixar-animation.weebly.com/use-of-technology.html
2. The Making of Finding Nemo - http://www.cgsociety.org/index.php/CGSFeatures/CGSFeatureSpecial/
the_making_of_finding_nemo
3. Finding the Right CG Water and Fish in 'Nemo' - https://renderman.pixar.com/view/computer-graphics-at-walt-disney-animation

--------------------------------------------------------------------------------------------------------------------------
If you like Finding Nemo as much as I do, you can actually realize the dream of living with Nemo at Finding Nemo Rooms at Disney Art Of Animation Resort in Walt Disney World.  See below for the picture of the room.