kucukil
07-05-2004, 05:05 AM
I want to create an olap cube via svg.I want to turn it with mouse and see desired surface.Besides i want to show a table on each surface.Can anybody tell me how can i do that , is there a tool that gives the exchange values of an object(ex. polygon points),when i rotate the object?
freedoms
07-27-2004, 11:34 AM
I think you'd have to use javascript with a little basic 3D trigonometry.
You would represent your cube as a serires of points of the form (x,y,z),
a series of lines between those points, and a series of assumed-flat polygons
each consisting of a list of the points and a colour. (You could skip the the series of lines.)
To rotate the cube, you would rotate all of the points by the same transformation matrix,
which is something like:
| 0 sin theta |
| cos theta 0 |
You could put vector-represented (as opposed to HTML) tables over each of the faces
by distorting their representations seperatly and plotting them in conjunction with the code to plot the faces.