College of Computer and Information Science, Northeastern UniversityOctober 5, 20151 CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006.

Slides:



Advertisements
Similar presentations
Morphing & Warping 2D Morphing Involves 2 steps 1.Image warping “get features to line up” 2.Cross-dissolve “mix colors” (fade-in/fadeout transition)
Advertisements

ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 5 Ravi Ramamoorthi
Morphing. What is Morphing Morphing is an effect that can be used to manipulate still images or to create interesting animated transformations. Morphing.
College of Computer and Information Science, Northeastern UniversityMay 20, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007 Lecture.
2-D IMAGE MORPHING.
2D preobrazba (morphing). 2D preobrazba dekle-tiger.
Feature-Based Image Metamorphosis Thaddeus Beier Shawn Neely SIGGRAPH 1992.
So far we’ve done… Dynamics and chaos Thermodynamics, statistical mechanics, entropy, information Computation, Turing machines, halting problem Evolution,
L systems (Aristid Lindenmayer)
L-systems Presented by Luv Kohli COMP258 October 30, 2002 Images copyright © 1992 D. Fowler, P. Prusinkiewicz, and J. Battjes.
1Ellen L. Walker Recognizing Objects in Computer Images Ellen L. Walker Mathematical Sciences Dept Hiram College Hiram, OH 44234
The infinitely complex… Fractals Jennifer Chubb Dean’s Seminar November 14, 2006 Sides available at
Procedural Modeling L-Systems Procedural Terrain Procedural Behavior Based on the slides from Spring 2007.
Simulating Trees with Fractals and L-Systems Eric M. Upchurch CS 579.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 6: Image Compositing, Morphing Ravi Ramamoorthi
Image Morphing : Rendering and Image Processing Alexei Efros.
CS39N The Beauty and Joy of Computing Lecture #11 Recursion III It has been a challenge to power electronic components implanted within a body.
CS4395: Computer Graphics 1 Fractals Mohan Sridharan Based on slides created by Edward Angel.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
College of Computer and Information Science, Northeastern UniversityAugust 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007.
Approaches To Infinity. Fractals Self Similarity – They appear the same at every scale, no matter how much enlarged.
"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line."(Mandelbrot,
IlliDOL: A Framework for Exploration of L- Systems in Three Dimensions Vilas Dhar Math 198 Spring 2003.
Image Morphing CSC320: Introduction to Visual Computing
Computing & Information Sciences Kansas State University Lecture 37 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 37 of 42 Monday, 28 April.
Structured Chaos: Using Mata and Stata to Draw Fractals
COMP 175: Computer Graphics March 24, 2015
MORPHING Presentation By: SWARUP DEEPIKA JAGMOHAN Date: 22 OCT 2002 Course: COMPUTER GRAPHICS.
Fractals for Kids Clint Sprott Department of Physics University of Wisconsin - Madison Presented at the Chaos and Complex Systems Seminar in Madison, Wisconsin.
CS 551/651 Advanced Computer Graphics Warping and Morphing Spring 2002.
Geometric Operations and Morphing.
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
College of Computer and Information Science, Northeastern UniversityOctober 13, CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lecture.
The Artificial Life of Plants Przemyslaw Prusinkiewicz, Mark Hammel, Radom´ır Mˇech Department of Computer Science University of Calgary Calgary, Alberta,
Ch 9 Infinity page 1CSC 367 Fractals (9.2) Self similar curves appear identical at every level of detail often created by recursively drawing lines.
Examining the World of Fractals. Myles Akeem Singleton Central Illinois Chapter National BDPA Technology Conference 2006 Los-Angeles, CA.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
L-Systems Lindenmayer Systems Prusinkiewicz and Lindenmayer
Lindenmayer systems Martijn van den Heuvel May 26th, May 26th, 2011.
L-system and SVG 2D SVG Tree 2002/10/16.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative.
How to Draw a Tree L-Systems in Computer Graphics Steven Janke.
1 10/27/ :26 UML Simplicity in Complexity. 2 10/27/ :26 UML Rewriting Systems Classic Example: Koch 1905 Initiator Generator.
WORKSHOP “Fractal patterns…” Morahalom, May, 2009 Fractal patterns in geology, and their application in mathematical modelling of reservoir properties.
FRACTAL DIMENSION. DIMENSION Point 0 Line 1 Plane 2 Space 3.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Fractals! Bullock Math Academy March 22, 2014 Brian Shelburne
Experimenting with Grammars to Generate L-Systems October 29, 2007
Multimedia Programming 10: Image Morphing
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
College of Computer and Information Science, Northeastern UniversityMarch 8, CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lecture 34.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Grafika Komputer dan Visualisasi Disusun oleh : Silvester Dian Handy Permana, S.T., M.T.I. Fakultas Telematika, Universitas Trilogi Pertemuan 12 : Realisme.
Computer Science We use computers, but the focus is on applied problem solving. One of my favorite videos talks about computer sciencecomputer science.
Experimenting with Grammars to Generate L-Systems – in JFLAP March 31, 2011 Prof. Susan Rodger Computer Science Dept.
Grammars, L-Systems Jim Whitehead UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/Spring14/01 23 Apr 2014.
Image warping/morphing Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/3/15 with slides by Richard Szeliski, Steve Seitz and Alexei Efros.
Image Morphing © Zooface Many slides from Alexei Efros, Berkeley.
2D preobrazba (morphing)
CS1315: Introduction to Media Computation
Prof. Harriet Fell Spring 2009 Lecture 34 – March 25, 2009
Advanced Computer Graphics
ATCM 3310 Procedural Animation
CS5310 Graduate Computer Graphics
Feature-Based Warping
Feature-Based Warping
Prof. Susan Rodger Computer Science Dept
Presentation transcript:

College of Computer and Information Science, Northeastern UniversityOctober 5, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006 Lecture 9 – March 27, 2006

College of Computer and Information Science, Northeastern UniversityOctober 5, Today’s Topics Fractals Morphing Two Towers > Disk 4 > Visual Effects > Weka Digital

College of Computer and Information Science, Northeastern UniversityOctober 5, Fractal The term fractal was coined in 1975 by Benoît Mandelbrot, from the Latin fractus, meaning "broken" or "fractured". (colloquial) a shape that is recursively constructed or self-similar, that is, a shape that appears similar at all scales of magnification. (mathematics) a geometric object that has a Hausdorff dimension greater than its topological dimension.

College of Computer and Information Science, Northeastern UniversityOctober 5, Mandelbrot Set Mandelbrotset, rendered with Evercat's program.Evercat

College of Computer and Information Science, Northeastern UniversityOctober 5, Mandelbrot Set

College of Computer and Information Science, Northeastern UniversityOctober 5, What is the Mandelbrot Set? We start with a quadratic function on the complex numbers. The Mandelbrot Set is the set of complex c such that

College of Computer and Information Science, Northeastern UniversityOctober 5, Example

College of Computer and Information Science, Northeastern UniversityOctober 5, (Filled-in) Julia Sets The Julia Set of f c is the set of points with 'chaotic' behavior under iteration. The filled-in Julia set (or Prisoner Set), is the set of all z whos orbits do not tend towards infinity. The "normal" Julia set is the boundary of the filled-in Julia set. c = – 1c = –.5 +.5ic = – 5 +.5i

College of Computer and Information Science, Northeastern UniversityOctober 5, Julia Sets and the Mandelbrot Set Some Julia sets are connected others are not. The Mandelbrot set is the set of c   for which the Julia set of f c (z) = z 2 + c is connected. Map of 121 Julia sets in position over the Mandelbrot set (wikipedia)

College of Computer and Information Science, Northeastern UniversityOctober 5, A fractal is formed when pulling apart two glue-covered acrylic sheets.

College of Computer and Information Science, Northeastern UniversityOctober 5, Fractal Form of a Romanesco Broccoli photo by Jon Sullivan

College of Computer and Information Science, Northeastern UniversityOctober 5, L-Systems An L-system or Lindenmayer system, after Aristid Lindenmayer (1925–1989), is a formal grammar (a set of rules and symbols) most famously used to model the growth processes of plant development, though able to model the morphology of a variety of organisms.L-system or Lindenmayer system L-systems can also be used to generate self- similar fractals such as iterated function systems.

College of Computer and Information Science, Northeastern UniversityOctober 5, L-System References Przemyslaw Prusinkiewicz & Aristid Lindenmayer, “The Algorithmic Beauty of Plants,” Springer,

College of Computer and Information Science, Northeastern UniversityOctober 5, L-System Grammar G = {V, S, ω, P}, where  V (the alphabet) is a set of variables  S is a set of constant symbols  ω (start, axiom or initiator) is a string of symbols from V defining the initial state of the system  P is a set of rules or productions defining the way variables can be replaced with combinations of constants and other variables. A production consists of two strings - the predecessor and the successor.

College of Computer and Information Science, Northeastern UniversityOctober 5, L-System Examples Koch curve (from wikipedia) A variant which uses only right-angles.  variables : F  constants : + −  start : F  rules : (F → F+F−F−F+F) Here, F means "draw forward", + means "turn left 90°", and - means "turn right 90°" (see turtle graphics).turtle graphics

Turtle Graphics class Turtle { double angle;// direction of turtle motion in degrees double X;// current x position double Y;// current y position double step;// step size of turtle motion boolean pen;// true if the pen is down public void forward(Graphics g) // moves turtle forward distance step in direction angle public void turn(double ang) // sets angle = angle + ang; public void penDown(), public void penUp() // set pen to true or false }

College of Computer and Information Science, Northeastern UniversityOctober 5, My L-System Data Files Koch Triangle Form// title 4// number of levels to iterate 90// angle to turn F// starting shape F:F+F-F-F+F// a rule F F+F-F-F+F F+F-F-F+F+F+F-F-F+F-F+F-F-F+F- F+F-F-F+F+F+F-F-F+F Go to Eclipse

College of Computer and Information Science, Northeastern UniversityOctober 5, More Variables Dragon When drawing, treat L and R just like F L L:L+R+ R:-L-R LL+R+L+R+ + -L-R + L+R+ + -L-R L+R+ - -L-R +

College of Computer and Information Science, Northeastern UniversityOctober 5, A Different Angle Sierpinski Gasket 6 60 R L:R+L+R R:L-R-L R L-R-L R+L+R- L-R-L -R+L+R

College of Computer and Information Science, Northeastern UniversityOctober 5, Moving with Pen Up Islands and Lakes 2 90 F+F+F+F F:F+f-FF+F+FF+Ff+FF-f+FF-F-FF-Ff-FFF f:ffffff// f means move forward with the pen up F+F+F+F next slide F+f-FF+F+FF+Ff+FF-f+FF-F-FF-Ff-FFF

College of Computer and Information Science, Northeastern UniversityOctober 5, Islands and Lakes One Side of the Box F+f-FF+F+FF+Ff+FF-f+FF-F-FF-Ff-FFF

College of Computer and Information Science, Northeastern UniversityOctober 5, FF-[-F+F+F]+[+F-F-F] Using a Stack to Make Trees Tree1 [ push the turtle state onto the stack 4 ] pop the turtle state from the stack 22.5 F F:FF-[-F+F+F]+[+F-F-F] and I add leaves here

Stochastic L-Systems seed: 2454 // different seeds for different trees derivation length: 3 axiom: F F--> F[+F]F[-F]F : 1/3 F--> F[+F]F : 1/3 F--> F[-F]F : 1/3

College of Computer and Information Science, Northeastern UniversityOctober 5, D Turtle Rotations Heading, Left, or, Up vector tell turtle direction. +(θ) Turn left by angle θ◦ around the U axis. −(θ) Turn right by angle θ◦ around the U axis. &(θ) Pitch down by angle θ◦ around the L axis. ∧ (θ) Pitch up by angle θ◦ around the L axis. \(θ) Rollleftbyangleθ◦ around the H axis. /(θ) Roll right by angle θ◦ around the H axis. | Turn around 180◦ around the U Roll the turtle around the H axis so that H and U lie in a common vertical plane with U closest to up.

College of Computer and Information Science, Northeastern UniversityOctober 5, A Mint A model of a member of the mint family that exhibits a basipetal flowering sequence.

College of Computer and Information Science, Northeastern UniversityOctober 5, Time for a Break

College of Computer and Information Science, Northeastern UniversityOctober 5, Morphing History Morphing is turning one image into another through a seamless transition. Early films used cross-fading picture of one actor or object to another. In 1985, "Cry" by Fodley and Crème, parts of an image fade gradually to make a smother transition."Cry" by Fodley and Crème Early-1990s computer techniques distorted one image as it faded into another.  Mark corresponding points and vectors on the "before" and "after" images used in the morph.  E.g. key points on the faces, such as the countour of the nose or location of an eye  Michael Jackson’s “Black or White” Michael Jackson’s “Black or White” »

College of Computer and Information Science, Northeastern UniversityOctober 5, Morphing History 1992 Gryphon Software's “Morph” became available for Apple Macintosh. For high-end use, “Elastic Reality” (based on Morph Plus) became the de facto system of choice for films and earned two Academy Awards in 1996 for Scientific and Technical Achievement. Today many programs can automatically morph images that correspond closely enough with relatively little instruction from the user. Now morphing is used to do cross-fading.

College of Computer and Information Science, Northeastern UniversityOctober 5, Harriet George Harriet…

College of Computer and Information Science, Northeastern UniversityOctober 5, Feature Based Image Metamorphosis Feature Based Image Metamorphosis Thaddeus Beier and Shawn Neely 1992 The morph process consists  warping two images so that they have the same "shape"  cross dissolving the resulting images cross-dissolving is simple warping an image is hard

College of Computer and Information Science, Northeastern UniversityOctober 5, Harriet & Mandrill Harriet 276x293Mandrill 256x256

College of Computer and Information Science, Northeastern UniversityOctober 5, Warping an Image There are two ways to warp an image:  forward mapping - scan through source image pixel by pixel, and copy them to the appropriate place in the destination image. some pixels in the destination might not get painted, and would have to be interpolated.  reverse mapping - go through the destination image pixel by pixel, and sample the correct pixel(s) from the source image. every pixel in the destination image gets set to something appropriate.

College of Computer and Information Science, Northeastern UniversityOctober 5, Forward Mapping Source Image HSHS WSWS Destination Image HDHD WDWD (x, y) (0, 0)

College of Computer and Information Science, Northeastern UniversityOctober 5, Forward Mapping Harriet  Mandrill

College of Computer and Information Science, Northeastern UniversityOctober 5, Forward Mapping Mandrill  Harriet

College of Computer and Information Science, Northeastern UniversityOctober 5, Inverse Mapping Source Image HSHS WSWS Destination Image HDHD WDWD (x, y) (0, 0)

College of Computer and Information Science, Northeastern UniversityOctober 5, Inverse Mapping Mandrill  Harriet

College of Computer and Information Science, Northeastern UniversityOctober 5, Inverse Mapping Harriet  Mandrill

College of Computer and Information Science, Northeastern UniversityOctober 5, (harrietINV + mandrill)/2

College of Computer and Information Science, Northeastern UniversityOctober 5, Matching Points

College of Computer and Information Science, Northeastern UniversityOctober 5, Matching Ponts Rectangular Transforms

College of Computer and Information Science, Northeastern UniversityOctober 5, Halfway Blend Image1 Image2 (1-t)Image1 + (t)Image2 T =.5

College of Computer and Information Science, Northeastern UniversityOctober 5, Caricatures Extreme Blends

College of Computer and Information Science, Northeastern UniversityOctober 5, Harriet & Mandrill Matching Eyes Harriet 276x293Mandrill 256x256 Match the endpoints of a line in the source with the endpoints of a line in the destination. SP SQ DPDQ

College of Computer and Information Science, Northeastern UniversityOctober 5, Line Pair Map The line pair map takes the source image to an image the same size as the destinations and take the line segment in the source to the line segment in the destination. DP DQ u v X=(x,y) SP SQ u v X=(x,y )

College of Computer and Information Science, Northeastern UniversityOctober 5, Finding u and v u is the proportion of the distance from DP to DQ. v is the distance to travel in the perpendicular direction. DP DQ u v X=(x,y)

College of Computer and Information Science, Northeastern UniversityOctober 5, linePairMap.m header % linePairMap.m % Scale image Source to one size DW, DH with line pair mapping function Dest = forwardMap(Source, DW, DH, SP, SQ, DP, DQ); % Source is the source image % DW is the destination width % DH is the destination height % SP, SQ are endpoints of a line segment in the Source [y, x] % DP, DQ are endpoints of a line segment in the Dest [y, x]

College of Computer and Information Science, Northeastern UniversityOctober 5, linePairMap.m body Dest = zeros(DH, DW,3); % rows x columns x RGB SW = length(Source(1,:,1)); % source width SH = length(Source(:,1,1)); % source height for y= 1:DH for x = 1:DW u = ([x,y]-DP)*(DQ-DP)'/((DQ-DP)*(DQ-DP)'); v = ([x,y]-DP)*perp(DQ-DP)'/norm(DQ-DP); SourcePoint = SP+u*(SQ-SP) + v*perp(SQ-SP)/norm(SQ-SP); SourcePoint = max([1,1],min([SW,SH], SourcePoint)); Dest(y,x,:)=Source(round(SourcePoint(2)),round(SourcePoint(1)),:); end;

College of Computer and Information Science, Northeastern UniversityOctober 5, linePairMap.m extras % display the image figure, image(Dest/255,'CDataMapping','scaled'); axis equal; title('line pair map'); xlim([1,DW]); ylim([1,DH]); function Vperp = perp(V) Vperp = [V(2), - V(1)];

College of Computer and Information Science, Northeastern UniversityOctober 5, Line Pair Map

College of Computer and Information Science, Northeastern UniversityOctober 5, Line Pair Blend

College of Computer and Information Science, Northeastern UniversityOctober 5, Line Pair Map 2

College of Computer and Information Science, Northeastern UniversityOctober 5, Line Pair Blend 2

College of Computer and Information Science, Northeastern UniversityOctober 5, Weighted Blends

College of Computer and Information Science, Northeastern UniversityOctober 5, Multiple Line Pairs Find Xi' for the ith pair of lines. Di = Xi' – X Use a weighted average of the Di. Weight is determined by the distance from X to the line. length = length of the line dist is the distance from the pixel to the line a, b, and p are used to change the relative effect of the lines. Add average displacement to X to determine X‘.

College of Computer and Information Science, Northeastern UniversityOctober 5, Let’s Morph FantaMorph