Hello! I do not shuffle at mathematics at all, but in my experiments I have come across the fact that I need to draw a circle on the outline with a line. For example, in the Imagick library for php, an object of class ImageDraw has a method line (x1, y1. X2. Y2). I do not ask for a finished implementation, I just need a formula, a piece of the algorithm, or which way to google)
1 answer
Algorithm Brezenhema same!
- Thank you) - nolka
- onedraw a circle pixel by pixel in the interpreter is the same slowly - sercxjo
- @sercxjo, I will say more, I have an interpreter that draws a circle embedded in the php interpreter: D - nolka
- @nolka, aren't there any regular tools for drawing a circle? - nitrocaster
- @Flammable, I want to control the resolution with which the circle is drawn. A circle can be drawn, for example, even so smooth, or you can draw it, for example, 10 lines, it will turn out not smoothed, but angular) - nolka
|