ScratchData LogoScratchData
Back to nembence's profile

Cube outline

NEnembence•Created April 29, 2025
Cube outline
18
9
115 views
View on Scratch

Description

Drag the cube or use arrow keys to rotate Inspired by https://scratch.mit.edu/projects/1141247186/ but it works very differently. It uses the fact that the corners included in the outline only depend on the position of the camera, but not the orientation. The project treats every box as a cube internally, and it stretches them back only at the last step. To draw the cube it first calculates the green point, that tells where the camera is compared to the plane of each side of the cube. The selected corners will only depend on this point. The project finds a corner of the cube that is drawn (the red point) by rotating the green point and rounding to the nearest corner. After that it calculates the corners of a hexagon that is perpendicular to the green line and it has a corner aligned with the red point. It rounds the corners of the hexagon to the nearest corner of the cube and this is the cube's outline. If you want to see the hexagon from another angle, hold [X], which prevents updating the green point

Project Details

Project ID1167862322
CreatedApril 29, 2025
Last ModifiedMay 1, 2025
SharedApril 29, 2025
Visibilityvisible
CommentsAllowed