Besonderhede van voorbeeld: -6878954753742675747

Metadata

Author: WikiMatrix

Data

English[en]
A very basic plot of a single, white-on-black anti-aliased point using that method can be done as follows: Define function PlotAntiAliasedPoint ( number x, number y ) For roundedx = floor ( x ) to ceil ( x ) do For roundedy = floor ( y ) to ceil ( y ) do percent_x = 1 - abs ( x - roundedx ) percent_y = 1 - abs ( y - roundedy ) percent = percent_x * percent_y DrawPixel ( coordinates roundedx, roundedy, color percent (range 0-1) ) This method is generally best suited for simple graphics, such as basic lines or curves, and applications that would otherwise have to convert absolute coordinates to pixel-constrained coordinates, such as 3-D graphics.
Spanish[es]
Una forma sencilla de graficar un pixel blanco-encima-negro con un método de filtro anti-aliased puede ser el siguete: Define function PlotAntiAliasedPoint ( number x, number y ) For roundedx = floor ( x ) to ceil ( x ) do For roundedy = floor ( y ) to ceil ( y ) do percent_x = 1 - abs ( x - roundedx ) percent_y = 1 - abs ( y - roundedy ) percent = percent_x * percent_y DrawPixel ( coordinates roundedx, roundedy, color percent (range 0-1) ) Este método suele ser más adecuado para gráficos simples, como líneas o curvas básicas y aplicaciones que de otro modo tendrían que convertir coordenadas absolutas en coordenadas con píxeles, como gráficos en 3-D.

History

Your action: