Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
14,20 € Add to cart
Add to Wish List
Want cheaper?
ID number:469835
 
Author:
Evaluation:
Published: 14.03.2024.
Language: Latvian
Level: Secondary school
Literature: n/a
References: Not used
Time period viewed: 2021 - 2025 years
Extract

1. Darba uzdevums

Satur darba uzdevumu (jānoformē atbilstoši pasniedzēja prasībām)

• Balstoties uz praktiskās nodarbības laikā aplūkoto Brezenhema algoritma realizāciju, izveidot no vairākām taisnēm savus pēdējos 3 studenta apliecības numura skaitļus.

2. Programmas kods

Satur izstrādātās programmas kodu, jeb tās programmas daļu, kas tiek realizēta patstāvīgi (jānoformē atbilstoši pasniedzēja prasībām)

import numpy as np
import matplotlib.pyplot as plt
#vieninieku matrica = vieninieki(1) = balta krasa
#height,width,rgb | y,x,:
img = np.ones((600,1000,3))
def DrawLine(x1,y1,x2,y2):
dx = abs(x2-x1)
dy = abs(y2-y1)
if x1 xs=1
else:
xs=-1
if y1 ys=1
else:
ys=-1
x=x1
y=y1
p=2*dy-dx
if dx>dy:
p=2*dy-dx
while x!=x2:
x=x+xs
if p>0:
y=y+ys
p=p+2*dy-2*dx
else:
p=p+2*dy
img[y,x]= (1,0,0)…

Author's comment
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register