kopia lustrzana https://github.com/villares/sketch-a-day
readme 112
rodzic
a05d98b404
commit
3b4e975acf
10
README.md
10
README.md
|
|
@ -15,7 +15,15 @@ If you enjoy this, make a small donation [here](https://www.paypal.com/cgi-bin/w
|
|||
Hexagons!
|
||||
|
||||
```python
|
||||
|
||||
def hexagon(x, y, r):
|
||||
with pushMatrix():
|
||||
translate(x, y)
|
||||
beginShape()
|
||||
for i in range(6):
|
||||
vx = cos(i * TWO_PI /6) * r
|
||||
vy = sin(i * TWO_PI /6) * r
|
||||
vertex(vx, vy)
|
||||
endShape(CLOSE)
|
||||
```
|
||||
|
||||
----
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue