Topic: Discontinuous function plotting
I have been doing a graphing program for a school project and I have a question about the plotting algorithm. How does it graph discontinuous functions correctly? For example, a function abs(sin(x))/sin(x) consists of parallel line segments (see attachments) which vertices are not connected. But most of graphing programs (like MathCAD and Wolfram Mathematica) connect the vertices (which is wrong) and Graph doesn't (which is right). That's why I ask how the plotting algorithm works that such functions are plotted correctly