WorldView : A solid modeling software
Last Modified : 1 June, 2006
|The main screen||The renderer's initial screen|
WorldView has been designed to be a solid modeling software, in which stress has been laid on speed and convenience of modeling, at times at the cost of approximation, rather than the capability to store fine details. It can also store color information of the solid. WorldView can be used to model any solid and to obtain that solid's view in full color from any desired angle in 3-Dimension space. Currently it also supports a few operations on the solid like replacing some specific kind of cell with another.
When a human is asked to recall a scene he/she does not remember the fine details, only approximate positions of the objects, and an abstract view of the objects themselves. When a human sees a tree, he/she does not remember the number of leaves on that tree, their orientation or texture or their exact measurements. Humans only store a faint idea of what the tree looked like, and its approximate size. Such dramatic simplification allows a corresponding dramatic decrease in the amount of processing required to "understand" the scene. Despite the enormous processing capabilities that computers have, humans simply outclass computers when it comes to image processing. As a result, humans are still needed in possibly perilous exploration programmes. Space exploration employs robots only when it becomes impossible or prohibitively expensive/ impractical to send humans. WorldView can thus be thought of as a first step towards an attempt to adopt nature's brilliant strategy for image processing.
WorldView has been implemented using the JAVA programming language. The Graphical User Interface (GUI) is based entirely on JAVA Swing. The software was tested extensively on an Intel Pentium II (233 MHz) system with 192 MB SDRAM and a 2Mb VGA Video Card running Microsoft Windows ME. Any computer system capable of running the Java Virtual machine (JVM) will hence, be capable of running WorldView. The whole software is fully portable to any machine without the need for any change in code or recompilation.
- Intel Pentium II (233 MHz) and above
- 32MB RAM
- 2 MB Video Card
- 2MB free hard disk space
Operating System Requirements
- Microsoft Windows or,
- Linux or,
- Mac OS
|An example of a tomb||The tomb from a side|
WorldView Software Design
WorldView implements the Spatial Occupancy Enumeration representation for solid modeling along with a few enhancements to extend its capabilities. These enhancements over ordinary Spatial Occupancy Enumeration are:
- The solid is decomposed into entities called blocks. Computer memory is allocated only for blocks and not for the whole solid, thus drastically reducing space requirements.
- The resolution (number of voxels/unit volume) of each block in the solid can be different. Hence portions of the solid that need more detail can be stored at higher resolutions, and portions that do not, at lower resolutions.
- Each voxel is allocated a user-defined number of bits so that not only the presence/absence of a cell is stored but also its color information. Setting the number of bits/voxel can easily set the number of colors supported.
The WorldView Renderer implements Visible Surface Ray Tracing (ray casting) to obtain axonometric orthographic parallel projections of the desired view of the modeled solid i.e. the direction of projection and normal to the projection plane are in the same direction, but it is possible to keep the projection planes at an angle to the principal axis. Also, rays are cast at the resolution of the solid itself, and not at the resolution of the viewport. Hence, it operates at object-precision rather than image-precision.
Considerable thought and effort has been spent on carefully deciding the modules comprising Worldview. Worldview has been designed to be easily extensible, to incorporate into itself the many possible modeling representations. Future efforts to extend its capabilities will be considerably eased because of the choice of modules used. The modules are:
- Internal Data Structures: This is the module, which stores the data required for completely describing the object in the given representation. This module is responsible for translating the data describing the object in the particular representation, to and from a form, which can be stored in the constrained environments of a computer. Time needed to access the stored data is a major concern while implementing this module. This module is also responsible for ascertaining the validity of the data. It is also possible to incorporate into this module, implementations of algorithms for various transformations to enhance the overall performance of the software.
- Renderer: The renderer is responsible for obtaining the appropriate data from the internal data structure and painting the graphical image on a transparent canvas. The renderer only obtains the specifications of the view in 3-dimensions desired by the user, and produces the corresponding 2-dimensional planar view. The renderer is also responsible for interpreting the color-information stored in the internal data structure. It also fixes the size and background of the viewport over which the solid's required view is drawn.
- WorldView also provides the capability to retrieve previously modeled solids from the back storage like hard disks or CD-ROMS.
|The tomb from a side. Viewpoint now inside the object||The tomb from the top but to a side.|
|public point()||Constructor for obtaining a point initialized to (0,0,0)|
|public point(int x, int y, int z)||Constructor for obtaining a point initialized to (x,y,z)|
|public void set(int x, int y, int z)||Re-initialize the point object to (x,y,z)|
|public Block(int nbits, int x, int y, int z)||Create a Block which stores nbits number of bits per voxel and has dimensions (x,y,z)|
|Public Block(int nbits, point p)||Create a Block which stores nbits number of bits per voxel and has dimensions (p.x,p.y,p.z)|
|public Block(FileInputStream fin) throws IOException||Create a Block by reading it from the FileInputStream fin|
|public void setData(long data, int x, int y, int z)||Stores the first nbits bits of data into the Block at position (x,y,z)|
|public long getData(int x, int y, int z)||Returns the data stored in the Block at position (x,y,z)|
|public void addBlock(Block toadd, point p)||Adds the Block toadd to the Spocen object at point p|
|public void addBlock(Block toadd, point p1, point p2)||Adds the Block toadd to the Spocen object such that it extends from point p1 to point p2|
|public void addBlock(Block toadd, int x1, int y1, int z1, int x2, int y2, int z2)||Add the Block toadd to the Spocen object such that it extends from (x1,y1,z1) to (x2,y2,z2)|
|Public void remBlock(int pos)||Removes the Block stored at position pos|
|public void remBlock(int x, int y, int z)||Removes the Block which contains the point (x,y,z)|
|public void replace(long toreplace, long with)||Replaces all occurrences of data toreplace with the data with|
|public void setData(long data, int x, int y, int z)||Stores the first nbits bits in data at the position (x,y,z) only if a Block exists there|
|public long getData(int x, int y, int z)||Returns the data stored at the position (x,y,z). If no Block exists there, then returns 0|
|public void writeToFile(File fname)||Stores all the contents of the data in the file specified by fname|
|public void readFromFile(File fname)||Retrieves and stores all the data of the Spocen object stored in the file fname|
|public point getDimension()||Returns the maximum extent of the Spocen object as a point object.|
|public void setDesc(String desc)||Sets the descriptive string for the Spocen object to desc|
|public String getDesc()||Returns the descriptive string for the Spocen object|
|public int getNbits()||Returns the maximum number of bits nbits stored in any Block of the Spocen object|
|public int getCount()||Returns the number of Blocks that have been added to the Spocen object|
|public String getBlockDesc(int pos)||Returns the descriptive string for the Block stored at position pos|
|public point getPoints(int pos)||Returns a point object array of length 2 storing the two points determining the extent of the Block stored at position pos|
|public point getBlockDim(int pos)||Returns the dimensions of the Block stored at position pos as a point object.|
|The tomb from the exact top.||The tomb from the bottom but to a side.|
Future scope of the project
WorldView has tremendous future scope.
Possible future extensions are:
- Modeler: The modeler will be used by the user, to interactively create WorldView solid objects using a sleek Graphical User Interface (GUI).
- 3-Dimensional Games: Contrary to normal Spatial Occupancy Enumeration, WorldView can be configured to use amazingly small amounts of memory if the scene to be rendered is chosen appropriately. It can thus be used as a 3D engine for games on mobile devices.
- Path Finder: An algorithm may be implemented to find a path between any two points in the virtual world modeled using WorldView.
- Scene Analysis and Computer Vision: The software will allow the computer to recognize and reconstruct 3D models of a scene from several of its 2D images.
- Object Recognition: A modeled 3D object may be compared to a stored library of solids and be matched with them in order to recognize that object.
- Finite Element Analysis: With appropriately designed internal data structures, the analysis of any solid can be done using the finite element method.
All content on this website is licensed as Creative Commons-Attribution-ShareAlike 4.0 License. Opinions expressed are solely my own and do not express the views or opinions of my employer.