ScratchData LogoScratchData
Back to kriblo_test's profile

Never-ending Bridge (Example: 3D and Sine)

KRkriblo_test•Created April 21, 2021
Never-ending Bridge (Example: 3D and Sine)
103
77
952 views
View on Scratch

Instructions

In this simple example, I use 3D X (width of bridge), Y (height of pylons) and Z (an offset counter for movement) to calculate screen X and Y using a View Factor (VF). The height of the pylons varies using the Sine function. The height of pylons is calculated once per draw cycle, and the results of these calculations are stored in lists to also draw the ropes and cross beams of the bridge, to avoid calculating these again, or unnecessary Pen up/down. The "road" is simply a sprite with no code. All code by me (@kriblo). Study the code inside. Thank you @Constellations- for your inspirational project Golden Gate Bridge: https://scratch.mit.edu/projects/384797257/ Music is Ukulele from Bensound. The backdrop is a stock photo from the world wide web.

Project Details

Project ID519063680
CreatedApril 21, 2021
Last ModifiedSeptember 8, 2021
SharedApril 21, 2021
Visibilityvisible
CommentsAllowed