4 ms·
I'm not sure I'm convinced, as finding the cosine does in fact find the linear distance from the camera plane to the intersection. This is, as far as I have see
by hunterloftis 12y ago
I'm not sure I'm convinced, as finding the cosine does in fact find the linear distance from the camera plane to the intersection. This is, as far as I have seen, the standard implementation, eg: http://www.permadi.com/tutorial/raycast/rayc8.html#FINDING http://www.permadi.com/tutorial/raycast/rayc8.html#FINDING DISTANCE TO WALLS
However, I would love to see your proposed solution demonstrated. Would you care to fork the raycaster and compute the results with an alternative method?
- pervycreeper 12y agoMy implementation above complies, but I can send you binaries if you need them. Be forewarned that I neglected to implement atmosphere. Here's a screenshot http://i.imgur.com/7LJocjS.jpg http://i.imgur.com/7LJocjS.jpg
- hunterloftis 12y agoI'm less interested in seeing binary output and more interested in understanding the principles behind what you're saying. The wikipedia page you mentioned: http://en.wikipedia.org/wiki/3D_projection#Diagram http://en.wikipedia.org/wiki/3D_projection#Diagram ...appears to be describing exactly how this example works, right down to the diagram: http://www.playfuljs.com/images/raycaster-distance.png http://www.playfuljs.com/images/raycaster-distance.png I'd be happy to update this article with an improved method once I understand it.
- Torn 12y agoI'd love to see an updated version and a 'before and after' shot