Tickertape def tickertape(directory,string): for each frame to generate create an new canvas write the string on canvas slightly left of the previous frame.

Slides:



Advertisements
Similar presentations
Keys to Speed. Vocabulary Pixelation: The appearance of blockiness in an image after it has been enlarged. What had been a single pixel in the original.
Advertisements

CS2984: Introduction to Media Computation Drawing directly on images.
Def f(n): if (n == 0): return else: print(“*”) return f(n-1) f(3)
Python: Modifying Pictures Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
Movie of picture negatives # Pseudo Code def movieNeg(directory, pic): for each column of ‘pic’ across the entire width for each pixel from top of the.
HW 3: Problems 2&3. HW 3 Prob 2:Encipher encipher( S, n ) takes as input a string S and a non-negative integer n between 0 and 25. This function returns.
Main task -write me a program
Keyframing with the crop tool in the Canvas Panel.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
Persistence of Vision What makes movies work is yet another limitation of our visual system: Persistence of vision We do not see every change that happens.
Lecture 13 – range function, for…in loops COMPSCI 1 1 Principles of Programming.
Escape A sticky man adventure using TKINTER python module By: Channing Burgess.
COMPE 111 Introduction to Computer Engineering Programming in Python Atılım University
More Looping Structures
COMPSCI 101 Principles of Programming Lecture 27 - Using the Canvas widget to draw rows and columns of shapes.
Ohio Child Licensing and Quality System (OCLQS) ‘My Program Messages’ Guide.
Chapter 6: Modifying Pixels by Position. Chapter Learning Goals.
STRINGS CMSC 201 – Lab 3. Overview Objectives for today's lab:  Obtain experience using strings in Python, including looping over characters in strings.
EET 2259 Unit 7 Case Structures; Sequence Structures  Read Bishop, Sections 5.4 and 5.5.  Lab #7 and Homework #7 due next week.  Quiz #3 next week.
STEP 1: Accessing the Random Number function -Open your spreadsheet with the universe of facilities (If your list is in word, just cut and paste the list.
Computer Science 112 Fundamentals of Programming II Graphics Programming.
Computer Science 111 Fundamentals of Programming I Model/View/Controller and Data model design.
Georgia Institute of Technology Movies part 2 Barb Ericson Georgia Institute of Technology April 2006.
CPSC1301 Computer Science 1 Chapter 14 Creating and Modifying Movies part 2.
Python The tutorial
With Python.  One of the most useful abilities of programming is the ability to manipulate files.  Python’s operations for file management are relatively.
1 CS 177 Week 5 Recitation Slides Mirroring and copying images, Using for Loop, if statement, and range.
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Creating a picture in JES Use in the command window of JES (black background at bottom) to set the folder where the picture is to be saved >>> path = setMediaPath()
ITEC 109 Lecture 24 Advanced Effects. Advanced effects Review Basic effects –Loading / Displaying –Solid color pictures –Black/White –Sepia.
List comprehensions (and other shortcuts) UW CSE 160 Spring 2015.
Movies Barb Ericson Georgia Tech.
COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.01 Understand coordinate systems. (3%)
Last Week Modules Save functions to a file, e.g., filename.py The file filename.py is a module We can use the functions in filename.py by importing it.
Midterm Review Important control structures Functions Loops Conditionals Important things to review Binary Boolean operators (and, or, not) Libraries (import.
1 CS 177 Week 6 Recitation Slides Review for Midterm Exam.
EECS 110: Lec 9: Review for the Midterm Exam Aleksandar Kuzmanovic Northwestern University
1 Advanced Programming Examples Output. Show the exact output produced by the following code segment. char[,] pic = new char[6,6]; for (int i = 0; i
Modifications made to BlueBoard application are:  Create menu screen  Changed user interface.
Python: Working with pixels. Reminder: Conditionals if age < 18: showInformation(“Sorry, not allowed to vote yet.”) else: showInformation(“Please select.
1 CS 177 Week 7 Recitation Slides Modifying Sounds using Loops + Discussion of some Exam Questions.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
 Python for-statements can be treated the same as for-each loops in Java Syntax: for variable in listOrstring: body statements Example) x = "string"
PH2150 Scientific Computing Skills Control Structures in Python In general, statements are executed sequentially, top to bottom. There are many instances.
Find LCM Least Common Multiple of 3 and 5: List the Multiples of each number, The multiples of 3 are 3, 6, 9, 12, 15, 18,... etc The multiples of 5 are.
Web Design. How to link the robot How to turn on the robot Sec Getting Started What is python Programming in python How to move the robot How to.
Test 2 on Wed, 11/9 On image processing
Introduction to Python
Persistence of Vision What makes movies work is yet another limitation of our visual system: Persistence of vision We do not see every change that happens.
Arrays.
EECS 110: Lec 9: Review for the Midterm Exam
Picture Functions ppp =makePicture(pickAFile())
Lab 9 Intro to Robots.
List comprehensions (and other shortcuts) UW CSE 160 Winter 2016.
Introduction to Programming
List comprehensions (and other shortcuts) UW CSE 160 Winter 2017.

Let’s make a shape…. Move!
Test 2 on Wed, 11/9 On image processing
Gray Scale picture def pixBW(pixel): # given a pixel, change to BW
List comprehensions (and other shortcuts) UW CSE 160 Spring 2018.
Creating and Modifying Movies
Practice with loops! What is the output of each function below?
Introduction to Programming Using Python PART 2
Python Practice !!!.
functions: argument, return value
Python Basics with Jupyter Notebook
Introduction to Python
COMPUTING.
Challenge Guide Grade Code Type Slides
Presentation transcript:

Tickertape def tickertape(directory,string): for each frame to generate create an new canvas write the string on canvas slightly left of the previous frame get char string of frame number frame number starting with ‘0’ save the canvas

Tickertape def tickertape(directory,string): for num in range(1,100): #99 frames canvas = makeEmptyPicture(300,100) #Start at right, and move left addText(canvas,300-(num*10),50,string) # Now, write out the frame # Handle frame number numStr=str(num) if num < 10: seq = ‘0’+numStr else: seq = numStr writePictureTo(canvas,directory+ "/frame’+seq+".jpg") def tickertape(directory,string): for each frame to generate create an new canvas write the string on canvas slightly left of the previous frame get char string of frame number frame number starting with ‘0’ save the canvas

Making a tickertape - 2 def getCharNum(thisNum): if thisNum <10: return ‘0'+str(thisNum) else: return str(thisNum) def tickertape(directory,string): for num in range(1,100): #99 frames canvas = makeEmptyPicture(300,100) #Start at right, and move left addText(canvas,300-(num*10),50,string) writePictureTo(canvas,directory+"/frame0"+getCharNum(num)+".jpg")

LAB You want to capture the process of converting a picture to its negative by saving the picture each time a new column is converted into a sequence of picture frames Each time a new column of pixels is converted to negatives, you want to save it into a picture frame, numbered ‘framexxx.jpg’ where ‘xxx’ is a sequential number only your python program (not a screen shot) to

Movie of picture negatives def getCharNum(n): if n <10: return ’00’+str(n) elif n <100: return ‘0’+str(n) else return str(n) # Pseudo Code def movieNeg(directory, pic): for each column of the picture for the entire width for each pixel from top of the column to bottom convert a pixel to its negative save the picture into frameXXX.jpg

Movie of picture negatives def getCharNum(n): if n <10: return ’00’+str(n) elif n <100: return ‘0’+str(n) else return str(n) # Pseudo Code def movieNeg(directory, pic): for each column of the picture across the entire width for each pixel from top of the column to bottom convert a pixel to its negative save the picture into frameXXX.jpg

Movie of picture negatives # Pseudo Code def movieNeg(directory, pic): for each column of the picture across the entire width for each pixel from top of the column to bottom convert a pixel to its negative save the picture into frameXXX.jpg # Python Code def movieNeg(directory, pic):