Web Hosting Tomcat, Java, JSP, Servlets, J2EE, PHP, MySQL

Cheap web hosting provider

09
Nov

Black Art of Java Game Programming by Joel

Black Art of Java Game Programming by Joel Fan Sams, Macmillan Computer Publishing ISBN: 1571690433 Pub Date: 11/01/96 Previous Table of Contents Next The World Coordinate System (WCS) The house that the architect is designing will eventually be built in a small town. This small town has decided that it needs to have its own coordinate system, and that the origin is in the middle of the town hall, with the x-axis going east and y-axis going north, as in Figure 11-13. Let s call this the world coordinate system (WCS). The house will be built at an exact coordinate in the WCS. The building will also be scaled, because nobody wants to live in a 10-inch by 20-inch house. Figure 11-13 The building placed in the WCS One day the architect gets the idea to calculate the exact coordinates that the vertices of his model will have in the real world. He knows the exact position where his house will be built and also the angle with respect to the town hall. So he enters the magic world of math. He takes his blueprint to the town hall and places it so that the axis in the MCS coincides with the axis in the WCS. He then recalculates the vertices by first scaling them so that the house will have the same dimensions as in the real world. Next he rotates the vertices by the same angle as the house will be rotated with respect to the WCS. Then he translates the vertices to the position where the house will be built. The coordinates resulting from these calculations are saved, and he waits until the construction work is done. He then checks the calculated vertices and measures the exact coordinates of each corner in the real house. Behold, they are exactly identical. What he does is in fact a series of transforms as discussed in Appendix E, 3D Transforms. At this point you should be acquainted with matrix operation. If you aren t, just take the results for given. Figure 11-14 shows the results of the architect s calculations. Figure 11-14 The town populated by 3D models, each with its own MCS Let s pick one single vertex in the MCS and call it v, and then transform it from MCS to WCS.
Note: If you are looking for cheap and reliable provider to host and run your servlet application check Vision servlet hosting services

Comments are closed.

Home | About Us | Compare Plans | Standard Hosting | Business Hosting | Java Tomcat Hosting | Support | FAQ | Order Now!

Powered by Omnicus java hosting services. All rights reserved.
Entries (RSS) and Comments (RSS).