This book I borrowed from PNM (National Library) and it’s quite an interesting book to read. It tells you about the installation of papevision3d , some computer graphics stuff and how to code using papervision3d and java. The view frustum contains everything that’s visible in a 3D scene. The view frustum is pyramid-shaped and at its apex is the camera. The viewable volume is bounded by a polyhedron. Its entry plane is called the near clip plane and the end of its viewing volume is called the far clip plane. The cube inside the viewable volume shown above is projected onto the viewport while the pyramid outside is not drawn ; it’s culled.
To succesfully map x and y coordinates to the projection plane ( or viewport ) you must map the view frustum shown above to a cube. Without going into all the details , you accomplish this using a projection matrix. Most 3D operations are accomplished using matrix algebra , which is beyond the scope of this book but addressed on the book’s website. The depth in the view frustum is what determines the z-sorting values.
Running a Papervision3D application is like simultaneously recording and projecting your 3D scene . The scene is the middleman. It’s what the camera films and what the projector projects. You can think of the whole process as a combination of a movie camera and projector that both films and projects your 3D scene simultaneously. The scene is what the camera is pointed at and the objects are the items that the camera films. the material are what your objects are dressed in and determine how the light interacts with the scene elements. The reels on your projector are your renderer and as your reels turn ( using onEnterFrame or Timer methods ) they cast the recorded scene onto your screen which is your viewport. Finally , at a the heart of Papevision3D is the DisplayObject3D class.
Crucial to understanding how Papervision3D handles objects is to grasp how vertices are manipulated to create 3D computer graphics. The most important thing to remember when dealing with 3D graphics in Papervision3D is that “a vetex is a vertex”. No matter how complex your 3D objects become , it all eventually boils down to a group of vertices arranged in triangles. Papervision3D’s vertex class is Vertex3D. It holds the 3D position of your vertices and a few methods for those vetices. Technically speaking a vertex is an instance of a data structure. That instance contains the attributes of your point in space…wherever it may be.
Lastly , Papervision3D is a framework that encompass computer graphics that can manipulate objects , graphics and media in one application using java language. Papervision3D can be downloaded in the internet…
p/s: – Some of the article above is taken from the excerpt of Professional PaperVision3D written by Michael Lively published by John Wiley and Sons , Limited.
Data Structures and Algorithm Analysis in Java…
This book also I borrowed from PNM ( National Library ) that tells us about data structure – linked list , queue , stack , trees , hashing , heaps , sorting , algorithm and much more…But the coding of the data structure now we are using is java language.
The most important resource to analyze is generally the running time. Several factors affect the running time of a program. Some , such as the compiler and computer used , are obviously beyond the scope of any theoretical model , so , although they are important , we cannot deal with them here. The other main factors are the algorithm used and the input to the algorithm. Typically , the size of the input is the main consideration. We define two functions , T avg (N) and T worst (N) , as the average and worst-case running time , respectively , used by an algorithm on input of size N. Clearly , T avg (N) ≤ T worst (N). If there is more than one input , these functions may have more than one argument.
The most confusing aspect of analyzing algorithms probably centers around the logarithm. We have laready seen that some divide-and-conquer algorithms will run in O(N log N) time. Besides divide-and-conquer algorithms , the most frequent appearance of logarithms centers around the following general rule. An algorithm is O(log N) if it takes constant (O(1)) time to cut the problem size by a fraction ( which is usually 1/2). On the other hand , if constant time is required to merely reduce the problem by a constant amount ( such as to make the problem smaller by 1 ) , then the algorithm is O(N).
It should be obvious that only special kinds of problems can be O(log N). For instance , if the input is a list of N numbers , an algorithm must take Ω(N) merely to read the input in .Thus , when we talk about O(log N) algorithms for these kinds of problems , we usually presume that the input is preread.
Once an analysis has been performed , it is desirable to see if the answer is correct and as good as possible. One way to do this is to code up the program and see if the empirically observed running time matches the running time predicted by the analysis. When N doubles , the running time goes up by a factor of 2 for linear programs , 4 for quadratic program , and 8 for cubic programs. Programs that run in logarithmic time take only an additive constant longer when N doubles , and programs that run in O(N log N) take slightly more than twice as long to run under the same circumstances. These increases can be hard to spot if the lower-order terms have relatively large coefficients and N is not large enough. An example is the jump form N=10 to N=100 in the running time for the various implementations of the maximum subsequence sum problem. It also can be very difficult to differentiate linear programs from O(N log N) programs purely on empirical evidence.
Lastly , this book mainly talks about data structure , algorithm analysis , coding data structure in java language and some exercise that can strenghten your basic subjects in data structure.
p/s:- Some of the articles is an excerpt from Data Structure and Algorithm Analysis in Java – Second Edition written by Mark Allen Weiss published by Pearson Education Inc.