ScratchData LogoScratchData
Back to A__B__3__T__E__S__T's profile

3D Surfaced Cube-Reuploaded

A_A__B__3__T__E__S__T•Created June 20, 2011
3D Surfaced Cube-Reuploaded
0
0
136 views
View on Scratch

Description

Didn't work quite as well as I wanted, but oh well. Reuploaded to test the flash turbo speed for a nice instant rendering. ORIGINAL NOTES: This is a 3D surfaced cube. How to use it: -Click the mouse to rotate the square. -When you put the mouse down, you will start dragging the cube, but it will just be a 3D wireframe. -When you release the mouse, it will render as a 3D surface cube. How it works: It uses several complex 3D projection formulas to find the x and y coordinates of the vertices to make the cube wireframe appear 3-dimensional. It then connects these in order with the pen tool, creating a 3D wireframe. To shade the sides, it must first know which sides are visible and which are hidden. It uses a complex rotational identification algorithm to find which sides are visible to the viewer based on the rotation and tilt of the cube. It then stores these in a list. Finally, the 6 shading sprites identify which sides are supposed to be shaded and shade them using a parallelogram shading algorithm. (I have used 6 sprites to shade the cube, two for each side, for added speed). To increase the speed even more, it then decides the most efficient way to shade the side out of two methods, based on the lengths of each edge. It ends this process with the shaded cube! I used some scripts from my project "3D Object Wireframe." This is the first of its kind on Scratch, and the result of several hours of hard work. Thanks for watching and please leave a comment or press love it if you love it!

Project Details

Project ID1872937
CreatedJune 20, 2011
Last ModifiedJune 20, 2011
SharedJune 20, 2011
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root