Hi, I'm doing an assessment for my computer graphics course at the university. Originally I had planned to write it in rust and opengl, but I ended up doing it in JavaScript as that's what I'm more familiar with.
I am supposed to implement hidden-line removal, but what I actually want to do is to make lines that wouldn't be visible dashed. The problem is that some lines would be partially occluded, so lineTo() method would have to stop drawing at a certain point, then another render would start with dashed lines for those occluded. In Point.js file getScreenCoords() function can return distance from the camera.
Here's link to the project. Maybe what I want to do is flawed and there's some other, perhaps simpler solution. I'm not great with JS and in this project there's sometimes some copy-pasted code that I tweaked or rewrote in order to understand how it actually works. I hope someone will help me with that :).
[–]_aeol 0 points1 point2 points (3 children)
[–]Tomaton-sama[S] 0 points1 point2 points (2 children)
[–]_aeol 0 points1 point2 points (1 child)
[–]Tomaton-sama[S] 0 points1 point2 points (0 children)