2019-07-02 15:35:57 +08:00
|
|
|
# px_circle
|
|
|
|
|
|
|
|
Returns points that can be used to draw a pixel-style circle.
|
|
|
|
|
|
|
|
**Since:** 2.0
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2019-07-04 14:46:40 +08:00
|
|
|
- `radius` : The circle radius. The value must be an integer.
|
2019-07-02 15:35:57 +08:00
|
|
|
- `filled` : Default to `false`. Set it `true` if you want a filled circle.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2020-01-28 17:51:20 +08:00
|
|
|
use <pixel/px_circle.scad>;
|
2019-07-02 15:35:57 +08:00
|
|
|
|
|
|
|
for(pt = px_circle(10)) {
|
|
|
|
translate(pt)
|
|
|
|
square(1, center = true);
|
|
|
|
}
|
|
|
|
|
|
|
|

|
|
|
|
|
2020-01-28 17:51:20 +08:00
|
|
|
use <pixel/px_circle.scad>;
|
2019-07-02 15:35:57 +08:00
|
|
|
|
|
|
|
for(pt = px_circle(10, filled = true)) {
|
|
|
|
translate(pt)
|
|
|
|
linear_extrude(1, scale = 0.5)
|
|
|
|
square(1, center = true);
|
|
|
|
}
|
|
|
|
|
|
|
|

|
|
|
|
|