You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will take a while and may never come to fruition, but I think a lot of asy users from the TeX world would appreciate it.
The current experimental "render=0" mode has some pretty severe limitations regarding things like hidden surface removal and drawing surfaces without a visible mesh / grid. Realistically, I don't think we can have surfaces with complex shading and no grid. This seems to be a limitation of pdf viewers: just because two shaded regions should, mathematically, meet exactly, does not mean they will -- many pdf viewers will leave a gap between them. And I don't think we're going to find a decent workaround for this.
However, many users are interested in drawing 3d diagrams without complex shading. Some examples:
The basic approach to such a rendering mode would involve
dividing paths and surfaces into pieces based on where they intersect other surfaces (or self-intersect)
dividing surfaces based on where they are tangent to the camera ray (i.e., where they "fold" back behind themselves)
further dividing paths and surfaces wherever, in the 2d projection, they cross behind the boundaries of surfaces that are closer to the camera
apply a painter's algorithm to draw (resp shade) 2d projections of the resulting paths (resp surface regions) starting with the most distant
The purpose of the first three steps is to ensure that, whenever two path or surface regions have their projections intersect, it is well defined which of them is closer to the camera. (The ordering can be reconstructed by finding an intersection point in the 2d projection, turning that point into a ray from the camera, finding points in which that ray intersects each of the two objects, and calculating which of the two objects has an intersection point closer to the camera.)
Even a fairly minimal version of this would require a number of more basic features, such as the following:
Intersecting two surfaces to produce a path3, as well as a path in the coordinate space (whatever that means) of each surface.
A way determine the boundary of a surface. Ideally, this could be deduced from the bezier patches if we added data about neighboring patches. The neighbor data will also come in handy when we need to determine, for instance, whether the surface has any self-intersections.
This plan may never come to fruition, but I wanted to at least set it down. I'm reasonably confident that, given enough time and determination, it could be done. I'm less confident that the surface-surface intersections could be computed in a reasonable amount of time, but I think it could be worth trying.
The text was updated successfully, but these errors were encountered:
This will take a while and may never come to fruition, but I think a lot of asy users from the TeX world would appreciate it.
The current experimental "render=0" mode has some pretty severe limitations regarding things like hidden surface removal and drawing surfaces without a visible mesh / grid. Realistically, I don't think we can have surfaces with complex shading and no grid. This seems to be a limitation of pdf viewers: just because two shaded regions should, mathematically, meet exactly, does not mean they will -- many pdf viewers will leave a gap between them. And I don't think we're going to find a decent workaround for this.
However, many users are interested in drawing 3d diagrams without complex shading. Some examples:
from https://tex.stackexchange.com/a/135438/484 (author: me):
from https://tex.stackexchange.com/a/736786/484 (author: Theo H):
The basic approach to such a rendering mode would involve
The purpose of the first three steps is to ensure that, whenever two path or surface regions have their projections intersect, it is well defined which of them is closer to the camera. (The ordering can be reconstructed by finding an intersection point in the 2d projection, turning that point into a ray from the camera, finding points in which that ray intersects each of the two objects, and calculating which of the two objects has an intersection point closer to the camera.)
Even a fairly minimal version of this would require a number of more basic features, such as the following:
patch
with apath3
can be extremely slow #6.)This plan may never come to fruition, but I wanted to at least set it down. I'm reasonably confident that, given enough time and determination, it could be done. I'm less confident that the surface-surface intersections could be computed in a reasonable amount of time, but I think it could be worth trying.
The text was updated successfully, but these errors were encountered: