ScratchData LogoScratchData
Back to CheckyTheCheckMark's profile

Wow 8

CHCheckyTheCheckMark•Created April 20, 2020
Wow 8
1
0
5 views
View on Scratch

Instructions

This project modifies my 1 Line Challenge Ray Tracer: https://scratch.mit.edu/projects/382985473/ which has the same lighting. I added the two colour texture. The Sphere is coloured using Ray Tracer logic and Ambient, Diffuse (Lambertian) and Specular Lighting. The light source is left, above and in front of the sphere. A "Ray Tracer" traces rays from the viewer through each pixel on the screen and calculates which object it hits first in 3D space (ie. which object is closest). The pixel is coloured with the colour of that object. More advanced Ray Tracers add different types of lighting, shadows and reflections of other objects. They also include not just spheres (which have easier math) but other 3D objects. Ambient light is general background reflected light that even gets into dark places such as under a bed. Diffuse light (also known as Lambertian or matte) is stronger if light shines more "straight on" to a surface. Diffuse light is scattered in all directions and its intensity does not depend on where the viewer is. Specular reflected light produces the highlight on the sphere in the area where the light is reflected almost directly towards the viewer. This project implements Ambient, Diffuse and Specular light like my ray tracer project "Ray Tracer 3" except that that the rays there can strike more spheres: https://scratch.mit.edu/projects/381878751/ Another "1 Line Challenge" project. (over 3 years 8 months after the original challenge). A "1 Line Challenge project". See the "1 Line Challenge" rules in the original project. In "1 Line Challenge" projects, the colour of each pixel on the screen is calculated by one formula in the line "set pen color to …" 1 Line Challenge Studio: https://scratch.mit.edu/studios/2825709/ Scratch-Minion's favourite 1 Line Challenge projects: https://scratch.mit.edu/projects/126161130/ More favourite 1 Line Challenge projects: https://scratch.mit.edu/projects/163476084/

Description

credit @Scratch-Minion

Project Details

Project ID387097660
CreatedApril 20, 2020
Last ModifiedApril 20, 2020
SharedApril 20, 2020
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root