p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
Both spheres are at same distance from the camera, however the sphere on the right appears to be further behind. This is probably due to an optical illusion caused by low intensity of pointLight() falling on the right sphere. Therefore using ortho() wouldn't make the spheres appear at the same distance from the camera and it causes a glitch in the example.
@davepagurek please advise if this is the right way to fix this issue!
Most appropriate sub-area of p5.js?
p5.js version
1.9.1
Web browser and version
Google Chrome 121.0.6167.139 (Official Build) (64-bit)
Operating system
Ubuntu 22.04 LTS
Steps to reproduce this
Steps:
lightFalloff()
- https://p5js.org/reference/#/p5/lightFalloffSnippet:
Removing
otho()
from the example code above seems to rectify the issue : https://editor.p5js.org/sudhanshuv1/sketches/n6Ue-T109 The output of this example should render 2 spheres :Both spheres are at same distance from the camera, however the sphere on the right appears to be further behind. This is probably due to an optical illusion caused by low intensity of
pointLight()
falling on the right sphere. Therefore usingortho()
wouldn't make the spheres appear at the same distance from the camera and it causes a glitch in the example. @davepagurek please advise if this is the right way to fix this issue!