<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5699921117307414178</id><updated>2024-09-19T22:49:40.989+05:30</updated><category term="VIEWING VOLUME"/><title type='text'>C()/\/\PUTER SC!E/\/CE E/\/G!NEER!/\/G</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-4257470391437912654</id><published>2012-01-26T22:30:00.000+05:30</published><updated>2012-01-26T22:30:43.895+05:30</updated><title type='text'>CREATE A JAVA PROGRAM WITHOUT MAIN METHOD</title><content type='html'>class Cool&lt;br /&gt;
{&lt;br /&gt;
    static&lt;br /&gt;
    {&lt;br /&gt;
        System.out.println(&quot;This java program have run without the run method&quot;);&lt;br /&gt;
        System.exit(0);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AS THE MAIN BLOCK EXECUTES THE STATIC BLOCK FIRST, IT ENCOUNTERS STATIC BLOCK AND EXECUTES THE STATEMENTS PRESENT. BUT IT THROWS A EXCEPTION AS THERE IS NO MAIN METHOD. TO ERADICATE THIS WE USE SYSTEM.EXIT(0) STATEMENT TO EXIT FROM THE PROGRAM FORCIBLY.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/4257470391437912654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/create-java-program-without-main-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4257470391437912654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4257470391437912654'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/create-java-program-without-main-method.html' title='CREATE A JAVA PROGRAM WITHOUT MAIN METHOD'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-2137998845874294482</id><published>2012-01-04T13:16:00.001+05:30</published><updated>2012-01-04T13:16:43.657+05:30</updated><title type='text'>differences between java and c++ #4</title><content type='html'>Java does not support typedefs, defines, or a preprocessor. Without a preprocessor, there are no provisions for including header files. &lt;br /&gt;
&lt;br /&gt;
Since Java does not have a preprocessor there is no concept of #define macros or manifest constants. However, the declaration of named constants is supported in Java through use of the final keyword. &lt;br /&gt;
&lt;br /&gt;
Java does not support enums but, as mentioned above, does support named constants. &lt;br /&gt;
&lt;br /&gt;
Java supports classes, but does not support structures or unions. &lt;br /&gt;
&lt;br /&gt;
Java does not support pointers (at least it does not allow you to modify the address contained in a pointer or to perform pointer arithmetic). Much of the need for pointers was eliminated by providing types for arrays and strings. &lt;br /&gt;
&lt;br /&gt;
The interface keyword in Java is used to create the equivalence of an abstract base class containing only method declarations and constants. No variable data members or method definitions are allowed. (True abstract base classes can also be created in Java.) The interface concept is not supported by C++. &lt;br /&gt;
Java does not support multiple inheritance. To some extent, the interface feature provides the desirable features of multiple inheritance to a Java program without some of the underlying problems. &lt;br /&gt;
Java does not support the goto statement (but goto is a reserved word). However, it does support labeled break and continue statements, a feature not supported by C++. In certain restricted situations, labeled break and continue statements can be used where a goto statement might otherwise be used. &lt;br /&gt;
Java does not support operator overloading. &lt;br /&gt;
Java does not support automatic type conversions (except where guaranteed safe). &lt;br /&gt;
Unlike C++, Java has a String type, and objects of this type are immutable (cannot be modified). Quoted strings are automatically converted into String objects. Java also has a StringBuffer type. Objects of this type can be modified, and a variety of string manipulation methods are provided. &lt;br /&gt;
&lt;br /&gt;
The scope resolution operator (::) required in C++ is not used in Java. The dot is used to construct all fully-qualified references. Also, since there are no pointers, the pointer operator (-&gt;) used in C++ is not required in Java. &lt;br /&gt;
&lt;br /&gt;
1.it support the basic oops concept&lt;br /&gt;
2.java Does&#39;t support structure and union,where as c++ supports it.&lt;br /&gt;
3.goto statement is avoided in java but not in c++.&lt;br /&gt;
4.pointers are not available in java but present in c++.&lt;br /&gt;
5.java Does&#39;t support multiple inheritance.it supports multilevel inheritance.but c++ supports it&lt;br /&gt;
6.operator overloading is avoided.but c++ support operator overloading&lt;br /&gt;
7.java is an automatic garbage collector where as in c++ destructor is use to frees memory.&lt;br /&gt;
8.java works only on reference where as c++ works on reference as well as on value</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/2137998845874294482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/differences-between-java-and-c-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2137998845874294482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2137998845874294482'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/differences-between-java-and-c-4.html' title='differences between java and c++ #4'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-9169769683622424922</id><published>2012-01-04T13:15:00.002+05:30</published><updated>2012-01-04T13:15:34.668+05:30</updated><title type='text'>difference between java and c++ #3</title><content type='html'>Java can be run anywhere that&#39;s the main difference and it available freely. Java has desighn netbeans to support for designing like to to do any project but i n C++ the project is rather tough to built as it doesn&#39;t support GUI. &lt;br /&gt;
&lt;br /&gt;
Java uses both Complier and interpreter.&lt;br /&gt;
&lt;br /&gt;
Java is an pure object oriented programming language, it uses the concepts of Classes, Objects, Inheritance, Polymorphism. And the execution of a program is non-linear.&lt;br /&gt;
It is so called because you can&#39;t write a program with out using classes &amp; objects. &lt;br /&gt;
&lt;br /&gt;
When you compile a Java program, an intermediate bytecode is generated, which itself is interpreted by the Java Virtual Machine. This way you write a program once, and the virtual machine translates the bytecode into instructions a specific processor can understand. Execution of a Java program is by consequence a bit slow, because the intermediate bytecode has to be interpreted. &lt;br /&gt;
&lt;br /&gt;
Java uses a &quot;Garbage Collector&quot; which manages memory automatically so the programmer doesn&#39;t have to handle that. &lt;br /&gt;
&lt;br /&gt;
Variables in Java can be declared anywhere in a program. (Although it is recommended to declare/define them at the beginning of blocks). &lt;br /&gt;
Reuse of code achieved by inheritance. &lt;br /&gt;
By default members are private. &lt;br /&gt;
During the execution of bytecode by JVM, it does not substitute the entire classes of package which are imported in the program. It just enters the package and executes the class and returns result in to the program. Due to this less memory is used by java program. &lt;br /&gt;
&lt;br /&gt;
C uses concept of structures (not object oriented). &lt;br /&gt;
In C we use the concept of pointers whereas there are no pointers used in JAVA &lt;br /&gt;
In C the programmer needs to manage memory manually. &quot;malloc()&quot; and &quot;free()&quot; are the fundamental memory allocation library calls. &lt;br /&gt;
In C the declaration of variables should be on the beginning of the block. &lt;br /&gt;
C supports go to statement, struct and union unlike Java &lt;br /&gt;
C is compiled to the machines &quot;native language&quot; so it&#39;s execution is much faster than Java&#39;s. &lt;br /&gt;
No reuse in code and by default members are public. &lt;br /&gt;
C programs will have a larger memory footprint than an equivalent program written in pure machine code, but the total memory use of a C program is much smaller than the a Java program because C does not require the loading of an execution interpreter like the JVM.&lt;br /&gt;
--------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Java &lt;br /&gt;
Java is an pure object oriented programming language, it uses the concepts of Classes, Objects, Inheritance, Polymorphism. And the execution of a program is non-linear.&lt;br /&gt;
It is so called because you can&#39;t write a program with out using classes &amp; objects. &lt;br /&gt;
&lt;br /&gt;
Java&#39;s motto (so to speak) is &quot;write once run anywhere&quot;. &lt;br /&gt;
When you compile a Java program, an intermediate bytecode is generated, which itself is interpreted by the Java Virtual Machine. This way you write a program once, and the virtual machine translates the bytecode into instructions a specific processor can understand. Execution of a Java program is by consequence a bit slow, because the intermediate bytecode has to be interpreted. &lt;br /&gt;
&lt;br /&gt;
Java uses a &quot;Garbage Collector&quot; which manages memory automatically so the programmer doesn&#39;t have to handle that. &lt;br /&gt;
&lt;br /&gt;
Variables in Java can be declared anywhere in a program. (Although it is recommended to declare/define them at the beginning of blocks). &lt;br /&gt;
Reuse of code achieved by inheritance. &lt;br /&gt;
By default members are private. &lt;br /&gt;
During the execution of bytecode by JVM, it does not substitute the entire classes of package which are imported in the program. It just enters the package and executes the class and returns result in to the program. Due to this less memory is used by java program. &lt;br /&gt;
&lt;br /&gt;
C &lt;br /&gt;
C uses concept of structures (not object oriented). &lt;br /&gt;
In C we use the concept of pointers whereas there are no pointers used in JAVA &lt;br /&gt;
In C the programmer needs to manage memory manually. &quot;malloc()&quot; and &quot;free()&quot; are the fundamental memory allocation library calls. &lt;br /&gt;
In C the declaration of variables should be on the beginning of the block. &lt;br /&gt;
C supports go to statement, struct and union unlike Java &lt;br /&gt;
C is compiled to the machines &quot;native language&quot; so it&#39;s execution is much faster than Java&#39;s. &lt;br /&gt;
No reuse in code and by default members are public. &lt;br /&gt;
C programs will have a larger memory footprint than an equivalent program written in pure machine code, but the total memory use of a C program is much smaller than the a Java program because C does not require the loading of an execution interpreter like the JVM.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/9169769683622424922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/9169769683622424922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/9169769683622424922'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c-3.html' title='difference between java and c++ #3'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-8267565009669308096</id><published>2012-01-04T13:14:00.002+05:30</published><updated>2012-01-04T13:14:34.219+05:30</updated><title type='text'>difference between java and c++---2</title><content type='html'>Java does not support typedefs, defines, or a preprocessor. Without a preprocessor, there are no provisions for including header files. &lt;br /&gt;
Since Java does not have a preprocessor there is no concept of #define macros or manifest constants. However, the declaration of named constants is supported in Java through use of the final keyword. &lt;br /&gt;
Java does not support enums but, as mentioned above, does support named constants. &lt;br /&gt;
Java supports classes, but does not support structures or unions. &lt;br /&gt;
All stand-alone C++ programs require a function named main and can have numerous other functions, including both stand-alone functions and functions, which are members of a class. There are no stand-alone functions in Java. Instead, there are only functions that are members of a class, usually called methods. Global functions and global data are not allowed in Java. &lt;br /&gt;
All classes in Java ultimately inherit from the Object class. This is significantly different from C++ where it is possible to create inheritance trees that are completely unrelated to one another. &lt;br /&gt;
All function or method definitions in Java are contained within the class definition. To a C++ programmer, they may look like inline function definitions, but they aren&#39;t. Java doesn&#39;t allow the programmer to request that a function be made inline, at least not directly. &lt;br /&gt;
Both C++ and Java support class (static) methods or functions that can be called without the requirement to instantiate an object of the class. &lt;br /&gt;
The interface keyword in Java is used to create the equivalence of an abstract base class containing only method declarations and constants. No variable data members or method definitions are allowed. (True abstract base classes can also be created in Java.) The interface concept is not supported by C++. &lt;br /&gt;
Java does not support multiple inheritance. To some extent, the interface feature provides the desirable features of multiple inheritance to a Java program without some of the underlying problems. &lt;br /&gt;
While Java does not support multiple inheritance, single inheritance in Java is similar to C++, but the manner in which you implement inheritance differs significantly, especially with respect to the use of constructors in the inheritance chain. &lt;br /&gt;
In addition to the access specifiers applied to individual members of a class, C++ allows you to provide an additional access specifier when inheriting from a class. This latter concept is not supported by Java. &lt;br /&gt;
Java does not support the goto statement (but goto is a reserved word). However, it does support labeled break and continue statements, a feature not supported by C++. In certain restricted situations, labeled break and continue statements can be used where a goto statement might otherwise be used. &lt;br /&gt;
Java does not support operator overloading. &lt;br /&gt;
Java does not support automatic type conversions (except where guaranteed safe). &lt;br /&gt;
Unlike C++, Java has a String type, and objects of this type are immutable (cannot be modified). Quoted strings are automatically converted into String objects. Java also has a StringBuffer type. Objects of this type can be modified, and a variety of string manipulation methods are provided. &lt;br /&gt;
Unlike C++, Java provides true arrays as first-class objects. There is a length member, which tells you how big the array is. An exception is thrown if you attempt to access an array out of bounds. All arrays are instantiated in dynamic memory and assignment of one array to another is allowed. However, when you make such an assignment, you simply have two references to the same array. Changing the value of an element in the array using one of the references changes the value insofar as both references are concerned. &lt;br /&gt;
Unlike C++, having two &quot;pointers&quot; or references to the same object in dynamic memory is not necessarily a problem (but it can result in somewhat confusing results). In Java, dynamic memory is reclaimed automatically, but is not reclaimed until all references to that memory become NULL or cease to exist. Therefore, unlike in C++, the allocated dynamic memory cannot become invalid for as long as it is being referenced by any reference variable. &lt;br /&gt;
Java does not support pointers (at least it does not allow you to modify the address contained in a pointer or to perform pointer arithmetic). Much of the need for pointers was eliminated by providing types for arrays and strings. For example, the oft-used C++ declaration char* ptr needed to point to the first character in a C++ null-terminated &quot;string&quot; is not required in Java, because a string is a true object in Java. &lt;br /&gt;
A class definition in Java looks similar to a class definition in C++, but there is no closing semicolon. Also forward reference declarations that are sometimes required in C++ are not required in Java. &lt;br /&gt;
The scope resolution operator (::) required in C++ is not used in Java. The dot is used to construct all fully-qualified references. Also, since there are no pointers, the pointer operator (-&gt;) used in C++ is not required in Java. &lt;br /&gt;
In C++, static data members and functions are called using the name of the class and the name of the static member connected by the scope resolution operator. In Java, the dot is used for this purpose. &lt;br /&gt;
Like C++, Java has primitive types such as int, float, etc. Unlike C++, the size of each primitive type is the same regardless of the platform. There is no unsigned integer type in Java. Type checking and type requirements are much tighter in Java than in C++. &lt;br /&gt;
Unlike C++, Java provides a true boolean type. &lt;br /&gt;
Conditional expressions in Java must evaluate to boolean rather than to integer, as is the case in C++. Statements such as if(x+y)... are not allowed in Java because the conditional expression doesn&#39;t evaluate to a boolean. &lt;br /&gt;
The char type in C++ is an 8-bit type that maps to the ASCII (or extended ASCII) character set. The char type in Java is a 16-bit type and uses the Unicode character set (the Unicode values from 0 through 127 match the ASCII character set). For information on the Unicode character set see http://www.stonehand.com/unicode.html. &lt;br /&gt;
Unlike C++, the &gt;&gt; operator in Java is a &quot;signed&quot; right bit shift, inserting the sign bit into the vacated bit position. Java adds an operator that inserts zeros into the vacated bit positions. &lt;br /&gt;
C++ allows the instantiation of variables or objects of all types either at compile time in static memory or at run time using dynamic memory. However, Java requires all variables of primitive types to be instantiated at compile time, and requires all objects to be instantiated in dynamic memory at runtime. Wrapper classes are provided for all primitive types except byte and short to allow them to be instantiated as objects in dynamic memory at runtime if needed. &lt;br /&gt;
C++ requires that classes and functions be declared before they are used. This is not necessary in Java. &lt;br /&gt;
The &quot;namespace&quot; issues prevalent in C++ are handled in Java by including everything in a class, and collecting classes into packages. &lt;br /&gt;
C++ requires that you re-declare static data members outside the class. This is not required in Java. &lt;br /&gt;
In C++, unless you specifically initialize variables of primitive types, they will contain garbage. Although local variables of primitive types can be initialized in the declaration, primitive data members of a class cannot be initialized in the class definition in C++. &lt;br /&gt;
In Java, you can initialize primitive data members in the class definition. You can also initialize them in the constructor. If you fail to initialize them, they will be initialized to zero (or equivalent) automatically. &lt;br /&gt;
Like C++, Java supports constructors that may be overloaded. As in C++, if you fail to provide a constructor, a default constructor will be provided for you. If you provide a constructor, the default constructor is not provided automatically. &lt;br /&gt;
All objects in Java are passed by reference, eliminating the need for the copy constructor used in C++.&lt;br /&gt;
(In reality, all parameters are passed by value in Java.  However, passing a copy of a reference variable makes it possible for code in the receiving method to access the object referred to by the variable, and possibly to modify the contents of that object.  However, code in the receiving method cannot cause the original reference variable to refer to a different object.) &lt;br /&gt;
There are no destructors in Java. Unused memory is returned to the operating system by way of a garbage collector, which runs in a different thread from the main program. This leads to a whole host of subtle and extremely important differences between Java and C++. &lt;br /&gt;
Like C++, Java allows you to overload functions. However, default arguments are not supported by Java. &lt;br /&gt;
Unlike C++, Java does not support templates. Thus, there are no generic functions or classes. &lt;br /&gt;
Unlike C++, several &quot;data structure&quot; classes are contained in the &quot;standard&quot; version of Java. More specifically, they are contained in the standard class library that is distributed with the Java Development Kit (JDK). For example, the standard version of Java provides the containers Vector and Hashtable that can be used to contain any object through recognition that any object is an object of type Object. However, to use these containers, you must perform the appropriate upcasting and downcasting, which may lead to efficiency problems. &lt;br /&gt;
Multithreading is a standard feature of the Java language. &lt;br /&gt;
Although Java uses the same keywords as C++ for access control: private, public, and protected, the interpretation of these keywords is significantly different between Java and C++. &lt;br /&gt;
There is no virtual keyword in Java. All non-static methods always use dynamic binding, so the virtual keyword isn&#39;t needed for the same purpose that it is used in C++. &lt;br /&gt;
Java provides the final keyword that can be used to specify that a method cannot be overridden and that it can be statically bound. (The compiler may elect to make it inline in this case.) &lt;br /&gt;
The detailed implementation of the exception handling system in Java is significantly different from that in C++. &lt;br /&gt;
Unlike C++, Java does not support operator overloading. However, the (+) and (+=) operators are automatically overloaded to concatenate strings, and to convert other types to string in the process. &lt;br /&gt;
As in C++, Java applications can call functions written in another language. This is commonly referred to as native methods. However, applets cannot call native methods. &lt;br /&gt;
Unlike C++, Java has built-in support for program documentation. Specially written comments can be automatically stripped out using a separate program named javadoc to produce program documentation. &lt;br /&gt;
Generally Java is more robust than C++ due to the following: &lt;br /&gt;
Object handles (references) are automatically initialized to null.&lt;br /&gt;
Handles are checked before accessing, and exceptions are thrown in the event of problems.&lt;br /&gt;
You cannot access an array out of bounds.&lt;br /&gt;
Memory leaks are prevented by automatic garbage collection.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/8267565009669308096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/8267565009669308096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/8267565009669308096'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c-2.html' title='difference between java and c++---2'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-4943418425833568198</id><published>2012-01-04T13:12:00.002+05:30</published><updated>2012-01-04T13:12:26.386+05:30</updated><title type='text'>DIFFERENCE BETWEEN JAVA AND C++</title><content type='html'>Although both are object oriented programming language and Java was derived from C++ but still there is big difference between these two languages.&lt;br /&gt;
&lt;br /&gt;
You can see the actual difference once you start programming on it.&lt;br /&gt;
&lt;br /&gt;
But here i am going to give you few differences between these two...&lt;br /&gt;
&lt;br /&gt;
1. Java does not support operator overloading&lt;br /&gt;
&lt;br /&gt;
2. A class definition in Java looks similar to a class definition in C++, but there is no closing semicolon. &lt;br /&gt;
&lt;br /&gt;
3. Forward reference declarations are not required in Java.&lt;br /&gt;
&lt;br /&gt;
4. Scope resolution operator (::) required in C++ is but not in Java.&lt;br /&gt;
&lt;br /&gt;
4. In C++ you have to re-declare static data members outside the class but such things are not required in Java&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Everything is an object in Java (Single root hierarchy as everything gets derived from java.lang.Object).&lt;br /&gt;
Java does not have all the complicated aspects of C++ ( For ex: Pointers, templates, unions, operator overloading, structures etc..) The Java language promoters initially said &quot;No pointers!&quot;, but when many programmers questioned how you can work without pointers, the promoters began saying &quot;Restricted pointers.&quot; You can make up your mind whether it’s really a pointer or not.&lt;br /&gt;
&lt;br /&gt;
In any event, there’s no pointer arithmetic. There are no destructors in Java (automatic garbage collection). Java does not support conditional compile (#ifdef/#ifndef type).&lt;br /&gt;
&lt;br /&gt;
Thread support is built into java but not in C++. Java does not support default arguments. There’s no scope resolution operator :: in Java. Java uses the dot for everything, but can get away with it since you can define elements only within a class. Even the method definitions must always occur within a class, so there is no need for scope resolution there either. There’s no &quot;goto &quot; statement in Java. Java doesn’t provide multiple inheritance (MI), at least not in the same sense that C++ does. Exception handling in Java is different because there are no destructors. Java has method overloading, but no operator overloading. The String class does use the + and += operators to concatenate strings and String expressions use automatic type conversion, but that’s a special built-in case. Java is interpreted for the most part and hence platform independent.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/4943418425833568198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4943418425833568198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4943418425833568198'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2012/01/difference-between-java-and-c.html' title='DIFFERENCE BETWEEN JAVA AND C++'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-7049703145128064288</id><published>2011-11-23T17:17:00.003+05:30</published><updated>2011-11-23T17:20:40.546+05:30</updated><title type='text'>HTML TAG LIST</title><content type='html'>NOW HERE IN THIS PART LET US JUST KNOW THE BASIC HTML TAGS THAT ARE PRESENT FOR THE CREATION OF AN HTML PAGE.....&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;h1&gt;NOW CHECK THIS LINK&lt;/H1&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://abhi-computers.blogspot.com/2011/11/html-tag-list.html&quot;&gt;&lt;H3&gt;CLICK HERE &lt;/H3&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/7049703145128064288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2011/11/html-tag-list_23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7049703145128064288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7049703145128064288'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2011/11/html-tag-list_23.html' title='HTML TAG LIST'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-8659197155921029092</id><published>2011-09-03T13:36:00.000+05:30</published><updated>2011-09-03T13:36:20.450+05:30</updated><title type='text'>google- 3 yrs old</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
Google Chrome, now the third most popular Web browser in the world after Mozilla&#39;s Firefox and Microsoft&#39;s Internet Explorer which completed its three years on 1 September.&lt;br /&gt;
&lt;br /&gt;
In order to celebrate the day, Google released an infographic that documents the evolution of the Web, which starts from Mosaic to the latest Chromebook.&lt;br /&gt;
The browser grabbed 15 per cent market share during these years. Ben Goodger and Darin Fisher, software engineers, said that the browser will continue to innovate and improve. It will have regular updates every six weeks.&lt;br /&gt;
&lt;br /&gt;
Chrome has increased its speed with the V8 JavaScript engine. Its omnibox is also improved now and helps in suggesting partial matches for URLs and webpage titles.&lt;br /&gt;
&lt;br /&gt;
The browser also supports many popular screen readers, which include, JAWS, NVDA and VoiceOver. These features make it simple for even the visually impaired people to experience the Web better.&lt;br /&gt;
&lt;br /&gt;
Also, an integrated and sandboxed PDF viewer helps a user to view PDF files on the Web. The user need not install any additional software, which helps improve the overall security.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/8659197155921029092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2011/09/google-3-yrs-old.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/8659197155921029092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/8659197155921029092'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2011/09/google-3-yrs-old.html' title='google- 3 yrs old'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-7338884721257061439</id><published>2010-10-06T18:34:00.000+05:30</published><updated>2010-10-06T18:34:10.963+05:30</updated><title type='text'>Sutherland–Hodgman algorithm</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; line-height: 19px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;The algorithm begins with an input&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/List_(computing)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;&quot; title=&quot;List (computing)&quot;&gt;list&lt;/a&gt;&amp;nbsp;of all vertices in the subject polygon. Next, one side of the clip polygon is extended infinitely in both directions, and the path of the subject polygon is traversed. Vertices from the input list are inserted into an output list if they lie on the visible side of the extended clip polygon line, and new vertices are added to the output list where the subject polygon path crosses the extended clip polygon line.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;This process is repeated iteratively for each clip polygon side, using the output list from one stage as the input list for the next. Once all sides of the clip polygon have been processed, the final generated list of vertices defines a new single polygon that is entirely visible. Note that if the subject polygon was&amp;nbsp;concave&amp;nbsp;at vertices outside the clipping polygon, the new polygon may have coincident (i.e. overlapping) edges – this is acceptable for rendering, but not for other applications such as computing shadows.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Sutherland-Hodgman_clipping_sample.svg/505px-Sutherland-Hodgman_clipping_sample.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;316&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Sutherland-Hodgman_clipping_sample.svg/505px-Sutherland-Hodgman_clipping_sample.svg.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;PSEUDO CODE:-&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: monospace, sans-serif; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;List outputList = subjectPolygon;
  for (Edge clipEdge in clipPolygon) do
     List inputList = outputList;
     outputList.clear();
     Point S = inputList.last;
     for (Point E in inputList) do
        if (E inside clipEdge) then
           if (S not inside clipEdge) then
              outputList.add(ComputeIntersection(S,E,clipEdge));
           end if
           outputList.add(E);
        else if (S inside clipEdge) then
           outputList.add(ComputeIntersection(S,E,clipEdge));
        end if
        S = E;
     done
  done&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/7338884721257061439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/sutherlandhodgman-algorithm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7338884721257061439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7338884721257061439'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/sutherlandhodgman-algorithm.html' title='Sutherland–Hodgman algorithm'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-6670335049374481323</id><published>2010-10-06T18:25:00.000+05:30</published><updated>2010-10-06T18:25:20.433+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="VIEWING VOLUME"/><title type='text'>CLIPPING PLANE</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;Clipping planes can be used in addition of those used created for the viewing volume. OpenGL define 6 clipping plane&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;DarkGreyColor&quot;&gt;GL_CLIP_PLANE&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;i&gt;i&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;SmallSize&quot; style=&quot;font-size: 10pt;&quot;&gt;(i goes from 0 to 5)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;A clipping plane is a plane that separate the space in two regions. One region is included from the viewing volume, the other is excluded.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;In mathematics, a plane is defined by this equation :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;DarkGreyColor&quot;&gt;a*x+b*y+c*z+d = 0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;(x, y, z) are the coordinates of the points in the 3D space. All points that verify this equation are on the plane.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The inequality&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;SmallSize&quot; style=&quot;font-size: 10pt;&quot;&gt;(&amp;lt; or &amp;gt; instead of =)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;define the region in each side of the plane.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;In OpenGL, a clipping plane is the region defined by this equation :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;DarkGreyColor&quot;&gt;a*x+b*y+c*z+d &amp;gt;= 0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;A clipping plane is creates with the 4 values a, b, c &amp;amp; d likethis :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double[]&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;eq&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;= {a, b, c, d}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;gl.glClipPlane(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;GL_CLIP_PLANEi&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;eq&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;All points draw , the other are excluded (will not be rendered on the screen).&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;Like for lights, clipping planes have to be enable to be active :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;gl.glEnable(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;GL_CLIP_PLANEi&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/6670335049374481323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/clipping-plane.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6670335049374481323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6670335049374481323'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/clipping-plane.html' title='CLIPPING PLANE'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-2717232740580691548</id><published>2010-10-06T18:23:00.001+05:30</published><updated>2010-10-06T18:25:35.676+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="VIEWING VOLUME"/><title type='text'>ORTHOGRAPHIC PROJECTION</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The Viewing Volume shape in this case is a parallelepiped. The 6 clipping planes delimiting the space can be created with the aid of :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;gl.glOrtho(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;left&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;right&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;bottom&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;top&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;near&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;far&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-glOrtho.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-glOrtho.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;VIEW VOLUME LOOKS LIKE:-&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-glOrtho2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-glOrtho2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/2717232740580691548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/orthographic-projection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2717232740580691548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2717232740580691548'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/orthographic-projection.html' title='ORTHOGRAPHIC PROJECTION'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-3769716153919516085</id><published>2010-10-06T18:22:00.002+05:30</published><updated>2010-10-06T18:25:54.116+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="VIEWING VOLUME"/><title type='text'>PERSPECTIVE PROJECTION</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;With this kind of projection, the viewing volume shape is a truncated pyramid (its top is cutted).&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;This shape is abtained by 6 cutting planes : front, back, right, left, top and bottom planes (planes at the volume boundary). These planes are commonly called&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/OpenGl/Lessons/Lesson1.php#ClippingPlane&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Clipping Planes&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;. These planes can be created with the aid of the method :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;glu&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;.gluPerspective(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;fovy&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;aspect&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;near&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;far&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;fovy&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;parameter is the angle between the plane that goes downwards and the plane that goes upwards.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaParam&quot; style=&quot;font-size: 12pt; font-style: italic;&quot;&gt;aspect&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;ratio is generaly the aspect ratio of the window (window is the region of the screen in which the scene is rendered).&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc; font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-gluPerspective.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;http://jerome.jouvie.free.fr/images/OpenGl/Lessons/Lesson1-gluPerspective.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/3769716153919516085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/perspective-projection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/3769716153919516085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/3769716153919516085'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/perspective-projection.html' title='PERSPECTIVE PROJECTION'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-6566534993288206605</id><published>2010-10-06T18:20:00.002+05:30</published><updated>2010-10-06T18:20:35.733+05:30</updated><title type='text'>VIEWING VOLUME</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The 3D space is defined by 3 axis&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;SmallSize&quot; style=&quot;font-size: 10pt;&quot;&gt;(vectors)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;: X, Y and Z. These 3 axis creates an axis system (see&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/OpenGl/Tutorials/Tutorial4.php&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Tutorial 4&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;for a representation of this axis system). All points of the 3D space can be expressed as a linear combination of these vectors. A point is point represented by its coordinates (x, y, z), which means x * X + y * Y + z * Z (upper case is a vector, low case is a scalar). The volume of the entire 3D space is infinity.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;b&gt;Viewing Volume&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;delimites the 3D space by creating a closed volume. Points outside this volume will not appears on the screen.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;This particularity explain the first call&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;glTranslate&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;(just after&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;span class=&quot;JavaFunc&quot; style=&quot;font-size: 12pt; font-weight: bold;&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;) : we go inside the Viewing Volume. At start, we are on the front plane of the viewing volume.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;The Viewing Volume can be created with two different kind of projections :&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/OpenGl/Lessons/Lesson1.php#Perspective&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Perspective Projection&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp; Render object affected by the distance, a car is seen smaller when it move away.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&lt;a href=&quot;http://jerome.jouvie.free.fr/OpenGl/Lessons/Lesson1.php#Orthographic&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Orthographic Projection&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Verdana; font-size: 16px;&quot;&gt;Render object NOT affected by the distance like a menu, a text on the screen, 2D objects ...&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/6566534993288206605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/viewing-volume.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6566534993288206605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6566534993288206605'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/viewing-volume.html' title='VIEWING VOLUME'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-4953468775601013273</id><published>2010-10-05T17:33:00.005+05:30</published><updated>2010-10-05T17:33:54.232+05:30</updated><title type='text'>CLIPPING ALGORITHMS</title><content type='html'>• Clipping eliminates the parts of a scene that aren’t going to be visible in the&lt;br /&gt;
final display.&lt;br /&gt;
&lt;br /&gt;
• Clipping can be applied to various types of graphics objects.&lt;br /&gt;
– Points – this is basically trivial; check to see that the point coordinates are&lt;br /&gt;
between the clipping boundaries.&lt;br /&gt;
– Lines&lt;br /&gt;
– Fill Areas&lt;br /&gt;
– Curves&lt;br /&gt;
– Text&lt;br /&gt;
&lt;br /&gt;
• The first three are standard in graphics packages.&lt;br /&gt;
&lt;br /&gt;
• Most of the algorithms apply to rectangular clipping regions</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/4953468775601013273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/clipping-algorithms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4953468775601013273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4953468775601013273'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/clipping-algorithms.html' title='CLIPPING ALGORITHMS'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-1141368616330101251</id><published>2010-10-05T17:33:00.002+05:30</published><updated>2010-10-05T17:33:13.729+05:30</updated><title type='text'>MODIFYING WINDOW PROPERTIES</title><content type='html'>• You can control how the window is reshaped by defining a reshape function&lt;br /&gt;
and setting it as the reshape callback using&lt;br /&gt;
glutReshapeFunc( winReshapeFunc);&lt;br /&gt;
&lt;br /&gt;
• You can modify the size and shape of the current window using&lt;br /&gt;
glutPositionWindow( xNewTopLeft, yNewTopLeft);&lt;br /&gt;
glutReshapeWindow( newWidth, newHeight);&lt;br /&gt;
&lt;br /&gt;
• Change the window title with&lt;br /&gt;
glutSetWindowTitle( newTitle);&lt;br /&gt;
&lt;br /&gt;
• Specify the cursor with&lt;br /&gt;
glutSetCursorShape( shape);&lt;br /&gt;
Use symbolic constants like GLUT_CURSOR_UP_DOWN to specify the shapes. (Exact&lt;br /&gt;
shapes available are system specific.)</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/1141368616330101251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/modifying-window-properties.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1141368616330101251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1141368616330101251'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/modifying-window-properties.html' title='MODIFYING WINDOW PROPERTIES'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-3811620334181432908</id><published>2010-10-05T17:32:00.001+05:30</published><updated>2010-10-05T17:32:12.127+05:30</updated><title type='text'>USING MULTIPLE WINDOWS</title><content type='html'>• Create multiple windows by doing the same sequence of steps for each window.&lt;br /&gt;
&lt;br /&gt;
• You need to keep track of the window ID to be able to go back to a particular&lt;br /&gt;
window.&lt;br /&gt;
glutSetWindow(windowID);&lt;br /&gt;
is used to make a particular window active.&lt;br /&gt;
&lt;br /&gt;
• You can destroy a window when you are done with it.&lt;br /&gt;
glutDestroyWindow( windowID);&lt;br /&gt;
&lt;br /&gt;
• The current window ID can be obtained using&lt;br /&gt;
glutGetWindow();</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/3811620334181432908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/using-multiple-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/3811620334181432908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/3811620334181432908'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/using-multiple-windows.html' title='USING MULTIPLE WINDOWS'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-7301221076823475327</id><published>2010-10-05T17:31:00.001+05:30</published><updated>2010-10-05T17:31:13.124+05:30</updated><title type='text'>DISPLAY WINDOWS IN OPEN GL</title><content type='html'>• Don’t forget to initialize GLUT with glutInit.&lt;br /&gt;
&lt;br /&gt;
• Create a window of specified size in a particular position on the screen with&lt;br /&gt;
glutInitWindowPosition( xTopLeft, yTopLeft);&lt;br /&gt;
glutInitWindowSize( dwWidth, dwHeight);&lt;br /&gt;
glutCreateWindow( &quot;Title&quot;);&lt;br /&gt;
&lt;br /&gt;
• Default position is (−1,−1) which allows the window system to choose the&lt;br /&gt;
position.&lt;br /&gt;
&lt;br /&gt;
• Default size is 300 pixels square.&lt;br /&gt;
&lt;br /&gt;
• glutCreateWindow returns an integer id for the window. You only need this&lt;br /&gt;
if you are displaying more than one window.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/7301221076823475327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/display-windows-in-open-gl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7301221076823475327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7301221076823475327'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/display-windows-in-open-gl.html' title='DISPLAY WINDOWS IN OPEN GL'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-4937988554281209687</id><published>2010-10-05T17:30:00.000+05:30</published><updated>2010-10-05T17:30:39.532+05:30</updated><title type='text'>VIEWPORTS IN OPEN GL</title><content type='html'>• To specify the viewport parameters, do&lt;br /&gt;
glViewport( xvmin, yvmin, vpWidth, vpHeight)&lt;br /&gt;
with parameters given in integer screen coordinates. The first two give the&lt;br /&gt;
position of the lower left corner relative to the lower left corner of the display&lt;br /&gt;
window.&lt;br /&gt;
&lt;br /&gt;
• By default, the viewport is the entire window. window.&lt;br /&gt;
&lt;br /&gt;
• You can create multiple viewports within a window.&lt;br /&gt;
&lt;br /&gt;
• To get the parameters for the active viewport, use&lt;br /&gt;
glGetIntegerv( GL_VIEWPORT, vpArray);&lt;br /&gt;
where vpArray is a 4 element integer array. The contents of vpArray after&lt;br /&gt;
the function returns will be the same as the arguments given to glViewport&lt;br /&gt;
in the same order</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/4937988554281209687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/viewports-in-open-gl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4937988554281209687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4937988554281209687'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/viewports-in-open-gl.html' title='VIEWPORTS IN OPEN GL'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-2831472425647204261</id><published>2010-10-05T17:29:00.002+05:30</published><updated>2010-10-05T17:29:22.554+05:30</updated><title type='text'>2D VIEWING IN OPEN GL</title><content type='html'>• The basic library does everything in 3D.&lt;br /&gt;
– The 3D routines can be adapted to 2D&lt;br /&gt;
– A viewport function is provided.&lt;br /&gt;
&lt;br /&gt;
• To define clipping windows and viewports, first go to projection mode.&lt;br /&gt;
glMatrixMode( GL_PROJECTION);&lt;br /&gt;
If necessary, use glLoadIdentity to initialize the matrix.&lt;br /&gt;
&lt;br /&gt;
• A 2D clipping window can be defined with&lt;br /&gt;
gluOtrho2D( xwmin,xwmax, ywmin,ywmax)&lt;br /&gt;
&lt;br /&gt;
• Normalized coordinates are from −1 to 1 in OpenGL. This is the default&lt;br /&gt;
clipping window.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/2831472425647204261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-viewing-in-open-gl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2831472425647204261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2831472425647204261'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-viewing-in-open-gl.html' title='2D VIEWING IN OPEN GL'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-2518342033609538370</id><published>2010-10-05T17:25:00.005+05:30</published><updated>2010-10-05T17:25:55.302+05:30</updated><title type='text'>2D RENDERING PIPELINE</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/pipeline/img067.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/pipeline/img067.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/2518342033609538370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-rendering-pipeline.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2518342033609538370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/2518342033609538370'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-rendering-pipeline.html' title='2D RENDERING PIPELINE'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-1412399730169469494</id><published>2010-10-05T17:25:00.002+05:30</published><updated>2010-10-05T17:25:24.515+05:30</updated><title type='text'>2D VIEWING TRANSFORMATION</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/pipeline/img066.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/pipeline/img066.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/1412399730169469494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-viewing-transformation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1412399730169469494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1412399730169469494'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-viewing-transformation.html' title='2D VIEWING TRANSFORMATION'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-7502245997456268876</id><published>2010-10-05T17:24:00.002+05:30</published><updated>2010-10-05T17:24:34.611+05:30</updated><title type='text'>2D COORDINATE SYSTEM</title><content type='html'>• We use modeling coordinates for individual parts of a 2D scene. For example,&lt;br /&gt;
your polygon function put the polygon at the origin with a “radius” of 1.&lt;br /&gt;
Those were modeling coordinates.&lt;br /&gt;
&lt;br /&gt;
• World coordinates are used for organizing the parts into a scene.&lt;br /&gt;
&lt;br /&gt;
• View coordinates are the coordinates within the desired viewport which is&lt;br /&gt;
somewhere within the window you are using.&lt;br /&gt;
&lt;br /&gt;
• Normalized coordinates are between 0 and 1 or -1 and 1 in each direction.&lt;br /&gt;
They are used to make the viewing process independent of the output device.&lt;br /&gt;
&lt;br /&gt;
• Device coordinates are relative to the actual display area on whatever device&lt;br /&gt;
you are using.</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/7502245997456268876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-coordinate-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7502245997456268876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7502245997456268876'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-coordinate-system.html' title='2D COORDINATE SYSTEM'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-6087906108105731057</id><published>2010-10-05T17:23:00.000+05:30</published><updated>2010-10-05T17:23:16.232+05:30</updated><title type='text'>2D TRANSFORMATIONS</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;The ability to perform transformations on objects in an image is an important feature of a graphics system. Operators were added to this system which allow the user to create 2D transformation matrices that perform the following transformations:&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;li&gt;scale around (0, 0)&lt;/li&gt;
&lt;li&gt;scale around an arbitrary point, with the x-scale direction oriented to a specified angle&lt;/li&gt;
&lt;li&gt;translate&lt;/li&gt;
&lt;li&gt;rotate around (0, 0)&lt;/li&gt;
&lt;li&gt;rotate around an arbitrary point&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;In addition, helper functions were created that perform matrix multiplication, reset a matrix to the identity, reset a matrix to the zero matrix, and print a matrix. Below are some sample images created using these methods. The original polygons are in red, and the tranformed ones are in blue. The images are of translation, rotation of PI/4 about (0, 0), rotation of PI/4 about (80, 40), scaling by .8 in x and y, and respectively.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/scale0.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/scale0.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/translate.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/translate.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/rotate0.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/rotate0.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/rotateArb.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.sccs.swarthmore.edu/users/02/jill/graphics/hw4/rotateArb.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/6087906108105731057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-transformations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6087906108105731057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/6087906108105731057'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-transformations.html' title='2D TRANSFORMATIONS'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-7764665261548991247</id><published>2010-10-04T19:49:00.000+05:30</published><updated>2010-10-04T19:49:14.228+05:30</updated><title type='text'>3D AND ANIMATION</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;3D_computer_graphics&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-large;&quot;&gt;3D computer graphics&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;3D computer graphics&amp;nbsp;in contrast to&amp;nbsp;2D computer graphics&amp;nbsp;are graphics that use a&amp;nbsp;three-dimensional&amp;nbsp;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.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Despite these differences, 3D computer graphics rely on many of the same&amp;nbsp;algorithms&amp;nbsp;as 2D computer&amp;nbsp;vector graphics&amp;nbsp;in the&amp;nbsp;wire frame model&amp;nbsp;and 2D computer&amp;nbsp;raster graphics&amp;nbsp;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.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;3D computer graphics are often referred to as&amp;nbsp;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&amp;nbsp;mathematical&amp;nbsp;representation of any&amp;nbsp;three-dimensional&amp;nbsp;object. A model is not technically a graphic until it is visually displayed. Due to&amp;nbsp;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&amp;nbsp;&lt;i&gt;3D rendering,&lt;/i&gt;&amp;nbsp;or used in non-graphical&amp;nbsp;computer simulations&amp;nbsp;and calculations.&lt;/div&gt;&lt;h3 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Computer_animation&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-large;&quot;&gt;Computer animation&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Computer animation&amp;nbsp;is the art of creating moving images via the use of&amp;nbsp;computers. It is a subfield of computer graphics and&amp;nbsp;animation. Increasingly it is created by means of&amp;nbsp;3D computer graphics, though&amp;nbsp;2D computer graphics&amp;nbsp;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&amp;nbsp;medium, such as&amp;nbsp;film. It is also referred to as CGI (Computer-generated imagery&amp;nbsp;or computer-generated imaging), especially when used in films.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Activemarker2.PNG&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; color: #0645ad; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;thumbimage&quot; height=&quot;285&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Activemarker2.PNG/220px-Activemarker2.PNG&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: initial; vertical-align: middle;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Virtual entities may contain and be controlled by assorted attributes, such as transform values (location, orientation, and scale) stored in an object&#39;s&amp;nbsp;transformation 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&amp;nbsp;keyframes, each storing a value at a given time, per attribute to be animated. The 2D/3D graphics software will&amp;nbsp;interpolate&amp;nbsp;between keyframes, creating an editable curve of a value mapped over time, resulting in animation. Other methods of animation include&amp;nbsp;procedural&amp;nbsp;and&amp;nbsp;expression-based techniques: the former consolidates related elements of animated entities into sets of attributes, useful for creating&amp;nbsp;particle&amp;nbsp;effects and&amp;nbsp;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&amp;nbsp;hierarchy&amp;nbsp;offers in&amp;nbsp;skeletal system&amp;nbsp;set up).&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;To create the illusion of movement, an image is displayed on the computer&amp;nbsp;screen&amp;nbsp;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&amp;nbsp;television&amp;nbsp;and&amp;nbsp;motion pictures.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/7764665261548991247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/3d-and-animation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7764665261548991247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/7764665261548991247'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/3d-and-animation.html' title='3D AND ANIMATION'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-4412375918469289635</id><published>2010-10-04T19:45:00.000+05:30</published><updated>2010-10-04T19:45:30.243+05:30</updated><title type='text'>2D COMPUTER GRAPHICS</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;thumb tright&quot; style=&quot;background-color: transparent; border-bottom-style: none; border-color: initial; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; border-width: initial; clear: right; float: right; margin-bottom: 0.8em; margin-left: 1.4em; margin-right: 0px; margin-top: 0.5em; width: auto;&quot;&gt;&lt;div class=&quot;thumbinner&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-size: 12px; min-width: 100px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 3px !important; padding-left: 3px !important; padding-right: 3px !important; padding-top: 3px !important; text-align: center; width: 98px;&quot;&gt;&lt;div class=&quot;thumbcaption&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 11px; line-height: 1.4em; padding-bottom: 3px !important; padding-left: 3px !important; padding-right: 3px !important; padding-top: 3px !important; text-align: left;&quot;&gt;&lt;a class=&quot;internal&quot; href=&quot;http://en.wikipedia.org/wiki/File:Blit_dot.gif&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-style: none !important; border-color: initial !important; border-left-style: none !important; border-right-style: none !important; border-top-style: none !important; border-width: initial !important; clear: right; color: #0645ad; display: block; float: right; margin-bottom: 1em; margin-left: 1em; text-decoration: none;&quot; title=&quot;Enlarge&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;div class=&quot;magnify&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial initial !important; background-repeat: initial initial !important; border-bottom-style: none !important; border-color: initial !important; border-left-style: none !important; border-right-style: none !important; border-top-style: none !important; border-width: initial !important; float: right;&quot;&gt;&lt;/div&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;2D computer graphics&amp;nbsp;are the computer-based generation of&amp;nbsp;digital images—mostly from two-dimensional models, such as&amp;nbsp;2D geometric models, text, and digital images, and by techniques specific to them. The word may stand for the branch of&amp;nbsp;computer science&amp;nbsp;that comprises such techniques, or for the models themselves.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Blit_dot.gif&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; color: #0645ad; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;thumbimage&quot; height=&quot;320&quot; src=&quot;http://upload.wikimedia.org/wikipedia/en/7/7c/Blit_dot.gif&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: initial; vertical-align: middle;&quot; width=&quot;212&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;2D computer graphics are mainly used in applications that were originally developed upon traditional&amp;nbsp;printing&amp;nbsp;and&amp;nbsp;drawing&amp;nbsp;technologies, such as&amp;nbsp;typography,&amp;nbsp;cartography,&amp;nbsp;technical drawing,&amp;nbsp;advertising, etc.. In those applications, the two-dimensional&amp;nbsp;image&amp;nbsp;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&amp;nbsp;3D computer graphics, whose approach is more akin to&amp;nbsp;photographythan to&amp;nbsp;typography.&lt;/div&gt;&lt;h4 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 15px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Pixel_art&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-large;&quot;&gt;Pixel art&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Pixel art&amp;nbsp;is a form of&amp;nbsp;digital art, created through the use of&amp;nbsp;raster graphics&amp;nbsp;software, where images are edited on the&amp;nbsp;pixel&amp;nbsp;level. Graphics in most old (or relatively limited) computer and video games,&amp;nbsp;graphing calculator&amp;nbsp;games, and many&amp;nbsp;mobile phone&amp;nbsp;games are mostly pixel art.&lt;/div&gt;&lt;h4 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 15px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Vector_graphics&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-large;&quot;&gt;Vector graphics&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:VectorBitmapExample.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; color: #0645ad; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;thumbimage&quot; height=&quot;400&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/VectorBitmapExample.png/220px-VectorBitmapExample.png&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: initial; vertical-align: middle;&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Vector graphics&amp;nbsp;formats are complementary to&amp;nbsp;raster graphics, which is the representation of images as an array of&amp;nbsp;pixels, as it is typically used for the representation of photographic images.&amp;nbsp;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.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/4412375918469289635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-computer-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4412375918469289635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/4412375918469289635'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/2d-computer-graphics.html' title='2D COMPUTER GRAPHICS'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5699921117307414178.post-1334691115272068105</id><published>2010-10-04T19:41:00.000+05:30</published><updated>2010-10-04T19:41:21.187+05:30</updated><title type='text'>COMPUTER GRAPHICS</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;The term computer graphics has been used in a broad sense to describe &quot;almost everything on computers that is not text or sound&quot;.&amp;nbsp;Typically, the term&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;computer graphics&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;refers to several different things:&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;the&amp;nbsp;representation&amp;nbsp;and&amp;nbsp;manipulation&amp;nbsp;of&amp;nbsp;image&amp;nbsp;data&amp;nbsp;by a&amp;nbsp;computer&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;the various&amp;nbsp;technologies&amp;nbsp;used to create and manipulate images&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;the&amp;nbsp;images&amp;nbsp;so produced, and&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;the sub-field of&amp;nbsp;computer science&amp;nbsp;which studies methods for digitally synthesizing and manipulating visual content, see&amp;nbsp;study of computer graphics&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Compute graphics is the life line of today&#39;s computer world. Today, computers and computer-generated images touch many aspects of daily life. 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&amp;nbsp;graph&amp;nbsp;can present complex statistics in a form that is easier to understand and interpret. In the media &quot;such graphs are used to illustrate papers, reports, theses&quot;, and other presentation material.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Many powerful tools have been developed to visualize data. Computer generated imagery can be categorized into several different types: 2D, 3D, 5D, 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&amp;nbsp;computer science&amp;nbsp;which studies methods for digitally synthesizing and manipulating visual content. Over the past decade, other specialized fields have been developed like&amp;nbsp;information visualization, and&amp;nbsp;scientific visualization&amp;nbsp;more concerned with &quot;the visualization of&amp;nbsp;three dimensional&amp;nbsp;phenomena (architectural, meteorological, medical,&amp;nbsp;biological, etc.), where the emphasis is on realistic renderings of volumes, surfaces, illumination sources, and so forth, perhaps with a dynamic (time) component&quot;.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compscience-anirudh.blogspot.com/feeds/1334691115272068105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/computer-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1334691115272068105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5699921117307414178/posts/default/1334691115272068105'/><link rel='alternate' type='text/html' href='http://compscience-anirudh.blogspot.com/2010/10/computer-graphics.html' title='COMPUTER GRAPHICS'/><author><name>anirudh</name><uri>http://www.blogger.com/profile/01686452354838694770</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>