Untitled

mail@pastecode.io avatar
unknown
python
9 days ago
642 B
4
Indexable
Never
import numpy as np
import cv2
import math

x = 600
y = 800
tuval=np.zeros((x,y),dtype=np.uint8)

orta_nokta=int(y/2),int(x/2)
cv2.circle(tuval,orta_nokta,2,(250,0,0),-1)

height=int(x/2)
width=int(y/2)
a=40
kok_uc=math.sqrt(3)
color = (250, 0, 0)

koordinatlar = [(width+a,height), (width+int(a/2),int(height-(a*kok_uc/2))),
                (width-int(a/2),int(height-(a*kok_uc/2))), (width-a,height),
                (width-int(a/2),int(height+(a*kok_uc/2))), (width+int(a/2),int(height+(a*kok_uc/2)))]
for i in range(6):
    cv2.circle(tuval, koordinatlar[i], 3, color, -1)

cv2.imshow("deneme2",tuval)
cv2.waitKey()
Leave a Comment