University of Illinois at Chicago Electronic Visualization Laboratory (EVL) DarkBASIC Matrix Command Set CS 426 Chautauqua 7 October 2003 Copyright © Nicholas.

Slides:



Advertisements
Similar presentations
CSE 380 – Computer Game Programming Tile Based Graphics Legend of Zelda, by Nintendo, released 1987.
Advertisements

Working with Images and HTML
Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
MATRIX REPORTER HYPACK & DREDGEPACK Purpose of the MATRIX REPORTER To provide a quick report of progress in any dredging environment. To allow the.
Electronic visualization laboratory, university of illinois at chicago Camera Based Automatic Calibration for the Varrier™ System Jinghua Ge, Dan Sandin,
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
BY: T. KHAWLAH AL-MUTLAQ Excel Web App. Introduction to Spreadsheets 2 A spreadsheet is an electronic file used to organize related data and perform calculations.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) Image Based Rendering with Stable Frame Rates by Qu, et al. IEEE 2000 presentation.
1 Working with Web Graphics – About Web Graphics. File Formats. Image Resolution, Image Size – Creating Web Graphics. Getting Started, Paint Shop Pro 5.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 5 Applets and Graphics.
Alice: A Visual Introduction to Programming Chapter 1 Part 2.
Importing, Grouping, and Layers – Lesson 31 Importing, Grouping, and Layers Lesson 3.
Basic Rendering Techniques V Recognizing basic rendering techniques.
Guilford County Sci Vis V204.01
BITMAP & VECTOR GRAPHICS Art Fundamentals of Graphic Design.
Course Outline Lesson1 Getting Started with Adobe Photoshop CS5 Lesson 2 Understanding Photoshop Basics Lesson 3 Saving and Printing Images Lesson 4 Changing.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Creating a MagicInfo Pro Screen Template
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Computing Higher - Unit 1… Computer Systems 1 Higher Computing Unit 1 – Topic 1 Data Representation.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) Homicidal Goldfish: Bubbles Revenge CS 426 Assignment 5 – Prototype 21 October.
Computer Graphics Texture Mapping
F-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
CHAPTER 13 Creating a Workbook Part 1. Learning Objectives Understand spreadsheets and Excel Enter data in cells Edit cell content Work with columns and.
Computer Science 101 Images in Web Pages. Image Files Two common formats, GIF and JPEG GIF images are more flexible for use as icons JPEG images are sharper.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Alice: A Visual Introduction to Programming Chapter 1 Part 2.
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
Z-Town Technical Details Ben Trivett, Drew Switzer, Cameron Jett, Ryan Southard Department of Computer Science and Engineering The Ohio State University.
Resetting Student PreTests. Within the MyNursingLab Study Plans, pretests can be taken only one time by the student.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 2 Graphics Programming with C++ and the Dark GDK Library Starting.
Chapter 6 Working with Patterns and Brushes. Objectives Use the Move command Create a pattern Design a repeating pattern Use the Pattern Options panel.
Game Programming Step-01 how to create a camera to render the game
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Chapter 5 Working with Multiple Worksheets and Workbooks
Design Studies 20 ‘Show Off’ Project How to make a computer monitor In Google Sketchup By: Liam Jack.
Unit A Getting Started with Adobe Photoshop. What is Adobe Photoshop? Adobe Photoshop delivers powerful, industry-standard image-editing tools for designers.
The Northern Lights: Demonstrations. Programmability Overview A major aspect of our project is programmability- it is an interactive display medium, the.
CS324e - Elements of Graphics and Visualization Fractals and 3D Landscapes.
Lesson 6 Formatting Cells and Ranges. Objectives:  Insert and delete cells  Manually format cell contents  Copy cell formatting with the Format Painter.
Adding Text and Navigation to the Home Page – Lesson 51 Adding Text and Navigation to the Home Page Lesson 5.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
1 Layer up to keep warm… A short tutorial on the usage of layers.
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
Adobe Photoshop T.Ahlam Algharasi. Adobe Photoshop Adobe Photoshop is a seriously powerful photo and image edit ( treating and manipulation, compositing,
ADOBE INDESIGN CS3 Chapter 4 WORKING WITH FRAMES.
Learning the Basics of ArcMap 3.3 Updated 4/27/2010 Using Arc/View pt. 1 1.
Tips & Tricks Tips & Tricks Christian Danuser, Nordic User Meeting 2012.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Electronic visualization laboratory, university of illinois at chicago Sort Last Parallel Rendering for Viewing Extremely Large Data Sets on Tile Displays.
Computer Graphics Lecture 3 Computer Graphics Hardware
Bee-Bot.
Week 7 - Monday CS361.
Composition.
2D Graphics and Animations in Unity 3D
Flash Interface, Commands and Functions
Adobe Illustrator CS5 – Illustrated
Word Lesson 6 Working with Graphics
Images in Binary.
Graph Paper Programming
Tutorial 6 Creating Dynamic Pages
Exercise 30 - Skills Fireworks uses layers to help you organize and work with the various elements in your drawings. You can us layers to keep objects.
UMBC Graphics for Games
Computer Graphics 4Practical Lesson
Game Programming Algorithms and Techniques
Positioning Boxes Using CSS
Presentation transcript:

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) DarkBASIC Matrix Command Set CS 426 Chautauqua 7 October 2003 Copyright © Nicholas Schwarz, Jia Yin, Litian Zhang

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) What does the matrix command set do? Provides for the creation and manipulation of 3D world space matrix landscapes. A matrix serves as the floor or terrain of a DarkBASIC program. A matrix is grid of polygons similar to a checkerboard. Each square of the matrix is called a tile. Each tile can be painted with a texture, and each of its four corners can be raised or lowered to create hills and valleys.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) What does the matrix command set do? Can set its position, transparency, and representation, and shift the matrix in different directions. The image to the right is of a textured matrix with tile corners of random height.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? A Simple Matrix Use the MAKE MATRIX command to create a matrix. –MAKE MATRIX MatrixNumber, Width, Depth, XTiles, ZTiles –MatrixNumber: number by which a DarkBASIC program refers to the matrix –Width: width of the matrix in pixels –Depth: depth of the matrix in pixels –XTiles: number of tiles in the x direction –ZTiles: number of tiles in the z direction

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? A Simple Matrix Changes made to a matrix are not visible until the UPDATE MATRIX command is issued. –UPDATE MATRIX MatrixNumber –MatrixNumber: number of the matrix to update

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? A Simple Matrix MAKE MATRIX 1, 1000, 1000, 10, 10 UPDATE MATRIX 1

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Adding a Texture A texture can be added to each tile of the matrix by using the PREPARE MATRIX TEXTURE command in combination with the LOAD IMAGE command from the Image Command Set. –PREPARE MATRIX TEXTURE MatrixNumber, ImageNumber, Across, Down –MatrixNumber: matrix to add a texture to –ImageNumber: image to use as a texture –Across: number of tiles across within the texture –Down: number of tiles in the texture from top to bottom

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Adding a Texture LOAD IMAGE "marble.bmp", 1 PREPARE MATRIX TEXTURE 1, 1, 1, 1

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Multiple Textures DarkBASIC only allows a single image to serve as a matrix's texture. In order to use multiple textures with a matrix, the image file must be tiled. Texture tiles are numbered starting at 1 from left to right, then top to bottom.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Multiple Textures Load a texture with multiple tiles by specifying the number of tiles across and down with the Across and Down parameters of the PREPARE MATRIX TEXTURE command. PREPARE MATRIX TEXTURE 1, 1, 2, 2 See Demo Program for a better understanding.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Multiple Textures Specify which texture to paint a particular tile with using the SET MATRIX TILE command. –SET MATRIX TILE MatrixNumber, TileX, TileZ, TextureTileNumber –MatrixNumber: specifies the matrix to paint –TileX, TileZ: identify the tile on the matrix to paint –TextureTileNumber: refers to the tile in the texture image to use. –As an example, to set matrix tile (5,5) with tile 2 from the texture image use the command SET MATRIX TILE 1, 5, 5, 2. See Demo Program for a better understanding.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Manipulating Tile Height The easiest way to manipulate the height of tiles in a matrix is by using the RANDOMIZE MATRIX command. This command sets each tile in the matrix to a random height between 0 and a specified maximum. RANDOMIZE MATRIX MatrixNumber, MaximumHeight –MatrixNumber: matrix to manipulate –MaximumHeight: maximum height in pixels a tile may be

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Manipulating Tile Height RANDOMIZE MATRIX 1, 50

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Manipulating Tile Height Another way to manipulate the height of tiles in a matrix is by using the SET MATRIX HEIGHT command. –SET MATRIX HEIGHT MatrixNumber, TileX, TileZ, Height –MatrixNumber: the matrix to manipulate –TileX, TileZ: identify the tile to manipulate –Height: specifies the tile's height This command sets the height of an individual tile to a specified amount. See the demo program for an example of how this works.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Wireframe Mode SET MATRIX WIREFRAME ON displays a wireframe representation of the specified matrix. SET MATRIX WIREFRAME OFF displays the textured representation of the specified matrix, assuming the matrix has been assigned a texture.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Matrix Transparency GHOST MATRIX ON makes the matrix semi- transparent. GHOST MATRIX OFF makes the matrix opaque. The effects of these commands are only visible when the textured representation of the matrix is visible.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Shifting the Matrix DarkBASIC’s shifting commands allow the programmer to shift the entire contents of the matrix one tile up, down, left, and right. The height and tile data that represent the matrix are wrapped around to allow continuous shifting. Shifting the entire matrix can be used to emulate movement. Instead of moving the camera position, fix the camera position and perform shift operations. Shifting up emulates forward movement. Shifting down emulates backwards movement. Shifting left emulates movement to the right. Shifting right emulates movement to the left.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Shifting the Matrix The shift commands are: –SHIFT MATRIX DOWN MatrixNumber –SHIFT MATRIX LEFT MatrixNumber –SHIFT MATRIX RIGHT MatrixNumber –SHIFT MATRIX UP MatrixNumber Shifting is better understood when we view the demo.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Matrix Position The command POSITION MATRIX places the matrix at a position in 3D space. –POSITION MATRIX MatrixNumber, X, Y, Z –POSITION MATRIX MatrixNumber, Vector DarkBASIC provides commands for getting the current position of a matrix. –float = MATRIX POSITION X(MatrixNumber) –float = 'MATRIX POSITION Y(MatrixNumber) –float = MATRIX POSITION Z(MatrixNumber) –SET VECTOR3 TO MATRIX POSITION Vector, MatrixNumber

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) How to use the matrix command set? Deleting a Matrix The command DELETE MATRIX MatrixNumber deletes the matrix specified by MatrixNumber.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) Other Matrix Commands Other commands exists within the DarkBASIC Matrix Command Set, but they are beyond the scope of this presentation… Please, feel free to try them yourself.

University of Illinois at Chicago Electronic Visualization Laboratory (EVL) Demonstration program Run the demo