ScratchData LogoScratchData
Back to raucket's profile

3D Cube Code Block

RAraucket•Created March 31, 2014
3D Cube Code Block
23
20
771 views
View on Scratch

Instructions

My first "real" work on 3D UP/DOWN: roll, LEFT/RIGHT: pitch and W/A: yaw I've made a block of code to simplify the creation of a 3D cube. Using parameters to control left, top, front, width, height, depth, roll, pitch and yaw.

Description

Thanks to wiki - http://en.wikipedia.org/wiki/Transformation_matrix and 46 Dogs - http://46dogs.blogspot.no/2011/04/right-handed-rotation-matrix-for.html to ease my pain on hacking the 3D visualization on a 2D surface I still need improve the code to reflect the "correct" surface/layer on roll, pitch and yaw. Also it would be nice to fill the surface with som texture.. Updated with code to project perspective. Thanks to Aphex19 @ http://www.dreamincode.net/forums/topic/239174-3d-perspective-projection/ and Toshie Horie @ http://www.petesqbsite.com/sections/tutorials/tuts/perspective.html

Project Details

Project ID20120339
CreatedMarch 31, 2014
Last ModifiedApril 20, 2014
SharedMarch 31, 2014
Visibilityvisible
CommentsAllowed