A very jank circle algorithm that overdraws many of the lines but mostly works.
This commit is contained in:
parent
d4b6c35120
commit
d916d1c383
5 changed files with 93 additions and 8 deletions
16
matrix.hpp
16
matrix.hpp
|
@ -108,4 +108,20 @@ namespace matrix {
|
|||
line(Point start, Point end);
|
||||
bool next();
|
||||
};
|
||||
|
||||
struct circle {
|
||||
Point center;
|
||||
int radius = 0;
|
||||
int xi = 0;
|
||||
int yi = 0;
|
||||
int m = 0;
|
||||
int step = 0;
|
||||
int x0;
|
||||
int x1;
|
||||
int y;
|
||||
|
||||
circle(Point center, int radius);
|
||||
void update();
|
||||
bool next();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue