1 Media Software Design DIG 3134 Fall 2012 Lecture 15: Graphics J. Michael Moshell University of Central Florida Original image* by Moshell et al.

Slides:



Advertisements
Similar presentations
XP New Perspectives on Microsoft Office Word 2003 Tutorial 7 1 Microsoft Office Word 2003 Tutorial 7 – Collaborating With Others and Creating Web Pages.
Advertisements

Accessing electronic journals from off- campus This causes lots of headaches, but dont despair, heres how to do it! (Please note – this presentation is.
Word Processing and Desktop Publishing Software
Grade 6 Hopewell Elementary You will read each slide, then try to think of the answer. When you think you know the answer, click ONCE on the mouse.
PHP Sample Application Simple graphics and database.
GALILEO Tutorial EBSCOhost Search Basics Press a key or click the mouse button to advance to the next slide. July 2008.
Ground Truth for Behavior Detection Week 3 Video 1.
James Tam Introduction To CPSC 231 James Tam Administrative (James Tam) Contact Information -Office: ICT 707 -
1 Computing for Todays Lecture 11(1) Yumei Huo Fall 2006.
Multiple Tiers in Action
S OFTWARE AND M ULTIMEDIA Chapter 6 Created by S. Cox.
1 Media Software Design DIG 3134 Fall 2011 Lecture 18: Excel, PDF J. Michael Moshell University of Central Florida Original image* by Moshell et al.
Software and Multimedia
1.Learning the Terms Learning the TermsLearning the Terms 2.Accessing the Internet from a PC Accessing the Internet from a PCAccessing the Internet from.
Websites with Weebly are easy!. Easy Website Creation with Weebly Making your library media center’s web presence current and effective Holly Frilot,
1 Information Management DIG 3563 – Lecture 8 Content Management Systems: Plugins for Wordpress J. Michael Moshell University of Central Florida Original.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Printed by WEB PAGES Denny Stefani Ramírez and Mónica I. Adorno Josefina Barceló School, Guaynabo, Puerto Rico The purpose of this.
1 DIG 3134 – Lecture 3 Forms Michael Moshell University of Central Florida Media Software Design.
TC2-Computer Literacy Mr. Sencer February 8, 2010.
How Well Do You Know Copyright? Connie Murphy Hylton High School Library 2008.
SYST Web Development 2 SYST Web Development 2 Course Overview and Introduction Client/Server Overview.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
MULTIMEDIA What is Multimedia? The word MULTIMEDIA is made up from two words, MULTI meaning more than one and MEDIA meaning a way of displaying or passing.
Lakeland Click arrow to advance show. Click on the “A” under “Listed By Name.” (“A” for Academic Search Database)
Software. Records Fields Each record is made up of fields – categories of information. The fields here are Name, Surname, Address, Telephone and Date.
1 DIG 3134 – Lecture 11: Two Dimensional Arrays And Dynamic Controls AND CONSTANTS Michael Moshell University of Central Florida Internet Software Design.
1 Basic Perl CGI Programming. 2 Issues How and when your program is invoked. Generating Response –HTTP Headers –HTML (or whatever document type you want)
Teachers Discovering Computers Integrating Technology and Digital Media in the Classroom 5 th Edition Let’s Review Lesson 2! Who Wants to Be a Computer.
14. Uploading Files to MySQL Database. M. Udin Harun Al Rasyid, S.Kom, Ph.D Desain dan.
1 DIG 3134 Lecture 5: Functions Michael Moshell University of Central Florida Media Software Design.
1 DIG 3134 Lecture 7: Designing and Debugging Programs Michael Moshell University of Central Florida Media Software Design.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
1 Information Management: Lecture 1.5: Team Workshop DIG 3563 Fall 2013 J. Michael Moshell University of Central Florida Original image* by Moshell et.
CIT 590 Intro to Programming Files etc. Announcements From HW5 onwards (HW5, HW6,…) You can work alone. You can pick your own partner. You can also stick.
1 DIG Lecture 2 (Game) The Acey-Deucey Game Michael Moshell University of Central Florida Media Software Design.
1 Information Management DIG 3563 – Lecture 14 Data Formats J. Michael Moshell University of Central Florida Original image* by Moshell et al. Imagery.
Productivity Programs What is the use of a Word Processing, Desktop Publishing and Spreadsheet programs? What is the use of a Database and Presentation.
1 DIG 3134 Lecture 9. Dynamic HTML Controls Michael Moshell University of Central Florida Media Software Design.
1 DIG 3134 – Lecture 14 MySQL and PHP Play Together Michael Moshell University of Central Florida Media Software Design.
Looking After Your Laptop By: Young Taek, Regina and Dimitri.
Mark Dixon 1 9 – Case Study. Mark Dixon 2 Session Aims and Objectives Aims –To give an overview of the development of a web-page from initial idea to.
Image #1 Getting Started
GALILEO Tutorial ProQuest Search Basics Press a key or click the mouse button to advance to the next slide. July 2008.
1 2/22/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Images and placing pages on the server.
1 DIG 3134 Lecture 6: Maintaining State Michael Moshell University of Central Florida Media Software Design.
October 17,  Should be done twice a week  Fun For All  No Content  Easy For All  Word Formations (Vocabulary/Spelling words)  Number Formation.
Notes Test #2 will be held one week from this Thursday Check to see if you have a Vision account –Launch Netscape –Point & Click to location and type vision.
Digital Media Lecture 0: It’s all just bits! Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Matthew Baillie, Luke Day THE INTERNET. HISTORY OF THE INTERNET J.C.R. Licklider authored a series of memos concerning theoretical network structures.
CIT 590 Intro to Programming Files etc. Agenda Files Try catch except A module to read html off a remote website (only works sometimes)
LO: We’re learning to outline a program using Pseudo Code.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
1 DIG 3134 Lecture 8: Reading and Writing Text Files Michael Moshell University of Central Florida Media Software Design.
CIT 590 Intro to Programming Lecture 6. Vote in the doodle poll so we can use some fancy algorithm to pair you up You.
PHP and SQL Server: Connection IST 210: Organization of Data IST2101.
What is Plagiarism, and how can I avoid it?. Plagiarism is using another person’s work or ideas without giving credit. Plagiarism also includes:  turning.
[Charts| Generating Graphic| Creating Graphic]
Starting a Project: Research Tips
Chapter 4: Scalable Vector Graphics (SVG)
Media Software Design DIG 3134 Fall 2012 Lecture 15a: Cowpies
Software and Multimedia
Software and Multimedia
Chapter 27 WWW and HTTP.
Information Technologies Anselm Spoerri PhD (MIT)
In Class Programming: Credit card payment
Starting a Project: Research Tips
Word Processing and Desktop Publishing Software
Image #1 Getting Started
Citations: Citing Sources within Your Academic Work
Presentation transcript:

1 Media Software Design DIG 3134 Fall 2012 Lecture 15: Graphics J. Michael Moshell University of Central Florida Original image* by Moshell et al.

-2 - Excerpt from DA Text PHP Graphics The Coordinate System (for our example) x  800 y 600

-3 - PHP Graphics Motivation: the RSL Pickup Graph

-4 - Excerpt from DA Text PHP Graphics The Coordinate System (for our example) x  0800 y yup = 600-y (so y=600 – yup)

-5 - Excerpt from DA Text PHP Graphics: The GD Library Basic example: $Imagewidth=800;$Imageheight=600; $image=imagecreate($Imagewidth, $Imageheight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorGreen=imagecolorallocate($image, 0, 200, 0); // x1 y1 x2 y2 imageline($image, 300, 200, 300,550, $coloGreen); imagepng($image,'graphout.png'); imagedestroy($image); print ' ';

-6 - Excerpt from DA Text PHP Graphics: The GD Library Basic example: $Imagewidth=800;$Imageheight=600; $image=imagecreate($Imagewidth, $Imageheight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorGreen=imagecolorallocate($image, 0, 200, 0); // x1 y1 x2 y2 imageline($image, 300, 200, 300,550, $coloGreen); imagepng($image,'graphout.png'); imagedestroy($image); print ' '; Do this to force the browser not to cache the png file. If it is cached, you won't see changes... frustrating.

-7 - Excerpt from DA Text PHP Graphics: The GD Library Basic example: $Imagewidth=800;$Imageheight=600; $image=imagecreate($Imagewidth, $Imageheight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorGreen=imagecolorallocate($image, 0, 200, 0); // x1 y1 x2 y2 imageline($image, 300, 200, 300,550, $coloGreen); imagepng($image,'graphout.png'); imagedestroy($image); print ' '; Do this to force the browser not to cache the png file. If it is cached, you won't see changes... frustrating. NOTE: This sometimes sorta works

-8 - markbeam.com Project 4: Cowpies Examine the cowpie1 prototype. Behavior Code Examine the Requirements for Project 4

-9 - Project 4: Cowpies Requirements BEGIN with a database task: ** remember previous moves and replay them. So we will BEGIN (next week) with a tutorial database example called "address book" to build up your database skills, and also give you some code to steal / merge with cowpie1.php. Let's look at one more graphical issue. Can we write our.png DIRECTLY to browser?

-10 - Excerpt from DA Text PHP Graphics: The GD Library Basic example: $Imagewidth=800;$Imageheight=600; $image=imagecreate($Imagewidth, $Imageheight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorGreen=imagecolorallocate($image, 0, 200, 0); // x1 y1 x2 y2 imageline($image, 300, 200, 300,550, $coloGreen); imagepng($image,'graphout.png'); imagedestroy($image); print ' '; Can we write the image DIRECTLY to the browser, instead of into a file? Docs say we can, so we try it.

-11 - Excerpt from DA Text PHP Graphics: The GD Library Basic example: $Imagewidth=800;$Imageheight=600; $image=imagecreate($Imagewidth, $Imageheight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorGreen=imagecolorallocate($image, 0, 200, 0); // x1 y1 x2 y2 imageline($image, 300, 200, 300,550, $coloGreen); imagepng($image); imagedestroy($image); print ' '; Can we write the image DIRECTLY to the browser, instead of into a file? Docs say we can, so we try it.

-12 - GD direct to screen: ?? What's this? Any ideas?

-13 - GD direct to screen: ?? What's this? Any ideas? View Source

-14 - GD direct to screen: ?? Once you've announced to the browser that HTML is coming, it expects HTML. So what if we tried a different header?

-15 - So what if we tried a different header? PHP has a header function. We modify cowpie1.php: function htmlheader() { print " "; } //main program $angle=$_POST['angle'];$velocity=$_POST['velocity']; if (!$angle) htmlheader();//need HTML first time for form else header('Content-type: image/png');

-16 - Result: yes, it "works"... but now it's not an HTML form any more, so there are no inputs (controls). It's not interactive. So... we're better off embedding png in html.

-17 - FOR THURSDAY: The usual shoot-out model: GET your Group's BEST GAME ready to play! If you need help with Project 3, come SEE ME.