expanding Eliza ArtLab - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

expanding Eliza ArtLab

Description:

expanding Eliza. ArtLab. announcements. Rhian Davies will give a guest lecture on ... Guest lecture by Holger Hoos in Nov on computer music ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 23
Provided by: ugrad2
Category:

less

Transcript and Presenter's Notes

Title: expanding Eliza ArtLab


1
expanding ElizaArtLab
2
announcements
  • Rhian Davies will give a guest lecture on
    linguistics on Monday
  • Guest lecture by Holger Hoos in Nov on computer
    music
  • No class on Friday Nov 2(start on your projects!)
  • Project descriptions on the web, will discuss in
    next class
  • Interest in a powerpoint lab?

3
expanding Eliza
  • the Eliza program responds to a keyword, if
    present, and otherwise gives a generic response
  • how could the program do better?

4
features of other Eliza programs
  • use one of multiple possible responses to each
    keyword, chosen randomly
  • direct the conversation back to a keyword that
    appeared earlier in the program
  • respond to sentences like I _____ you with Why
    do you ______ me?
  • create a lexicon of word associations, to move
    on to new subjects from old

5
computer modeling of language
  • represent the underlying structure of text noun
    phrases, verb phrases, determiners, and so on
  • The bored students slept soundly
  • The is a determiner
  • bored students is a noun phrase
  • slept soundly is a verb phrase
  • the Eliza program could parse the text to obtain
    the underlying structure and respond accordingly

6
ArtLab
  • in this lab, you can generate art using methods
    provided in a java graphics package

7
drawing components in ArtLab
  • line
  • rectangle
  • oval
  • arc

8
drawing a square on grid paper
9
how to specify a rectangle?
10
how to specify a rectangle?
  • use top left and bottom right corners

11
how to specify a rectangle?
  • use top left corner, width, height

12
(0,0)
x
y
(7,7)
top left corner (2,1) width 3 height 2
13
the ArtLab drawing panel
(0,0)
x
drawing panel
(749,549)
y
14
specifying a rectangle in ArtLab
  • //red rectangle newShape ( ) x 550 y
    400 width 200 height 100 g2.setPaint
    (red) g2.fillRect (x, y, width, height)

15
how to specify a line?
16
how to specify a line?
  • end point 1 (2,1)
  • end point 2 (5,5)

17
specifying a line in ArtLab
  • //orange line newShape ( ) x1 500 y1
    200 x2 700 y2 10 g2.setPaint (orange)
    g2.drawLine (x1, y1, x2, y2)

18
how to specify a circle?
19
how to specify a circle?
  • center (4,5)
  • width 2

20
specifying an oval
  • center (3,2)
  • width 4
  • height 1

21
specifying an oval in ArtLab
  • //magenta oval newShape ( ) x 300 y
    200 width 120 height 75 g2.setPaint
    (magenta)

22
more fun with ArtLab
  • animation!
  • adding randomness (possible project)
Write a Comment
User Comments (0)
About PowerShow.com