GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Graphics Exam

John Ratzinger Computer Science Englisch 52 Karten

Graphics Exam

Karten in diesem Stapel (52)

  1. 1Design Principlesbalance
    proximity/alignment
    unity
    emphasis
    rhythm
    UPBEAR!
  2. 2Principles: Balancesymmetrical - formal
    asymmetrical - informal
  3. 3Principles: Proximity / AlignmentGrouping (content, shape, or color)
    Lining up (lead eye)
    Grids (formalised division)
  4. 4Principles: UnitySimilar Elements
    (shapes, colors, typography)
  5. 5Principles: EmphasisParts more important than others
    Focal point (seen first)
    Contrast
  6. 6Principles: RhythmMovement through repetition
    Progressive rhythm
    (moves through a design in equal amounts)
    Alternating rhythm
    (creates a visual flow through a design to direct the viewer)
  7. 7GIMP: Scale Imagepdb.gimp_image_scale
    (image0,
    posterW, posterH)
  8. 8GIMP: Create Layerlayer0 = gimp.Layer
    (poster, "Layer 0",
    posterW, posterH,
    RGBA_IMAGE, 100, NORMAL_MODE)
  9. 9GIMP: Add Layerposter.add_layer
    (layer0, 0)
  10. 10GIMP: Image Translate (move)layer0.translate
    (0, 0)
  11. 11Turtle Drawing Steps1. Make pen object
    2. Set pen features
    colour, width, etc
    3. Draw
    using the functions
  12. 12Drawing Steps: 1. Make pen objectPen()
  13. 13Drawing Steps: 2. Set pen features colour, width, etcpen.color("red")
    pen.speed(0)
    pen.width(1)
  14. 14Drawing Steps: 3. Draw using the functionspen.forward(100)
    pen.left(45)
  15. 15GraphWincanvas = GraphWin
    (“Turtle Graphics”,
    500, 500);
    canvas.setBackground(“blue”)
    w, h =
    canvas.getWidth(),
    canvas.getHeight()
    t = Turtle();
  16. 16Treedef tree(n, l):
    if n==0 or l<2 :
    return
    pen.forward(l)
    pen.left(45)
    tree(n-1, l/2)
    pen.right(90)
    tree(n-1, l/2)
    pen.left(45)
    pen.backward(l)
  17. 17Kochdef koch(n, l):
    if l<2 or n==0:
    pen.forward(l)
    koch(n-1,l/3)
    pen.left(60)
    koch(n-1,l/3)
    pen.right(120)
    koch(n-1,l/3)
    pen.left(60)
    koch(n-1,l/3);
  18. 18High Level Filter: Blurdef blur(self, radius = 3):
    how = ImageFilter.GaussianBlur(radius)
    newImage =
    self.image.filter(how)
    return newImage
  19. 19High Level Filter: Embossdef emboss(self):
    how = ImageFilter.EMBOSS
    newImage = self.image.filter(how)
    return newImage
  20. 20PROCESSING Create An Empty ImagenewImage = Image.new("RGB", (self.width, self.height))
  21. 21Image Package Importsfrom PIL import Image, ImageFilter
  22. 22Turtle Attributeslocation
    orientation
    pen
  23. 23Pen Attributescolour
    width
    up/down
  24. 24Turtle For Loopfor i in range(4):
    pen.forward(l)
    pen.left(90)
  25. 25Turtle Screenscreen = Screen()
    screen.bgcolor("black")
  26. 26GIMP: Import GIMP packagefrom gimpfu import *
  27. 27GIMP: Create poster functiondef poster(file0, file1...)
  28. 28PIL open imageim = Image.open(“lena.jpg”)
  29. 29Define a TKinter ClassDefine a TKinter Class
  30. 30Tkinter 1 import tinterfrom tkinter import *
    from tkinter.ttk import *
  31. 31Tkinter 2 create tkinterroot = Tk()
    root.geometry(“500x500+300+300”)
    root.title(‘Money Converter”)
  32. 32Tkinter 3 make listsrates= [0.5, 0.6, 0.7, 0.8]
    names = [“Euro”, “Yen”, “Ruble”, “USD”]
  33. 33Tkinter 4 cleardef onClear():
    euroStr.set(“”)
    yenStr.set(“”)
    rubleStr.set(“”)
    usdStr.set(“”)
  34. 34Tkinter 5 convert function 1 get the value from euroStr, make it a floateuroValue = float(euroStr.get())
  35. 35Tkinter 5 convert function 2 find the selections from the 2 drop down menusfromIndex = currencies.index(euroDropDownStr.get())
    toIndex = currencies.index(dollarDropDownStr.get())
    rate = rates[toIndex]/rates[fromIndex]
  36. 36Tkinter 5 convert function 3 equationdollarValue = euroValue * rate
  37. 37Tkinter 5 convert function 4 see the amount of dollars in dollarStrdollarStr.set(str(dollarValue))
  38. 38Tkinter 6 make interface 1 labeleuroLabel = Label(root, text = "From")
    euroLabel.grid(row = 1, column = 0)
  39. 39Tkinter 6 make interface 2 dropdowneuroDropDownStr = StringVar()
    euroDropDown = OptionMenu(root, euroDropDownStr, currencies[0], *currencies)
    euroDropDown.grid(row = 1, column = 1)
  40. 40Tkinter 6 make interface 3 entryeuroStr = StringVar()
    euroEntry = Entry(root, textvariable = euroStr)
    euroEntry.grid(row = 1, column = 2)
  41. 41Tkinter 7 buttons clearclearButton = Button(root, text="Clear", command = onClearF)
    clearButton.grid(row = 3, column = 0)
  42. 42Tkinter 7 buttons convertconvertButton = Button(root, text="Convert", command = onConvertF)
    convertButton.grid(row = 3, column = 1)
  43. 43Tkinter 8 endroot.mainloop()
  44. 44Low Level Image Processing 1. import Packageimport math
    from PIL import Image, ImageFilter
  45. 45Low Level Image Processing 2. create classclass ImageProcessor:
    def __init__(self, w, h):
    self.name = "noname.jpg"
    self.width = w
    self.height = h
    self.image = Image.new("RGB", (self.width, self.height))
  46. 46Low Level Image Processing 3. invert function 1. definedef invert(self, red, green, blue):
    newImage = Image.new
    ("RGB", (self.width, self.height))
  47. 47Low Level Image Processing 3. invert function 2. traverse pixelsfor i in range(self.width):
    for j in range(self.height):
    r, g, b = self.image.getpixel((i, j))
  48. 48Low Level Image Processing 3. invert function 3. change colourif red:
    newR = 255 - r
    else:
    newR = r
    newR = 255 - r
  49. 49Low Level Image Processing 4. scale function 1. definedef scale(self, scaleR, scaleG, scaleB):
    newImage = Image.new
    ("RGB", (self.width, self.height))
  50. 50Low Level Image Processing 4. scale function 2. traverse pixelsfor i in range(self.width):
    for j in range(self.height):
    r, g, b = self.image.getpixel((i, j))
  51. 51Low Level Image Processing 4. scale function 3. changenewR = int(r * scaleR)
    newG = int(g * scaleG)
    newB = int(b * scaleB)
  52. 52Low Level Image Processing 4. scale function 4. new imagenewImage.putpixel((i, j), (newR, newG, newB))

Informationen

Beschreibung
Computer Science Karteikarten am Graphics Exam, erstellt von John Ratzinger am 11/12/2018.
Erstellt von
John Ratzinger
Aufrufe
1
Verlauf
  • Erstellt von John Ratzinger · 9 Dez 2018
  • Kopiert von John Ratzinger · 9 Dez 2018
  • Kopiert von John Ratzinger · 11 Dez 2018
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck