Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add light source #121

Open
vosmer opened this issue Dec 8, 2023 · 1 comment
Open

add light source #121

vosmer opened this issue Dec 8, 2023 · 1 comment

Comments

@vosmer
Copy link

vosmer commented Dec 8, 2023

There have to be light source feature to visualize 3d shapes. You cant get the sphere is the sphere if no light makes no shadow on the surface... and so on

@different55
Copy link

As a workaround, you could probably split a lot of the shapes up into shaded halves. Like, for a sphere, draw two hemispheres and have them match the rotation of your light source. Or for a cube, calculate for each side if it's facing toward or away from the light and swap colors based on that.

Doesn't work for everything, but that's because shading's kinda going against the grain of how Zdog works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants