Saturday, March 26, 2011

CG- colour model

Color Models:

 A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted (viewing conditions, etc.), the resulting set of colors is called color space. This section describes ways in which human color vision can be modeled.

A color model is an orderly system for creating a whole range of colors from a small set of primary colors. There are two types of color models, those that are subtractive and those that are additive. Additive color models use light to display color while subtractive models use printing inks. Colors perceived in additive models are the result of transmitted light. Colors perceived in subtractive models are the result of reflected light.

The Two Most Common Color Models:
There are several established color models used in computer graphics, but the two most common are the RGB model (Red-Green-Blue) for computer display and the CMYK model (Cyan-Magenta-Yellow-Black) for printing.


1) RGB Color Model-*Additive color model
                                *For computer displays
                                *Uses light to display color
                                *Colors result from transmitted light
                                *Red+Green+Blue=White



rgb.gif






2) CMYK Color Model-*Subtractive color model
                                    *For printed material
                                    *Uses ink to display color
                                    *Colors result from reflected light
                                    *Cyan+Magenta+Yellow=Black

cmyk.gif
 

In the RGB model notice that the overlapping of additive colors (red, green and blue) results in subtractive colors (cyan, magenta and yellow). In the CMYK model notice that the overlapping of subtractive colors (cyan, magenta and yellow) results in additive colors (red, green and blue).





refer :  http://www.sketchpad.net/basics4.htm
           http://en.wikipedia.org/wiki/Color_model
          http://en.wikipedia.org/wiki/RGB_color_model

CG- dithering techniques...

Dithering - A technique used in quantization processes such as graphics and audio to reduce or remove the correlation between noise and signal.

Dithering is used in computer graphics to create additional colors and shades from an existing palette by interspersing pixels of different colors. On a monochrome display, areas of Grey are created by varying the proportion of black and white pixels. In color displays and printers, colors and textures are created by varying the proportions of existing colors. The different colors can either be distributed randomly or regularly. The higher the resolution of the display, the smoother the dithered color will appear to the eye.


Dithering doesn't reduce resolution. There are three types: regular dithering which uses a very regular predefined pattern; random dither where the pattern is a random noise; and pseudo random dither which uses a very large, very regular, predefined pattern.


Dithering is used to create patterns for use as backgrounds, fills and shading, as well as for creating halftones for printing. When used for printing is it very sensitive to paper properties. Dithering can be combined with rasterising. It is not related to anti-aliasing.


Dithering technique:
 Dither algorithm performs an optimal adding of a sequence of images as far as resolution is concerned. The principle is that, at sub-pixel level, shifts between individual input images are nearly randomly distributed. For example, a star in the first image may be centered  perfectly in the middle of a pixel, whereas it will be across two pixels in the second one, and so on. Since it is easy to know the exact shift between the images, it is possible to create an output image with a finer sampling, in which resolution may be increased with respected to each input image. In fact, energy from each input pixel is dropped in the output image.

  Fig. 1: Random Number Generated  
                      


                  
   
Fig. 2: Algorithm Generated


Figure 1 shows a dither pattern generated by a random number generator, even with a randomized seed.  Note that the distribution of points is not very uniform.  Indeed, there are some points that could result in sensor noise not being eliminated but in fact being reinforced due to insufficient difference in positions.

Figure 2 shows the dither pattern that results from the use of this algorithm. It achieves maximize separation from one frame to another with a minimum overall movement of the guide star.

  
Usage :

Dither should be added to any low-amplitude or highly-periodic signal before any quantization or re-quantization process, in order to De-correlate the quantization noise with the input signal and to prevent non-linear behavior (distortion); the lesser the bit depth, the greater the dither must be. The results of the process still yield distortion, but the distortion is of a random nature so its result is effectively noise. Any bit-reduction process should add dither to the waveform before the reduction is performed.

 

 

refer : http://www.hiddenloft.com/notes/dithering1.htm

          http://en.wikipedia.org/wiki/Dither

          http://www.astrosurf.org/buil/us/spe9/lrgb22.htm


CG- halftone shading...

Halftone is the reprographic technique that simulates continuous tone imagery through the use of dots, varying either in size, in shape or in spacing. "Halftone" can also be used to refer specifically to the image that is produced by this process.
 Where continuous tone imagery contains an infinite range of colors or greys, the halftone process reduces visual reproductions to a binary image that is printed with only one color of ink. This binary reproduction relies on a basic optical illusion—that these tiny halftone dots are blended into smooth tones by the human eye.
At a microscopic level, developed black and white photographic film also consists of only two colors, and not an infinite range of continuous tones.






Left : Halftone dots.     
Right : How the human eye would see this sort of arrangement from a sufficient distance.





refer:   http://en.wikipedia.org/wiki/Halftone

Saturday, March 12, 2011

CG - Midpoint ellipse algorithm

Midpoint ellipse algorithm is a method for drawing ellipses in computer graphics. This method is modified from Bresenham's algorithm. The advantage of this modified method is that only addition operations are required in the program loops. This leadsto simple and fast implementation in all processors.

An ellipse with center at the origin and axes parallel to the x - y axes has the formula
f(x, y) = (x.x/a.a  +  y.y/b.b) -1=0

where a and b are the radii, and where f is positive if a point (x,y) lies outside the ellipse, is negative
if a point is inside the ellipse, and is zero if a point is on the ellipse.


Let us consider one quarter of an ellipse. The curve is divided into two regions. In
region I, the slope on the curve is greater than -1 while in region II less than -1.
dy/dx = -1
Region II
Region I
a
b
x
y
m = -1




Friday, March 11, 2011

CS-Preface

A preface is an introduction to a book or other literary work written by the work's author. An introductory essay written by a different person is a foreword and precedes an author's preface. The preface often closes with acknowledgements of those who assisted in the project.

A preface generally covers the story of how the book came into being, or how the idea for the book was developed; this is often followed by thanks and acknowledgments to people who were helpful to the author during the time of writing.

A preface is usually signed (and the date and place of writing often follow the typeset signature); a foreword by another person is always signed. Information essential to the main text is generally placed in a set of explanatory notes, or perhaps in an "Introduction" that may be paginated with Arabic numerals, rather than in the preface. The term preface can also mean any preliminary or introductory statement. It is sometimes abbreviated pref.

Preface comes from the Latin, meaning either "spoken before" (prae + fatia) or "made before" (prae + factum). While the former source of the word could have preface meaning the same as prologue, the latter strongly implies an introduction written before the body of the book.

Preface is:
1. a preliminary statement in a book by the book's author or editor, setting forth its purpose and scope, expressing acknowledgment of assistance from others, etc.
2. an introductory part, as of a speech.

CS- Back matter

Back Matter
Follow the body of your report with appendices and references. 
I. Appendices
Present supporting material--such as details of testing procedures, extended calculations, computer documentation, instructions, data tables, side issues, or large figures--in your appendices. 

II. References
List any sources of information--articles, books, interviews--you've used.

CS- Copyright notice:

Copyright is a set of exclusive rights granted to the author or creator of an original work, including the right to copy, distribute and adapt the work. Copyright does not protect ideas, only their expression. In most jurisdictions copyright arises upon fixation and does not need to be registered. Copyright owners have the exclusive statutory right to exercise control over copying and other exploitation of the works for a specific period of time, after which the work is said to enter the public domain. Uses covered under limitations and exceptions to copyright, such as fair use, do not require permission from the copyright owner. All other uses require permission. Copyright owners can license or permanently transfer or assign their exclusive rights to others.

Initially copyright law only applied to the copying of books. Over time other uses such as translations and derivative works were made subject to copyright. Copyright now covers a wide range of works, including maps, sheet music, dramatic works, paintings, photographs, sound recordings, motion pictures and computer programs.


A copyright notice, either as symbol or phrase, informs users of the underlying claim to copyright ownership in a published work.
Copyright law is different from country to country, and a copyright notice is required in about 20 countries for a work to be protected under copyright. Before 1989 all published works in the US had to contain a copyright notice, the © symbol followed by the publication date and copyright owner's name, to be protected by copyright. This is no longer the case and use of a copyright notice is now optional in the US, though they may still be used as a deterrent against infringement, or as a notice that the owner intends on holding their claim to copyright.

A copyright notice or copyright symbol is an identifier placed on copies of the work to inform the world of copyright ownership. While use of a copyright notice was once required as a condition of copyright protection, it is now optional. Use of the copyright notice is the responsibility of the copyright owner and does not require advance permission from, or registration with the Copyright Office.

Because prior law did contain such a requirement, however, the use of a copyright notice or copyright symbol is still relevant to the copyright status of older works.

Copyright notice was required under the 1976 Copyright Act. This requirement was eliminated when the United States adhered to the Berne Convention, effective March 1, 1989. Although works published without copyright notice before that date could have entered the public domain in the United States, the Uruguay Round Agreements Act (URAA) restores copyright in certain foreign works originally published without copyright notice.

How Is A Copyright Symbol Useful

Use of the copyright notice may be important because it informs the public that the work is protected by copyright, identifies the copyright owner, and shows the year of first publication. Furthermore, in the event that a work is infringed, if a proper notice of copyright appears on the published copy or copies to which a defendant in a copyright infringement suit had access, then no weight shall be given to such a defendant's defense based on innocent infringement. Innocent infringement occurs when the infringer did not realize that the work was protected. The use of the copyright notice is the responsibility of the copyright owner and does not require advance permission from, or registration with, the Copyright Office.

Correct Form For The Copyright Symbol

The notice for visually perceptible copies should contain all the following three elements:
  1. The copyright symbol © (the letter C in a circle), or the word "Copyright," or the abbreviation "Copr."
  2. The year of first publication of the work. In the case of compilations or derivative works incorporating previously published material, the year date of first publication of the compilation or derivative work is sufficient. The year date may be omitted where a pictorial, graphic, or sculptural work, with accompanying textual matter, if any, is reproduced in or on greeting cards, postcards, stationery, jewelry, dolls, toys, or any useful article.
  3. The name of the owner of copyright in the work, or an abbreviation by which the name can be recognized, or a generally known alternative designation of the owner.

Example: copyright © 2002 John Doe

The © or "C in a circle" notice or symbol is used only on visually perceptible copies.
refer : http://inventors.about.com/od/copyrights/a/CopyrightNotice.htm
          http://en.wikipedia.org/wiki/Copyright_notice