DG COMPUTER EDUCATION

Friday 6 July 2012

Multimedia


What is Multimedia?
               Multimedia comes in many different formats. It can be almost anything you can hear 
or see like text, pictures, music, sound, videos, records, films, animations, and more.
On the Internet you can often find multimedia elements embedded in web pages, and 
modern web browsers have support for a number of multimedia formats.
In this tutorial you will learn about different multimedia formats and how to use them 
in your web pages.


Browser Support
                The first Internet browsers had support for text only, and even the text
 support was limited to a single font in a single color. Then came browsers with 
support for colors, fonts and text styles, and the support for pictures was added.
The support for sounds, animations and videos is handled in different ways by 
different browsers. Some elements can be handled inline, and some requires an
 extra helper program (a plug-in).
You will learn more about plug-ins in the next chapters.


Multimedia Formats
         Multimedia elements (like sounds or videos) are stored in media files.
The most common way to discover the media type is to look at the file extension.
 When a browser sees the file extensions .htm or .html, it will assume that the file is
 an HTML page. The .xml extension indicates an XML file, and the .css extension
 indicates a style sheet. Picture formats are recognized by extensions like .gif and .jpg.
Multimedia elements also have their own file formats with different extensions like 
.swf, .wmv, .mp3, and .mp4.



What Format To Use?
The WAVE is the most popular uncompressed sound format on the Internet, and
 it is supported by all popular browsers. If you want uncompressed sound (music or speech)
 to be available to all your visitors, you should use the WAVE format.
The MP3 format is the newest format for compressed recorded music. The term MP3 has
 become synonymous with digital music. If your website is about recorded music, the
 MP3 format is the choice.



How to Use Multimedia for Business Marketing

Your guide to using photo sharing, video, podcasts, mobile marketing,
 and other types of multimedia to broaden your company's reach and introduce 
new marketing techniques.
 
Multimedia, such as mobile marketing, livecasting and
 podcasting, photo, video and file sharing, can spread the
 word about your company and help build brand awareness
 in a very unique and powerful way. This particular type of social media also has the ability to go viral quickly. Hottrix, the Las Vegas, Nevada-based iPhone app creator, became one example of a breakthrough success story when their iBeer app, which
 simulates chugging a mug of beer on the iPhone, became
 one of the most-downloaded apps in 2008, and again in 2009.

However, your company's chances of going viral are 
left more to fate than skill, but that's no reason to discount the importance of multimedia for your business. The ability of these technologies to facilitate communication between your
 small business and employees, your customers and potential customers, is tremendous, says Keith Nissen, principle 
analyst at the Scottsdale, Arizona-based market intelligence
 firm, In-Stat. 

"When you think about [multimedia platforms] and 
what that's all about, it's about being able to communicate
 mass marketing messages to the device of choice on demand," 
says Nissen. "I think what's more interesting is how these tools
 can be used in conjunction with other multimedia tools to support the business--the marketing, the sales and promotion of their products and services. To me, that, for a small business, is probably more important than internal communication."

Here's a look at some of the most effective ways to leverage media, such as photos, podcasts, videos, and other types of mobile marketing.

How to Use Multimedia For Business Marketing: Sharing Photos With Your
 Online Community. 

Several online communities exist for the purpose of uploading and sharing photos 
over the Web, and many small businesses have learned to take advantage of these services to market their products. Here are the most common photo sharing marketing strategies.

1.    Offer real-time incentives. Twitter's TweetPhoto will automatically enable you
 to publish photos to your Twitter and Facebook accounts for free via mobile and Web
 platforms. Who needs 140 characters to describe your business when a picture is worth 1,000 words? Tweet pictures of discounted and new items or offer exclusive incentives.

2.    Join like-minded communities. At no cost, Yahoo!-operated Flickr provides a
 useful platform for photo management and sharing. "The first thing that I tell people is that Flickr is not just a photo storage place," says Matt McGee, independent online marketing consultant of the Tri-Cities, Washington-based, Small Business Search Marketing. "It's a very active community centered around Flickr groups." For example, a pet-lovers group may get a kick out of the clothing and toys created by a boutique pet store.

3.    Drive traffic to your website. Pink Cake Box, a gourmet cake shop located in Denville, New Jersey, began using Flickr in 2006 to build brand identity. Co-owner Jesse Heap says that Pink Cake Box's website receives about 300,000 unique users each month, and roughly 10 percent of those visitors are from Flickr, where the company posts photos of interesting or extreme cakes.

How to Use Multimedia For Business Marketing: Hosting Videos and Webcasting.

Sharing videos over the Web is another great resource for small businesses in establishing a social media presence, particularly because of how many people are tuning in. According to a November 2009 survey released by comScore, a digital marketing research firm headquartered in Reston, Virginia, Google's many video sites accounted for 12.2 billion videos viewed that month, including YouTube, which accounted for nearly 99 percent of the total.

Webcasting is essentially broadcasting a video or media file over the Internet using streaming media technology, which can be distributed to many simultaneous viewers at once. 
Done the right way, webcasts, also called video podcasts, vblogs, videocasting or Web shows, can be effective promotional tools. "It's a cool opportunity to take people behind the scenes of a business," says Dina Kaplan, co-founder and COO ofblip.tv, a four-year-old Internet TV network. Her network airs video podcasts from hundreds of companies as diverse as the New York City Ballet to the crafter website Etsy, which broadcasts online classes. "It's been interesting to watch, especially in the last year, how many businesses have created Web shows to promote their product or gain exposure for principals," Kaplan says.

Shooting a video for YouTube or starting a more elaborate webcast essentially takes four basic ingredients: equipment, a theme, an online home and marketing.

1.    The equipment. Very small businesses can buy a webcam or camcorder, wireless microphone and simple video editing equipment such as Sony's Vegas Movie Studio orFinal Cut Pro 7. However, a webcam limits you to filming yourself sitting in front of a computer, and that's not very exciting, says Peter Brusso, an Anaheim, California, podcasting producer and technology marketing consultant. Instead, invest in a camcorder, preferably a "three-chip" camera that uses three computer chips to separate colors, which results in a higher quality picture, Brusso says.

2.    Hire someone. If you have a bigger budget, hire a professional. Prices run from $1,000 to $15,000, according to podcast industry sources. Employment attorney Helene Wasserman created a video podcast called Employer Helpcast two years ago to market her work as a partner with Ford & Harrison LLP, a Los Angeles law firm. Wasserman uses Brusso's company to produce video podcasts and pays $2,500 for segments that run anywhere from 20 to 40 minutes. It's worth the money, she says. "If you're trying to market yourself as having a very professional business, you want to put your best foot forward," she says.

3.    The show. You could have the best-looking video around, but it wouldn't matter if you didn't do something that was interesting and consistent, says blip.tv's Kaplan. For webcasts, stick to a regular broadcast schedule, whether that's once a day, week or month. And keep shows short. "Your aptitude for sitting in your uncomfortable office chair atrophies after about six minutes," she says. Be personable, says Kaplan, who advises podcasters to stick to the old news adage to show, not tell. If you run a retail business, walk around the store, and talk about new merchandise. "Talk to a customer. If you have a hardware store, show them the new hammer on sale," she says.

4.    Hosting and marketing. Once you've got a video in the can, upload it for free on YouTube where it can be viewed by anyone. Webcasts can also be uploaded to free or paid hosting sites such as blip.tv, iTunes or Libsyn. Where a podcast is hosted isn't as important as spreading the word that it's there. Wasserman's podcasts appear on blip.tv and iTunes and cover workplace issues such as job sharing, corporate culture and managing a multi-generational workforce. Wasserman points prospective viewers to the podcast from her website and blog and by including a tagline promoting the show in her email signature. Wasserman also uses a free service that puts word-for-word transcripts of her video podcasts on the Web, where they can be searched byGoogle and other search engines. More people find her podcast through search engines than by visiting blip.tv or her website, and the traffic had led to speaking engagements and new work, she says. "It's the wave of the future. For anyone who wants to use 21st century technologies, this is the way to go."

How to Use Multimedia For Business Marketing: 4 Good Reasons to Go Through the Trouble of Creating a Video.

1.    Show how to use your product. With a slogan as simple as "Broadcast Yourself," many YouTube users are doing just that, especially when it comes to showing how their products or services can be used. "There are countless small business owners posting how-to videos on YouTube," says McGee. "[For instance,] here's how to use the product; here's how to interact with people in our service industry."    

2.    Extend your client base. In December 2007, John Tuggle, a slide and blues guitar instructor based in Decatur, Georgia, began posting videos on YouTube teaching people how to play guitar because he wasn't generating enough interest in his hometown. By February 2008, interest in his lessens grew so much that he created LearningGuitarNow.com where visitors contacted him regularly for private lessons viaSkype at the rate of $25 for 30 minutes. "I just kept [talking to people] and kept putting more out, and figuring out what people wanted. Last year I pulled in almost $100,000 from the website," said Tuggle.

3.    Entertain your customers. It is quite easy to post a video simply for visitors' enjoyment. For instance, Vimeo, a video hosting site that aims to be a "community of creative people who are passionate about sharing the videos they make," features a 'Videos we like' tab. For a small business owner, posting a video for entertainment purposes stands to generate many views, which in turn may spark interest in the company and possibly lead to the purchase of products or services.

4.    Provide a unique service. LiveCast, with headquarters in Vancouver, Canada, enables live video streaming directly from a cell phone, mobile Internet device, or Mac or PC, to anyone connected to the Web. For Gordon Cooper, photographer and founder of Perfect Wedding magazine, live broadcasting gives his business a unique capability. "I can have all the guests at the wedding even if they're not at the wedding," says Cooper. "Guest can still experience the live ceremony [from wherever they are]." Cooper is able to charge an additional $250 for this service.

How to Use Multimedia For Business Marketing: Podcasting

Podcasts have become such a popular marketing tool for sole proprietors and small businesses that a small army of professional producers is out there waiting to help. Here are 9 essential steps a company needs to get started:

1.    Do some homework. The best way to learn about podcasting is to listen to podcasts, says Peter Brusso, an Anaheim, California, podcasting producer and technology marketing consultant. Visit directories such as RSS Player or Libsyn and look for podcasts with a similar style or subject to you want to create, Brusso says.

2.    Decide on a topic. Podcasts could focus on a company's products or services, an industry or on management or professional issues. Whatever the topic, make sure it's related to a company's business in some way, says Sallie Goetsch, proprietor of The Podcast Asylum, a northern California podcast producer and consultant.

3.    Gather your tools. Producing a podcast requires:
•    A microphone, digital audio recorder or USB headset to record podcast episodes
•    Computer with sound card and high-speed Internet connection
•    Audio recording and editing software, either licensed software or free open-source programs such as Audacity.

4.    Be natural. When it's time to record a podcast, organize talking points, but don't use a script. "People don't like being sold. The more from the heart the better," Brusso says.

5.    Build a backlog. Before going live, build up a catalog of a dozen or more episodes. Coming up with ideas is easy, Brusso says. They can spring from talking to customers, going to conventions, reading trade magazines, or following current events.

6.    Be consistent. Length, professional quality, and subject matter of a company's podcast are important but not as much as on-air consistency. Whether it's once a day, once a week or once a month, pick a schedule and stick to it. Podcasts are like radio or TV shows: audiences expect a schedule. Disappoint them and they might not come around again, Brusso says.

7.    Not a D-I-Y type? Hire a pro. Professional producers can handle the technical aspects of starting or creating a podcast. Goetsch and partners Priscilla Rice and Michele Molitor, for example, offer a small-business podcast starter package for $1,100 that covers scripting and recording three to four podcasts plus lots of extras, including finding a hosting service, setting up a podcast blog and submitting broadcasts to podcast directories. Brusso, who works with lawyers and other sole proprietors, charges $1,000 for an hour-long podcast with similar extras. But it doesn't have to be expensive. According to Goetsch, a small businessperson could do everything themselves with an existing computer, $20 headset, free software for audio editing and creating a podcast, and host it on their existing website.

8.    Find your podcast a home. Companies can physically host a podcast anywhere, including with the service they use for their website. What really matters is getting the word out that it's there. For maximum exposure, list podcasts on directories such asPodcastAlley.comPodcast411Podanza or TalkShoe.

9.    Forget about making money, at least not directly. Some podcasts collect revenue from advertising that podcast directories put on their sites. But that shouldn't be why a company does it. Podcasts should be part of a company's overall marketing strategy, Brusso says. "To get yourself known, you have to blog, optimize your Website for search engines and podcast," he says. "If you do all three the results are phenomenal."

How to Use Multimedia For Business Marketing: Mobile Marketing

There are 4.1 billion cellular connections worldwide, and with the prevalence of smart phones, the concept of browsing the Web from a mobile phone has gone mainstream. Consider this: Mobile phone carriers are sitting atop a trove of data – not just your name, address, and, of course, phone number but also credit card information, who your friends are, and where you're located at this very moment. Even with privacy regulations, more of this information will become available to marketers as phones are used more like little PCs, creating opportunities for highly targeted ads and other marketing breakthroughs.

Here's what you need to know to get started.

•    How exactly do I advertise on a mobile phone? The most common type of mobile ad is a display ad served on a Web page called up on a cell phone's screen. The ads are created for the site's mobile format and may not be the same as the ads you would see if you were browsing the site on a PC. Ads are priced on a Cost Per Mille, or CPM, basis – the price you pay for the ad to be seen 1,000 times.

•    How do I buy mobile ads? Most advertisers work with mobile-ad networks, which bring together advertisers and websites that are frequently viewed by phone. Some of the larger players, which are owned by the likes of Google (AdMob), AOL (Third Screen Media) and Apple (Quattro Wireless), will act as full-service marketing shops. They handle the entire process, including technology, the creative content of mobile ads, and the ads' placement.

•    What do mobile ads cost? The cost of mobile ads varies due to the different types of ads, and different cell phone platforms. For instance, AdMob, one of the main mobile-ad networks, currently charges CPMs of $12 to $14 for iPhone banner ads.

•    What about text messaging? One option is to buy or rent a short code, a five- or six-digit phone number from which you can send and receive text messages. One common way to use a short code is to publish it on a billboard or in a print ad ("Text 51234 for more information") that encourages customers to enter a contest or participate in a poll.

•    What does a short code cost? Cellit Mobile Marketing, in Chicago, and Movo, in Florida, sell short codes for $500 to $1,000 per month, plus a one-time setup fee of a few thousand dollars and a charge of 4 cents to 7 cents for each text message. You can also rent a code for as little as $225 per month. Keep in mind that technological standards vary. Nearly every phone on the market is equipped to send and receive texts, but some systems won't let you embed complex graphics or photographs.

•    How do I go after my best customers on a mobile phone? Google has expanded into the mobile world in several ways. Now, it allows companies to buy display ads – ads related to content – on the mobile Web. AdMob claims click-through rates on this type of ad of up to 3 percent, which is quite high. The company charges a cost-per-click (CPC) fee of 25 cents to 30 cents.

How to Use Multimedia For Business Marketing: 3 Tips for Making Your Mobile Campaign Successful

1.    Determine your goals. Who is your target audience? How will they benefit from your message? Do you hope to generate revenue, generate interest, generate traffic to your website, or all three? Define your goals and set benchmarks for what a successful campaign would look like.

2.    Choose your message. Your message should have a clear call to action. According to mobile marketing firm Punchkick Interactive, "over 90 percent of texts from SMS messaging campaigns are read by recipients, generating average response rates of 15 to 30 percent or more." With the potential for that kind of penetration, it would help to make sure your campaign is simple, memorable, and factual. One thing every local business should be doing, says James Citron, CEO of mobile video marketing firmMogreet, is attach keywords to their mobile campaigns that will resonate with customers in order to create brand awareness.

3.    Pair your mobile marketing campaign with other social media. When Casa Del Mar, a luxury beach hotel located in Santa Monica, California, wanted to get the word out about drink specials, they doubled up on social media marketing. The hotel posted messages on Twitter and Facebook saying, "Text CASA to 21534 and enjoy unlimited champagne or Bloodys. FREE." Customers who texted received videos of the weekend brunch spread on their phone and received the beverage of their choice at the hotel. The end result was highly viral, with 250 redemptions.






COMPUTER GRAPHICS


COMPUTER GRAPHICS 
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware.
The development of computer graphics has made computers easier to interact with, and better for understanding and interpreting many types of data. Developments in computer graphics have had a profound impact on many types of media and have revolutionized animationmovies and thevideo game industry.
The term computer graphics has been used in a broad sense to describe "almost everything on computers that is not text or sound".Typically, the term computer graphics refers to several different things:
§  the representation and manipulation of image data by a computer
§  the various technologies used to create and manipulate images
§  the sub-field of computer science which studies methods for digitally synthesizing and manipulating visual content, see study of computer graphics
Computer graphics is widespread today. Computer imagery is found on television, in newspapers, for example in weather reports, or for example in all kinds of medical investigation and surgical procedures. A well-constructed graph can present complex statistics in a form that is easier to understand and interpret. In the media "such graphs are used to illustrate papers, reports, thesis", and other presentation material.
Many powerful tools have been developed to visualize data. Computer generated imagery can be categorized into several different types: 2D, 3D, and animated graphics. As technology has improved, 3D computer graphics have become more common, but 2D computer graphics are still widely used. Computer graphics has emerged as a sub-field of computer science which studies methods for digitally synthesizing and manipulating visual content. Over the past decade, other specialized fields have been developed like information visualization, and scientific visualizationmore concerned with "the visualization of three dimensional phenomena (architectural, meteorological, medical, biological, etc.), where the emphasis is on realistic renderings of volumes, surfaces, illumination sources, and so forth, perhaps with a dynamic (time) component".


SAGE Sector Control Room.
The phrase “Computer Graphics” was coined in 1960 by William Fetter, a graphic designer for Boeing. The field of computer graphics developed with the emergence of computer graphics hardware. Early projects like the Whirlwind and SAGE Projects introduced the CRT as a viable display and interaction interface and introduced the light pen as an input device.
Initial 1960s developments
Further advances in computing led to greater advancements in interactive computer graphics. In 1959, the TX-2 computer was developed at MIT's Lincoln Laboratory. The TX-2 integrated a number of new man-machine interfaces. A light pen could be used to draw sketches on the computer usingIvan Sutherland's revolutionary Sketchpad software.[4] Using a light pen, Sketchpad allowed one to draw simple shapes on the computer screen, save them and even recall them later. The light pen itself had a small photoelectric cell in its tip. This cell emitted an electronic pulse whenever it was placed in front of a computer screen and the screen's electron gun fired directly at it. By simply timing the electronic pulse with the current location of the electron gun, it was easy to pinpoint exactly where the pen was on the screen at any given moment. Once that was determined, the computer could then draw a cursor at that location.
Sutherland seemed to find the perfect solution for many of the graphics problems he faced. Even today, many standards of computer graphics interfaces got their start with this early Sketchpad program. One example of this is in drawing constraints. If one wants to draw a square for example, they do not have to worry about drawing four lines perfectly to form the edges of the box. One can simply specify that they want to draw a box, and then specify the location and size of the box. The software will then construct a perfect box, with the right dimensions and at the right location. Another example is that Sutherland's software modeled objects - not just a picture of objects. In other words, with a model of a car, one could change the size of the tires without affecting the rest of the car. It could stretch the body of the car without deforming the tires.
Further 1961 developments

Spacewar! running on the Computer History Museum's PDP-1.
Also in 1961 another student at MIT, Steve Russell, created the first video game, Spacewar. Written for the DEC PDP-1, Spacewar was an instant success and copies started flowing to other PDP-1 owners and eventually even DEC got a copy. The engineers at DEC used it as a diagnostic program on every new PDP-1 before shipping it. The sales force picked up on this quickly enough and when installing new units, would run the world's first video game for their new customers.
E. E. Zajac, a scientist at Bell Telephone Laboratory (BTL), created a film called "Simulation of a two-giro gravity attitude control system" in 1963.[5] In this computer generated film, Zajac showed how the attitude of a satellite could be altered as it orbits the Earth. He created the animation on an IBM 7090 mainframe computer. Also at BTL, Ken KnowltonFrank Sindon and Michael Noll started working in the computer graphics field. Sindon created a film called Force, Mass and Motion illustrating Newton's laws of motion in operation. Around the same time, other scientists were creating computer graphics to illustrate their research. At Lawrence Radiation Laboratory, Nelson Max created the films, "Flow of a Viscous Fluid" and "Propagation of Shock Waves in a Solid Form." Boeing Aircraft created a film called "Vibration of an Aircraft."
It was not long before major corporations started taking an interest in computer graphics. TRWLockheed-GeorgiaGeneral Electric and Sperry Randare among the many companies that were getting started in computer graphics by the mid-1960s. IBM was quick to respond to this interest by releasing the IBM 2250 graphics terminal, the first commercially available graphics computer.


Pong arcade version
Ralph Baer, a supervising engineer at Sanders Associates, came up with a home video game in 1966 that was later licensed to Magnavox and called theOdyssey. While very simplistic, and requiring fairly inexpensive electronic parts, it allowed the player to move points of light around on a screen. It was the first consumer computer graphics product.
David C. Evans was director of engineering at Bendix Corporation's computer division from 1953 to 1962, after which he worked for the next five years as a visiting professor at Berkeley. There he continued his interest in computers and how they interfaced with people. In 1966, the University of Utah recruited Evans to form a computer science program, and computer graphics quickly became his primary interest. This new department would become the world's primary research center for computer graphics.
Also in 1966, Sutherland at MIT invented the first computer controlled head-mounted display (HMD). Called the Sword of Damocles because of the hardware required for support, it displayed two separate wireframe images, one for each eye. This allowed the viewer to see the computer scene in stereoscopic 3D. After receiving his Ph.D. from MIT, Sutherland became Director of Information Processing at ARPA (Advanced Research Projects Agency), and later became a professor at Harvard.
In 1967 Sutherland was recruited by Evans to join the computer science program at the University of Utah. There he perfected his HMD. Twenty years later, NASA would re-discover his techniques in their virtual reality research. At Utah, Sutherland and Evans were highly sought after consultants by large companies but they were frustrated at the lack of graphics hardware available at the time so they started formulating a plan to start their own company.
In 1969, the ACM initiated A Special Interest Group in Graphics (SIGGRAPH) which organizes conferences, graphics standards, and publications within the field of computer graphics. In 1973, the first annual SIGGRAPH conference was held, which has become one of the focuses of the organization. SIGGRAPH has grown in size and importance as the field of computer graphics has expanded over time.
1970s
Many of the most important early breakthroughs in computer graphics research occurred at the University of Utah in the 1970s. A student by the name of Edwin Catmull started at the University of Utah in 1970 and signed up for Sutherland's computer graphics class. Catmull had just come from The Boeing Company and had been working on his degree in physics. Growing up on Disney, Catmull loved animation yet quickly discovered that he did not have the talent for drawing. Now Catmull (along with many others) saw computers as the natural progression of animation and they wanted to be part of the revolution. The first animation that Catmull saw was his own. He created an animation of his hand opening and closing. It became one of his goals to produce a feature length motion picture using computer graphics. In the same class, Fred Parke created an animation of his wife's face. Because of Evan's and Sutherland's presence, UU was gaining quite a reputation as the place to be for computer graphics research so Catmull went there to learn 3D animation.
As the UU computer graphics laboratory was attracting people from all over, John Warnock was one of those early pioneers; he would later found Adobe Systems and create a revolution in the publishing world with his PostScript page description language. Tom Stockham led the image processing group at UU which worked closely with the computer graphics lab. Jim Clark was also there; he would later found Silicon Graphics, Inc.
The first major advance in 3D computer graphics was created at UU by these early pioneers, the hidden-surface algorithm. In order to draw a representation of a 3D object on the screen, the computer must determine which surfaces are "behind" the object from the viewer's perspective, and thus should be "hidden" when the computer creates (or renders) the image.
The 3D Core Graphics System (or Core) was the first graphical standard to be developed. A group of 25 experts of the ACM Special Interest Group SIGGRAPH developed this "conceptual framework". The specifications were published in 1977, and it became a foundation for many future development in the field.
1980s
In the early 1980s, the availability of bit-slice and 16-bit microprocessors started to revolutionise high resolution computer graphics terminals which now increasingly became intelligent, semi-standalone and standalone workstations. Graphics and application processing were increasingly migrated to the intelligence in the workstation, rather than continuing to rely on central mainframe and mini-computers. Typical of the early move to high resolution computer graphics intelligent workstations for the computer-aided engineering market were the Orca 1000, 2000 and 3000 workstations, developed by Orcatech of Ottawa, a spin-off from Bell-Northern Research, and led by an early workstation pioneer David John Pearson. The Orca 3000 was based on Motorola 68000 and AMD bit-slice processors and had Unix as its operating system. It was targeted squarely at the sophisticated end of the design engineering sector. Artists and graphic designers began to see the personal computer, particularly the Commodore Amiga and Macintosh, as a serious design tool, one that could save time and draw more accurately than other methods. In the late 1980s, SGI computers were used to create some of the first fully computer-generated short films at Pixar. The Macintosh remains a highly popular tool for computer graphics among graphic design studios and businesses. Modern computers, dating from the 1980s often use graphical user interfaces (GUI) to present data and information with symbols, icons and pictures, rather than text. Graphics are one of the five key elements of multimedia technology.
1990s
3D graphics became more popular in the 1990s in gamingmultimedia and animation. At the end of the 80s and beginning of the nineties were created, in France, the very first computer graphics TV series: "La Vie des bêtes" by studio Mac Guff Ligne (1988), Les Fables Géométriques J.-Y. Grall, Georges Lacroix and Renato (studio Fantome, 1990–1993) and Quarxs, the first HDTV computer graphics series by Maurice Benayoun and François Schuiten (studio Z-A production, 1991–1993). In 1995, Toy Story, the first full-length computer-generated animation film, was released in cinemas worldwide. In 1996, Quake, one of the first fully 3D games, was released. Since then, computer graphics have only become more detailed and realistic, due to more powerful graphics hardware and 3D modeling software.
Image type
Two-dimensional


Raster graphicsprites (left) and masks (right)
2D computer graphics are the computer-based generation of digital images—mostly from two-dimensional models, such as 2D geometric models, text, and digital images, and by techniques specific to them.
2D computer graphics are mainly used in applications that were originally developed upon traditional printing and drawing technologies, such as typographycartography,technical drawingadvertising, etc.. In those applications, the two-dimensional image is not just a representation of a real-world object, but an independent artifact with added semantic value; two-dimensional models are therefore preferred, because they give more direct control of the image than 3D computer graphics, whose approach is more akin to photography than to typography.
Pixel art
Pixel art is a form of digital art, created through the use of raster graphics software, where images are edited on the pixel level. Graphics in most old (or relatively limited) computer and video games, graphing calculator games, and many mobile phone games are mostly pixel art.
Vector graphics


Example showing effect of vector graphics versus raster (bitmap) graphics.
Vector graphics formats are complementary to raster graphics. Raster graphics is the representation of images as an array of pixels and is typically used for the representation of photographic images. [6] Vector graphics consists in encoding information about shapes and colors that comprise the image, which can allow for more flexibility in rendering. There are instances when working with vector tools and formats is best practice, and instances when working with raster tools and formats is best practice. There are times when both formats come together. An understanding of the advantages and limitations of each technology and the relationship between them is most likely to result in efficient and effective use of tools.
Three-dimensional
3D computer graphics in contrast to 2D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images. Such images may be for later display or for real-time viewing.
Despite these differences, 3D computer graphics rely on many of the same algorithms as 2D computer vector graphics in the wire frame model and 2D computer raster graphics in the final rendered display. In computer graphics software, the distinction between 2D and 3D is occasionally blurred; 2D applications may use 3D techniques to achieve effects such as lighting, and primarily 3D may use 2D rendering techniques.
3D computer graphics are often referred to as 3D models. Apart from the rendered graphic, the model is contained within the graphical data file. However, there are differences. A 3D model is the mathematical representation of any three-dimensional object. A model is not technically a graphic until it is visually displayed. Due to 3D printing, 3D models are not confined to virtual space. A model can be displayed visually as a two-dimensional image through a process called 3D rendering, or used in non-graphical computer simulations and calculations. There are some 3D computer graphics software for users to create 3D images e.g. autocad, photoshop,solidwork,google sketch up etc.


Computer animation is the art of creating moving images via the use of computers. It is a subfield of computer graphics and animation. Increasingly it is created by means of 3D computer graphics, though 2D computer graphics are still widely used for stylistic, low bandwidth, and faster real-time rendering needs. Sometimes the target of the animation is the computer itself, but sometimes the target is another medium, such as film. It is also referred to as CGI (Computer-generated imagery or computer-generated imaging), especially when used in films.
Virtual entities may contain and be controlled by assorted attributes, such as transform values (location, orientation, and scale) stored in an object'stransformation matrix. Animation is the change of an attribute over time. Multiple methods of achieving animation exist; the rudimentary form is based on the creation and editing of key frames, each storing a value at a given time, per attribute to be animated. The 2D/3D graphics software will interpolatebetween key frames, creating an editable curve of a value mapped over time, resulting in animation. Other methods of animation include procedural and expression-based techniques: the former consolidates related elements of animated entities into sets of attributes, useful for creating particle effects and crowd simulations; the latter allows an evaluated result returned from a user-defined logical expression, coupled with mathematics, to automate animation in a predictable way (convenient for controlling bone behavior beyond what a hierarchy offers in skeletal system set up).
To create the illusion of movement, an image is displayed on the computer screen then quickly replaced by a new image that is similar to the previous image, but shifted slightly. This technique is identical to the illusion of movement in television and motion pictures.

Thursday 5 July 2012

Sample Basic C Programs


Sample Basic C Programs

Program #1: Fahrenheit and Celsius, Version 1

This prints a table with two columns, the left being Fahrenheit degrees, and the right the corrsponding Celsius temperatures.
#include <stdio.h>

/*
 * print a table for Fahrenheit to Celsius
 * from 0 F to 300 F
 */
void main(void)
{
 int fahr;    /* fahrenheit temperature */
 int celsius;    /* celsius temperature */
 register int lower = 0;   /* begin table here */
 register int upper = 300;  /* end table here */
 register int step = 20;   /* increment */

 /*
  * print out the lines for the table
  */
 fahr = lower;
 while(fahr <= upper){
  /* get corresponding temp in degrees C */
  celsius = 5 * (fahr - 32) / 9;
  /* print it */
  printf("%d\t%d\n", fahr, celsius);
  fahr += step;
 }

 /*
  * say goodbye
  */
 exit(0);
}

Program #2: Fahrenheit and Celsius, Version 2

This does the same thing using different control structures and floating point arithmetic.
#include <stdio.h>

#define LOWER  0  /* begin table here */
#define UPPER  300  /* end table here */
#define STEP  20  /* increment */

/*
 * print a table for Fahrenheit to Celsius
 * from 0 F to 300 F
 * floating point version
 */
void main(void)
{
 float fahr;   /* fahrenheit temperature */

 /*
  * print out the lines for the table
  */
 for(fahr = LOWER; fahr <= UPPER; fahr += STEP)
  printf("%3.0f\t%6.1f\n", fahr, (5.0/9.0) * (fahr - 32));

 /*
  * say goodbye
  */
 exit(0);
}

Program #3: cat(1), Version 1

This short program copies the standard input to the standard output.
#include <stdio.h>

/*
 * copy input to output: short version
 */
void main(void)
{
 int c;  /* input character */

 /*
  * copy the input to the output
  * one char at a time
  */
 while ((c = getchar()) != EOF)
  putchar(c);

 /*
  * say goodbye
  */
 exit(0);
}

Program #4: cat(1), Version 2

This does the same thing, but uses different control structures. Most C programmers would write this program the previous way.
#include <stdio.h>

/*
 * copy input to output: long version
 */
void main(void)
{
 int c;  /* input character */

 /*
  * copy the input to the output
  * one char at a time
  */
 do {
  /* read a char */
  c = getchar();
  /* write a char (unless it's */
  /* the end of file marker)   */
  if (c != EOF)
   putchar(c);
 } while (c != EOF);

 /*
  * say goodbye
  */
 exit(0);
}

Program #5: A Version of wc(1)

This program counts the number of lines, words, and characters in its input, where a "word" is defined as any sequence of non-whitespace characters (blanks, tabs, and newlines).
#include <stdio.h>

#define IN_WORD  1 /* currently inside a word */
#define NOTIN_WORD 0 /* currently not in a word */

/*
 * count the number of lines, words, and chars in the input
 * a word is a maximal sequence of nonspace characters, so
 * the quote "+++ --- hi bye 879+3" has 5 words ("+++", "---",
 * "hi", "bye", and "879+3")
 */
void main(void)
{
 register int c;   /* input char */
 register int nl;  /* line count */
 register int nw;  /* word count */
 register int nc;  /* char count */
 register int state;  /* in or not in a word? */

 /*
  * initialize
  */
 nl = nw = nc = 0;
 state = NOTIN_WORD;

 /*
  * handle input a char at a time
  */
 while((c = getchar()) != EOF){
  /* got another character */
  nc++;
  /* is it a newline? */
  if (c == '\n')
   nl++;
  /* is it a word separator? */
  if (c == ' ' || c == '\t' || c == '\n')
   /* YES -- change state */
   state = NOTIN_WORD;
  else if (state == NOTIN_WORD){
   /* NO -- we're now in a word; update */
   /* the counter and state if need be  */
   state = IN_WORD;
   nw++;
  }
 }

 /*
  * announce the results and quit
  */
 printf("%6d\t%6d\t%6d\n", nl, nw, nc);
 exit(0);
}

Program #6: Digit and Space Counter, Version 1

This is similar to the word counting program, but counts digits, whitespace, and everything else (grouped into the category "other"). Note the array.
#include <stdio.h>

/*
 * count the number of each digit, whitespace,
 * and all other chars
 */
void main(void)
{
 register int c;    /* input char */
 register int nwhite = 0;  /* whitespace count */
 register int nother = 0;  /* other count */
 register int i;    /* counter in a for loop */
 int ndigit[10];    /* digit counts */

 /*
  * initialize the ndigit array
  */
 for(i = 0; i < 10; i++)
  ndigit[i] = 0;

 /*
  * handle input a char at a time
  */
 while((c = getchar()) != EOF){
  /* see what it is */
  if (c >= '0' && c <= '9'){
   /* it's a digit -- bump the right count */
   ndigit[c - '0']++;
  }
  else if (c == ' ' || c == '\t' || c == '\n'){
   /* it's whitespace */
   nwhite++;
  }
  else{
   /* it's neither a digit nor whitespace */
   nother++;
  }
 }

 /*
  * announce the results and quit
  */
 printf("digits: ");
 for(i = 0; i < 10; i++){
  printf("'%c' %3d\t", i + '0', ndigit[i]);
  /* put 5 digits per line, for neat output */
  if (i == 4)
   printf("\n        ");

 }
 putchar('\n');
 printf("whitespace: %d\nother:      %d\n", nwhite, nother);
 exit(0);
}

Program #7: Digit and Space Counter, Version 2

This is also a digit counter, but uses a switch statement rather than an if ... else if ... else statement.
#include <stdio.h>

/*
 * count the number of each digit, whitespace,
 * and all other chars
 */
void main(void)
{
 register int c;    /* input char */
 register int nwhite = 0;  /* whitespace count */
 register int nother = 0;  /* other count */
 register int i;    /* counter in a for loop */
 int ndigit[10];    /* digit counts */

 /*
  * initialize the ndigit array
  */
 for(i = 0; i < 10; i++)
  ndigit[i] = 0;

 /*
  * handle input a char at a time
  */
 while((c = getchar()) != EOF){
  /* see what it is */
  switch(c){
  case '0': case '1': case '2': case '3': /* digit */
  case '4': case '5': case '6': case '7':
  case '8': case '9':
   ndigit[c - '0']++;
   break;
  case ' ': case '\t': case '\n': /* whitespace */ 
   nwhite++;
   break;
  default: /* neither a digit nor whitespace */
   nother++;
   break;
  }
 }

 /*
  * announce the results and quit
  */
 printf("digits: ");
 for(i = 0; i < 10; i++){
  printf("'%c' %3d\t", i + '0', ndigit[i]);
  /* put 5 digits per line, for neat output */
  if (i == 4)
   printf("\n        ");
 }
 putchar('\n');
 printf("whitespace: %d\nother:      %d\n", nwhite, nother);
 exit(0);
}

Program #8a: Powers of 2 and -3

This program prints a table of 2 and -3 raised to the powers 0 to 9 inclusive. It illustrates the use of function calls.
#include <stdio.h>

/*
 * prototype (forward declaration)
 */
int power(int m, int n);

/*
 * generate a table of powers of 2
 */
void main(void)
{
 register int i;  /* counter in a for loop */

 /*
  * generate the table
  */
 for(i = 0; i < 10; ++i)
  printf("%3d %6d %6d\n", i, power(2, i), power(-3, i)); 

 /*
  * bye!
  */
 exit(0);
}

Program #8b: Simple Exponentiation Function

This is the function call, from the same program and (as I wrote it) in the same file. Interestingly enough, this program will still work if the two routines ( main and pow) are in different files!
/*
 * compute a power
 *
 * arguments:  int base what you want to raise
 *     int n  non-negative integral power
 *    to raise base to
 *
 * returns: base ^ n (base ** n to you FORTRANers!)
 *
 * exceptions: none handled; overflow may occur, but there
 *   will be no indication of it
 */
int power(int base, int n)
{
 register int i;   /* counter in a for loop */
 register int p;   /* resulting power */

 /*
  * do it the obvious, multiplicative, way
  */
 for(i = 1, p = 1; i <= n; i++)
  p *= base;
 return(p);
}