This is an implementation of the raymarching algorithm in scratch to render a floating cube. Change the scale and size to speed up and increase the frame rate. For better viewing use turbowarp. press space to clear the screen. The coloring of the cube is the surface's normal direction.
Attempt to write your own distance formula for other shapes! there are many great resources to learn raymarching fundamentals use turbo mode! or https://turbowarp.org/945790710?turbo