p[4] p[3] p[2] p[1] p[0]

Similar documents
Approximate Labeling via the Primal-Dual Schema

A rich discrete labeling scheme for line drawings of curved objects

Introduction to Seismology Spring 2008

GENERATING A PERSPECTIVE IMAGE FROM A PANORAMIC IMAGE BY THE SWUNG-TO-CYLINDER PROJECTION

Exponential Particle Swarm Optimization Approach for Improving Data Clustering

Reconfigurable Shape-Adaptive Template Matching Architectures

arxiv: v1 [cs.gr] 10 Apr 2015

Plot-to-track correlation in A-SMGCS using the target images from a Surface Movement Radar

Lecture Notes of Möbuis Transformation in Hyperbolic Plane

CMSC 425: Lecture 16 Motion Planning: Basic Concepts

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking

Implicit Representation of Molecular Surfaces

Orientation of the coordinate system

1. Inversions. A geometric construction relating points O, A and B looks as follows.

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0;

CSCI-4972/6963 Advanced Computer Graphics

Truth Trees. Truth Tree Fundamentals

An Event Display for ATLAS H8 Pixel Test Beam Data

To Do. Assignment Overview. Outline. Mesh Viewer (3.1) Mesh Connectivity (3.2) Advanced Computer Graphics (Spring 2013)

Documentation of mptrees.mp

Supplementary Material: Geometric Calibration of Micro-Lens-Based Light-Field Cameras using Line Features

The official electronic file of this thesis or dissertation is maintained by the University Libraries on behalf of The Graduate School at Stony Brook

4. Principles of Picture taking 4 hours

LAMC Junior Circle April 15, Constructing Triangles.

A Novel Validity Index for Determination of the Optimal Number of Clusters

Triangles. Learning Objectives. Pre-Activity

1 The Knuth-Morris-Pratt Algorithm

Directed Rectangle-Visibility Graphs have. Abstract. Visibility representations of graphs map vertices to sets in Euclidean space and

arxiv: v1 [cs.db] 13 Sep 2017

Year 11 GCSE Revision - Re-visit work

Constrained Empty-Rectangle Delaunay Graphs

特集 Road Border Recognition Using FIR Images and LIDAR Signal Processing

Detection and Recognition of Non-Occluded Objects using Signature Map

Social Network Analysis Based on BSP Clustering Algorithm

We P9 16 Eigenray Tracing in 3D Heterogeneous Media

The Happy Ending Problem

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.)

Chapter 8: Right Triangle Trigonometry

Trigonometric Functions

Back To LinkedLists 1. 3 public Node left; 4 public Node right; 6 public Node(int data, Node left, Node right) {

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0.

Control CPR: A Branch Height Reduction Optimization for EPIC Architectures

Skip Strips: Maintaining Triangle Strips for View-dependent Rendering

Colouring contact graphs of squares and rectilinear polygons de Berg, M.T.; Markovic, A.; Woeginger, G.

Vertex Unfoldings of Orthogonal Polyhedra: Positive, Negative, and Inconclusive Results

CleanUp: Improving Quadrilateral Finite Element Meshes

CS 428: Fall Introduction to. Geometric Transformations. Andrew Nealen, Rutgers, /15/2010 1

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python

Cross products. p 2 p. p p1 p2. p 1. Line segments The convex combination of two distinct points p1 ( x1, such that for some real number with 0 1,

Gray Codes for Reflectable Languages

Event Detection Using Local Binary Pattern Based Dynamic Textures

Using Augmented Measurements to Improve the Convergence of ICP

Interconnection Styles

Pipelined Multipliers for Reconfigurable Hardware

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman

We will then introduce the DT, discuss some of its fundamental properties and show how to compute a DT directly from a given set of points.

Optics Alignment. Abstract

Incremental Mining of Partial Periodic Patterns in Time-series Databases

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER

Total 100

MATH STUDENT BOOK. 12th Grade Unit 6

Type of document: Usebility Checklist

Run Time Environment. Implementing Object-Oriented Languages

Chapter 3: Graphics Output Primitives. OpenGL Line Functions. OpenGL Point Functions. Line Drawing Algorithms

Computing the Convex Hull of. W. Hochstattler, S. Kromberg, C. Moll

Test 1 - Answer Key Version A

Review. Type equivalence. Java declarations. Type equivalence. Declared vs. implicit subtyping. CS 412 Introduction to Compilers

Cross products Line segments The convex combination of two distinct points p

Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics

The Mathematics of Simple Ultrasonic 2-Dimensional Sensing

Lecture 02 Image Formation

Projector Calibration for 3D Scanning Using Virtual Target Images

Solutions to Tutorial 2 (Week 9)

A {k, n}-secret Sharing Scheme for Color Images

Chapter 2: Introduction to Maple V

Equality-Based Translation Validator for LLVM

Lesson 2: Right Triangle Trigonometry

C 2 C 3 C 1 M S. f e. e f (3,0) (0,1) (2,0) (-1,1) (1,0) (-1,0) (1,-1) (0,-1) (-2,0) (-3,0) (0,-2)

Exploring the Commonality in Feature Modeling Notations

Extracting Partition Statistics from Semistructured Data

Graph-Based vs Depth-Based Data Representation for Multiview Images

Rotation Invariant Spherical Harmonic Representation of 3D Shape Descriptors

CS2 Algorithms and Data Structures Note 8

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101

COT5405: GEOMETRIC ALGORITHMS

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract

Lazy Updates: An Efficient Technique to Continuously Monitoring Reverse knn

Machine Vision. Laboratory Exercise Name: Student ID: S

Robust Multithreaded Object Tracker through Occlusions for Spatial Augmented Reality

Hello neighbor: accurate object retrieval with k-reciprocal nearest neighbors

1. Introduction. 2. The Probable Stope Algorithm

Face and Facial Feature Tracking for Natural Human-Computer Interface

-z c = c T - c T B B-1 A 1 - c T B B-1 b. x B B -1 A 0 B -1 b. (a) (b) Figure 1. Simplex Tableau in Matrix Form

Chromaticity-matched Superimposition of Foreground Objects in Different Environments

PathRings. Manual. Version 1.0. Yongnan Zhu December 16,

Grouping of Patches in Progressive Radiosity

FUZZY WATERSHED FOR IMAGE SEGMENTATION

Self-Adaptive Parent to Mean-Centric Recombination for Real-Parameter Optimization

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework

Transcription:

CMSC 425 : Sring 208 Dave Mount and Roger Eastman Homework Due: Wed, Marh 28, :00m. Submit through ELMS as a df file. It an either be distilled from a tyeset doument or handwritten, sanned, and enhaned (using an a like CamSanner). Beware that sanned homeworks that are not learly legible may be returned to you, reuiring resanning and ossibly reoying. Avoid writing on both sides of the aer, sine the writing an bleed through to the other side. Late oliy: U to 6 hours late: 5% of the total; u to 24 hours late: 0%, and then 20% for eah additional 24 hours. Problem. Short answer uestions. Give two examles that might arise in a game imlemented in Unity, one where you want a rigid-body to have a ollider and one where you want a trigger. You have a triangle in the lane defined by three oints a, b, and (see Fig. ). You would like to interolate 5 eually-saed oints [0],..., [4] where [0] = a and [4] is the midoint between b and. For 0 i 4, give a formula that exresses [i] as an affine ombination of the oints a, b, and. (You may introdue additional temorary oints if you like, but exress them as affine ombinations of the original oints.) b a [4] [3] [2] [] [0] Figure : Problem : Affine ombinations. () In Unity, you want to rotate an objet through 90 degrees to our smoothly over a eriod of 4 seonds. In your Udate funtion, how many degrees of rotation should you aly? (Hint: Use the value of Time.deltaTime.) Problem 2. Your first assignment in your new job working for a game-engine omany is to design a funtion that determines whether a shere ollider and a asule ollider interset in 3-dimensional sae. We will walk through the stes to obtain the mathematial onditions behind this test and then derive a C# funtion to do it. The shere ollider has enter = ( x, y, z ) and radius r (see Fig. 2). It onsists of all the oints whose distane from is at most r. The asule ollider is given by three uantities: = ( x, y, z ) and = ( x, y, z ) are the endoints of the entral axis of the ollider and s is its radius. The ollider onsists of all the oints whose distane from the line segment

s r v l u t = t t () (d) Figure 2: Problem 2: Shere/Casule ollision. is at most s. Let us make the simlifying assumtions that,, and are all distint oints, and that does not line on the line assing through and. Define u to be the vetor direted from to (see Fig. 2), and define v to be the vetor direted from to. Note that these should not be normalized to unit length. For examle, u should eual the length of the segment. Using the oerations of affine and Eulidean geometry, exlain how to omute u and v from,, and. (Hint: If this seems easy, it is. We re just getting started.) Consider the infinite line l assing through and. Let t be the oint on l suh that the line segment t is erendiular to l (see Fig. 2() and (d)). (Note that t may generally lie outside the line segment, and this is fine for now.) Using the oerations affine geometry and Eulidean geometry, exlain how to omute the oint t. (Hint: The vetors u and v from art should ome in handy.) It is a fat (whih you do not need to rove) that if t lies within the line segment then it is the losest oint on this segment to. If not, the losest oint to is one of the endoints, or. () Exlain how to modify your solution to to determine the oint t on the line segment that is losest to. (Hint: Just exlain how to modify your solution to to ahieve this.) (d) Combining the results of the revious arts, resent a test (in mathematial notation) that determines whether the two olliders interset. (Note: The boundaries do not need to interset. If one ollider is omletely ontained within the other, they are still onsidered to interset.) (e) Present a C# funtion with the following signature that imlements your intersetion test: bool ShereCasuleCollide(Vetor3, float r, Vetor3, Vetor3, float s) You may make use of the basi math/geometry funtions that Unity rovides (e.g., Vetor3 methods or Mathf funtions), but you annot use more advaned funtions (e.g., 2

Unity s CasuleCollider lass methods). Exat syntati orretness is not essential, but your rogram should be lose to valid C# ode. Problem 3. Insired by Tiny Planet videos and similar games (see Fig. 3), you have deided to reate a game where a layer moves around the surfae of a shere. In order to imlement your idea, you will need to define a oordinate frame for the layer objet. u r f Figure 3: Problem 3: Tiny-lanet oordinate frame. () Let us assume that the shere is entered at a oint, and it has a radius of s units. The layer s frame will be entered at some oint that lies on the shere. In order to indiate the diretion in whih the layer is faing, a seond oint is given on the surfae of the shere (see Fig. 3). These two oints define a great irle on the shere. The layer is situated so that its vertial axis is aligned with the vetor from to, and its forward-looking vetor is direted tangent to the shere at oint along the smaller ar of the great irle ontaining and (see Fig. 3()). (Let us make the simlifying assumtion that and are not olar oosites from eah other, for otherwise there are infinitely many great irles through and.) The objetive of this roblem is to define an orthonormal oordinate frame for the layer objet. The origin of this frame is. The basis vetors are: u: u relative to the layer (along the ray from through ) f: forward relative to the layer (tangent to the great irle through and ) r: right relative to the layer (erendiular to both u and f) Exlain how to omute the above three basis vetors using the oerations of affine and Eulidean geometry. Be sure that the final vetors are normalized to unit length. Hint: Trigonometry and alulus are not needed to solve this roblem. This an all be done using the standard basi of Eulidean geometry (suh as affine ombinations, dot rodut, and ross rodut). It is easiest to omute these in the order u, then r, then f. 3

Present a C# funtion with the following signature that imlements your onstrution: void PlayerFrame(Vetor3, float s, Vetor3, Vetor3, out Vetor3 u, out Vetor3 f, out Vetor3 r) You may make use of the whatever standard math/geometry funtions that Unity rovides. Note: In your answers to arts and, state exliitly whether you are assuming a right-handed or left-handed world oordinate system. Standard math textbooks assume a right-handed system, meaning that ositive rotations are ounterlokwise and the rossrodut follows the right-hand rule. However, Unity uses a left-handed system, and this imlies that ositive rotations are lokwise and the ross-rodut follows the left-hand rule. For examle, see htts://dos.unity3d.om/sritreferene/vetor3.cross.html. Problem 4. Consider the series of shaes S 0, S,... shown in Fig. 4 below. With eah ste, eah line segment of length x is relaed by four segments eah of length x 2/4. Let S = lim i S i. S 0 S S 2 S 3... (0, 0) 2/4 Figure 4: Problem 4: Fratals and L-systems. Derive the fratal dimension of the boundary of S. You may exress your answer as the ratio of two logarithms. Derive an L-system to generate this shae. (For the sake of onsisteny, we reommend that you start in the lower-left orner of the unit suare and roeed ounterlokwise around the boundary.) In artiular, answer the following: (i) What are the values of the ste-size d and angle inrement δ? These values may hange from one shae to the next. If so, let d i and δ i denote the ste size and angle inrement for generating S i. Assume that the side length of S 0 is. (ii) What are the variables (symbols) V of your L-system? (iii) What is the start symbol (or start string), ω, for your system? (iv) What are the rodution rules, P? (Hint: Be sure that at the end of eah seuene, your urrent state is roerly oriented to start the next seuene.) (For guidane on solving this, see Marh 0 udate of Leture on fratals and L-systems. Problem 5. For your new game, you will be animating a model of a tower rane in 2-dimensional sae. The rane s arts are illustrated in Fig. 5. The struture sits on a base, whih we take to be the origin of the rane s oordinate system. 4

The vertial mast rises uwards H units to a oint where the oerator s booth sits. From here there is a horizontal jib uon whih slides a trolley at a distane of W units from the oerator. The hook is susended D units beneath the trolley. (Inreasing the value of D auses the hook to dro lower.) The referene (or bind) ose is suh that H 0 = 30, W 0 = 00, and D 0 = 70. There are four oordinate frames as shown in Fig. 5: the base, the oerator, () the trolley, and (d) the hook. W 0 = 00 00 oerator jib trolley b H 0 = 30 mast base hook D 0 = 70 a 20 d 40 Figure 5: Problem 5: Animating a tower rane. Following the naming onvention for the loal ose transformations (given in Leture 9) exress the following loal ose transformations a 3 3 homogeneous matries. (i) T [ d], whih translates oordinates in the hook frame to the trolley frame. (ii) T [b ], whih translates oordinates in the trolley frame to the oerator frame. (iii) T [a b], whih translates oordinates in the oerator frame to the base frame. (Hint: It may hel to reall the form of a translation matrix from Leture 6.) For examle, a oint loated 20 units below the hook would be reresented in the hook frame as [d] = (0, 20, ). Its oordinates with reset to the trolley would be [] = (0, 90, ). Thus, the transformation T [ d] should satisfy T [ d] 0 20 = 0 90 Show that by multilying these matries, we obtain a matrix T [a d] that mas oint into its oordinates with reset to the base frame. Verify your resulting matrix by showing that 00 T [a d] [d] = [a] = 40.. 5