Friday, September 30, 2016

Animation


No matter how old we get, we always love a good Disney/Pixar movie. Animation has come a long way over the years, but how does this process work? How do we get our favorite characters like Woody, Mike Wazowski, and Nemo?



First, an artist draws the characters. Once the characters have been drawn, animators use the computer to draw a skeleton inside of the characters body. When they move the skeleton, the software makes the body move with it. Initially, the characters are just a wireframe, without color or texture, made up of individual cubes and spheres. Then they are given as many as 100 hinges, called "avars", that animators use to make the character move, which you can see below. Animators use a computer software that allows them to move the characters, almost like puppets, into key positions or poses. Then the computer creates the frames in between the key frames to connect them. The characters movements are programmed into the computer, to transform the 2D still pictures into 3D moving characters. It starts as a rough cut and then the images get smoothed out to become more fluid.



There is also specialized software that synchronizes the character's mouth with the dialogue where the technician works one syllable at a time to choose the mouth shape that best fits. They also cut and paste the characters onto the backgrounds. Once they create the original image, they use shading, lighting, and other techniques to make the animation more realistic. You can see the differences below.

This is the original animation:















Followed by the shading:















Then finally the lighting:














Rendering is when all the information that makes up a shot (the lighting, texture, etc.) is translated to make a frame. Pixar's program for rendering is called RenderMan (creative!). This program "draws" the finished image by computing every pixel of the image. It takes approximately 6 hours to render a single frame. In a Pixar film, there are an average of 24 frames per second (fps). For an average film, there are almost 130,000 frames, hence why it takes 3-4 years to create these animated films.

Check out this cool video that shows the steps in the animation process!
https://www.youtube.com/watch?v=Z_V752_-8F0&feature=youtu.be

References:
https://www.youtube.com/watch?v=0g1eb8O9j1M
http://pixar-animation.weebly.com/pixars-animation-process.html

Friday, September 23, 2016

Streaming Video

In today's day and age, video streaming is very popular. People watch Netflix on their computers and are also surfing Youtube for funny Vines. How do these videos stream to your laptop and phone?

The process of streaming video is time based and multi-processed. There are three parts: the encoded bits (called AAC), the container that holds the bits together in encoded video data (called FLV or MP4) and the transport that moves it from the server to the player (called RTMP). Because video files are so large, they are broken down into smaller pieces and send individually to their specific location and the M3UP tells the player the order in which to play the stream. The data gets where it needs to be using rules called protocols, which say how the data will travel from one device to another- for example HTTP.


Video starts out as raw files, which are high quality digital files that are not digitized and have not been compressed or distorted in any way. However, as I said, video files are very large. While they break the data into parts, they also make the files smaller. Two ways this can be done are:
1. Making the picture smaller so it doesn't fill the whole screen. You can see this when you are watching a video; you lose quality when you make it full screen. Below you can see Dwight from The Office, both in the smaller frame and stretched to full screen. Although it is not super apparent in these photos, this stretching to full screen does affect the quality when you're watching.
2. Reducing the frame rate. A video is a series of still images, so you can reduce the number of total images so that it takes less data to recreate them. Sometimes you can see videos flicker because eyes and brain can sense the transition between pictures.




Making files smaller requires codec, compression/decompression software, which discards all unnecessary data and lowers the resolution. This reduction of quality depends on a number of factors, one of which being bitrate, which is the speed of transfer from the server to the computer. For example, the bitrate of a tv broadcast is 240,000 kilobits, whereas dial-up internet is 56 kilobits. You can also create files that stream differently at different transfer rates, which is called multibitrate encoding. After going through this complex, efficient process of streaming, your computer discards the data as you watch. Who would've thought all this work goes into streaming The Office on Netflix!

References:
http://computer.howstuffworks.com/internet/basics/streaming-video-and-audio2.htm
https://www.youtube.com/watch?v=AeJzoqtuf-o

Friday, September 16, 2016

Google


So, you want to search for pictures of puppies. Easy, you just type into Google "pics of cute puppies" and then it gives you tons of results, showing you the cutest puppies you've ever seen in your life. But how does Google work?

Well, Google uses an algorithm to scan through information and find keywords. The programs that do this are called spiders (lol Go Spiders!) or crawlers. Search engines in general will use these spiders to create indexes of keywords. It will scan a page, then follow links to other pages with the same keywords and keep tracking the pages it finds to create an index. Indexes are built with a method called hashing, which is a formula that applies a numerical value to each word that is indexed. Creating this list of words is called Web Crawling. The spiders will start at more popular sites, then branch out from there to other links.


Search engines like Google will index hundreds of millions of pages a day in response to tens of millions of queries. What makes Google unique is that it ranks the results based on how many times keywords show up and how long the webpage has existed. At the beginning, Google's system used 3 spiders at once, each of which could keep 300 connections to web pages open at one time. Using 4 spiders, Google could go through 100 pages per second, generating 600 kilobytes of data each second. Incredible! Because content on the internet is always changing, the spiders are always crawling. Computers are rad!

References:
http://computer.howstuffworks.com/internet/basics/search-engine1.htm
http://computer.howstuffworks.com/internet/basics/google1.htm

Friday, September 9, 2016

Finger Printing

We use our fingerprints so many times a day to unlock our iPhones (or Droids, if you're into that sort of thing). But how does this really work? How can you just put your finger on the home button for a few seconds and then gain access to everything in your phone? We have the world at our fingertips!


Well, the oldest method of fingerprint scanning is optical scanning. This method essentially takes a digital photograph of your fingertip and then uses algorithms to find patterns. The programs look for light and dark areas of the image to identify ridges and lines. The scanner uses LED lights to brighten the image and analyze the data.


The second method is capacitive scanning which is most commonly used today. The capacitors in this method go through a change of charge when a ridge of the fingerprint is pressed against it. Air gaps, or valleys, do not change the charge. The changes in charge are tracked and recorded.

So how can the computer compare and check your fingerprint? Well, each print is analyzed for features called minutiae, where lines in our fingerprint end or split in two. The computer does something similar to connect the dots and measures the distances and angles between the minutiae, creating something like this:

The computer takes this data and uses an algorithm to transform it into a numeric code. It then compares the codes to see if the current fingerprint matches the stored one. To decrease the necessary processing power, the program does not compare the whole finger but rather several minutiae. This allows the process to work more quickly and allows it to work despite smudging or off-centered fingerprints. If the codes match, you gain access! How rad!


References:
http://www.androidauthority.com/how-fingerprint-scanners-work-670934/
http://computer.howstuffworks.com/fingerprint-scanner4.htm
http://www.explainthatstuff.com/fingerprintscanners.html

Friday, September 2, 2016

Robotic Surgery

Robotic surgery is becoming more and more common in the medical field. This is because the machines are more precise and flexible than the human hand. Robotic surgery reduces chance of infection, decreases recovery time, and is less invasive, leaving the patient with much less scarring and discomfort.




The robots function with the da Vinci Surgical System, which provides a magnified vision system and gives surgeons a 3D, HD, 360-degree view inside of the patient’s body; a view that they wouldn’t be able to get with the naked eye. It allows the surgeon’s hand movements to be translated into smaller, more precise motions controlling the small surgical instruments inside the body. One of these instruments is a camera with a light on the end, which sends the image to a video monitor in the operating room. The camera and other mechanical arms with dime-sized tools are controlled by the surgeon at a computer console next to the operating table. They control the tools with hand and foot controls that move the robotic arms attached to the surgical instruments, while another surgeon is at the operating table to ensure the correct placement of the instruments. The robotic arms are much more steady, and are able to reach places a human head wouldn’t.




These two videos show a surgical robot peeling a grape and then stitching it back together! Such precision! How cool that computer science helped make robots that are better at doing surgery than we are!
https://www.youtube.com/watch?v=0XdC1HUp-rU


References:
http://www.mayoclinic.org/tests-procedures/robotic-surgery/basics/definition/prc-20013988