Graphics with TikZ. Eastern Illinois University. From the SelectedWorks of Andrew Mertz
|
|
- Alan Boone
- 6 years ago
- Views:
Transcription
1 Eastern Illinois University From the SelectedWorks of Andrew Mertz 2007 Graphics with TikZ Andrew Mertz, Eastern Illinois University William Slough, Eastern Illinois University Available at:
2 The PracTEX Journal, 2007, No. 1 Article revision 2007/2/11 Graphics with TikZ Andrew Mertz and William Slough Address Abstract aemertz@eiu.edu, waslough@eiu.edu Department of Mathematics and Computer Science Eastern Illinois University 600 Lincoln Avenue Charleston, IL Beautiful and expressive documents often require beautiful and expressive graphics. PGF and its front-end TikZ walk a thin line between power, portability and usability, giving a TEX-like approach to graphics. While PGF and TikZ are extensively documented, first-time users may prefer learning about these packages using a collection of graduated examples. The examples presented here cover a wide spectrum of use and provide a starting point for exploration. 1 Introduction Users of TEX and LATEX intending to create and use graphics within their documents have a multitude of choices. For example, the UK TEX FAQ [1] lists a half dozen systems in its response to Drawing with TEX. One of these systems is PGF and its associated front-end, TikZ [4]. All of these systems have similar goals: namely, to provide a language-based approach which allows for the creation of graphics which blend well with TEX and LATEX documents. This approach stands in contrast to the use of an external drawing program, whose output is subsequently included in the document using the technique of graphics inclusion. PGF provides a collection of low-level graphics primitives whereas TikZ is a high-level user interface. Our intent is to provide an overview of the capabilities of TikZ and to convey a sense of both its power and relative simplicity. The examples used here have been developed with Version 1.0 of TikZ.
3 2 The name of the game Users of TEX are accustomed to acronyms; both PGF and TikZ follow in this tradition. PGF refers to Portable Graphics Format. In a tip of the hat to the recursive acronym GNU (i.e., GNU s not UNIX), TikZ stands for TikZ ist kein Zeichenprogramm, a reminder that TikZ is not an interactive drawing program. 3 Getting started TikZ supports both plain TEX and LATEX input formats and is capable of producing PDF, PostScript, and SVG outputs. However, we limit our discussion to one choice: LATEX input, with PDF output, processed by pdflatex. TikZ provides a one-step approach to adding graphics to a LATEX document. TikZ commands which describe the desired graphics are simply intermingled with the text. Processing the input source yields the PDF output. Figure 1 illustrates the layout required for a document which contains TikZgenerated graphics. Of central interest is the tikzpicture environment, which is used to specify one graphic. Within the preamble, the tikz package must be specified, along with optional PGF-based libraries. Exactly which additional libraries are needed will depend on the type of graphics being produced. The two PGF libraries shown here allow for a variety of arrowheads and snakes, a class of wavy lines. Commands which describe the desired graphic appear within a tikzpicture environment. In the simplest case, these commands describe paths consisting of straight line segments joining points in the plane. For more complex graphics, other primitive graphics objects can appear; e.g., rectangles, circles, arcs, text, grids, and so forth. Figures 2 and 3 illustrate how a diamond can be obtained, using the draw command to cause a pen to form a closed path joining the four points (1, 0), (0, 1), ( 1, 0), and (0, 1), specified with familiar Cartesian coordinates. The syntax used to specify this path is very similar to that used by MetaPost [2]. Unlike MetaPost, TikZ uses one centimeter as the default unit of measure, so the four points used in this example lie on the x and y axes, one centimeter from the origin. 2
4 \documentclass[11pt]{article}... \usepackage{tikz} % Optional PGF libraries \usepackage{pgflibraryarrows} \usepackage{pgflibrarysnakes}... \begin{document}... \begin{tikzpicture} \end{document} Figure 1: Layout of a TikZ-based document. \begin{tikzpicture} \draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle; Figure 2: Drawing a diamond with a closed path. Figure 3: Results produced by Figure 2. 3
5 \begin{tikzpicture} \draw[step=0.25cm,color=gray] (-1,-1) grid (1,1); \draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle; Figure 4: Adding a grid. Figure 5: Results produced by Figure 4. In the process of developing and debugging graphics, it can be helpful to include a background grid. Figure 4 expands on the example of Figure 2 by adding a draw command to cause a grid to appear: \draw[step=0.25cm,color=gray] (-1,-1) grid (1,1); Here, the grid is specified by providing two diagonally opposing points: ( 1, 1) and (1, 1). The two options supplied give a step size for the grid lines and a specification for the color of the grid lines, using the xcolor package [3]. 4 Specifying points and paths in TikZ Two key ideas used in TikZ are points and paths. Both of these ideas were used in the diamond examples. Much more is possible, however. For example, points can be specified in any of the following ways: Cartesian coordinates Polar coordinates Named points Relative points 4
6 As previously noted, the Cartesian coordinate (a, b) refers to the point a centimeters in the x-direction and b centimeters in the y-direction. A point in polar coordinates requires an angle α, in degrees, and distance from the origin, r. Unlike Cartesian coordinates, the distance does not have a default dimensional unit, so one must be supplied. The syntax for a point specified in polar coordinates is (α : rim), where dim is a dimensional unit such as cm, pt, in, or any other TEX-based unit. Other than syntax and the required dimensional unit, this follows usual mathematical usage. See Figure 6. y α r (α : rim) x Figure 6: Polar coordinates in TikZ. It is sometimes convenient to refer to a point by name, especially when this point occurs in multiple \draw commands. The command: \path (a,b) coordinate (P); assigns to P the Cartesian coordinate (a, b). In a similar way, \path (α:rim) coordinate (Q); assigns to Q the polar coordinate with angle α and radius r. Figure 7 illustrates the use of named coordinates and several other interesting capabilities of TikZ. First, infix-style arithmetic is used to help define the points of the pentagon by using multiples of 72 degrees. This feature is made possible by the calc package [5], which is automatically included by TikZ. Second, the \draw command specifies five line segments, demonstrating how the drawing pen can be moved by omitting the -- operator. 5
7 \begin{tikzpicture} % Define the points of a regular pentagon \path (0,0) coordinate (origin); \path (0:1cm) coordinate (P0); \path (1*72:1cm) coordinate (P1); \path (2*72:1cm) coordinate (P2); \path (3*72:1cm) coordinate (P3); \path (4*72:1cm) coordinate (P4); % Draw the edges of the pentagon \draw (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- cycle; % Add "spokes" \draw (origin) -- (P0) (origin) -- (P1) (origin) -- (P2) (origin) -- (P3) (origin) -- (P4); Figure 7: Using named coordinates. Figure 8: Results produced by Figure 7. 6
8 The concept of the current point plays an important role when multiple actions are involved. For example, suppose two line segments are drawn joining points P and Q along with Q and R: \draw (P) -- (Q) -- (R); Viewed as a sequence of actions, the drawing pen begins at P, is moved to Q, drawing a first line segment, and from there is moved to R, yielding a second line segment. As the pen moves through these two segments, the current point changes: it is initially at P, then becomes Q and finally becomes R. A relative point may be defined by providing offsets in each of the horizontal and vertical directions. If P is a given point and x and y are two offsets, a new point Q may be defined using a ++ prefix, as follows: \path (P) ++( x, y) coordinate (Q); Alternately, the offset may be specified with polar coordinates. For example, given angle α and radius r, with an appropriate dimensional unit dim, the command: \path (P) ++(α:rim) coordinate (Q); specifies a new point Q. See Figure 9. Q Q y r P x P α Figure 9: A relative point, Q, determined with Cartesian or polar offsets. There are two forms of relative points one which updates the current point and one which does not. The ++ prefix updates the current point while the + prefix does not. 7
9 Consider line segments drawn between points defined in a relative manner, as in the example of Figure 10. The path is specified by offsets: the drawing pen starts at the origin and is adjusted first by the offset (1, 0), followed by the offset (1, 1), and finally by the offset (1, 1). \begin{tikzpicture} \draw (0,0) -- ++(1,0) -- ++(1,1) -- ++(1,-1); Figure 10: Drawing a path using relative offsets. Figure 11: Output produced by Figure 10. By contrast, Figure 12 shows the effect of using the + prefix. Since the current point is not updated in this variation, every offset which appears is performed relative to the initial point, (0, 0). \begin{tikzpicture} \draw (0,0) -- +(1,0) -- +(0,-1) -- +(-1,0) -- +(0,1); Figure 12: Drawing a path using relative offsets without updating the current point. Figure 13: Output produced by Figure 12. 8
10 Beyond line segments In addition to points and line segments, there are a number of other graphic primitives available. These include: Grids and rectangles Circles and ellipses Arcs Bézier curves As previously discussed, a grid is specified by providing two diagonally opposing points and other options which affect such things as the color and spacing of the grid lines. A rectangle can be viewed as a simplified grid all that is needed are two diagonally opposing points of the rectangle. The syntax \draw (P) rectangle (Q); draws the rectangle specified by the two bounding box points P and Q. It is worth noting that the current point is updated to Q, a fact which plays a role if the \draw command involves more than one drawing action. Figure 14 provides an example where three rectangles are drawn in succession. Each rectangle operation updates the current point, which then serves as one of the bounding box points for the following rectangle. \begin{tikzpicture} \draw (0,0) rectangle (1,1) rectangle (3,2) rectangle (4,3); Figure 14: Drawing rectangles. A circle is specified by providing its center point and the desired radius. The command: \draw (a,b) circle (rim); 9
11 \begin{tikzpicture} \draw (0,0) circle (1cm) circle (0.6cm) circle (0.2cm); Figure 15: Drawing circles one draw command with multiple actions. \begin{tikzpicture} \draw (0,0) circle (1cm); \draw (0.5,0) circle (0.5cm); \draw (0,0.5) circle (0.5cm); \draw (-0.5,0) circle (0.5cm); \draw (0,-0.5) circle (0.5cm); Figure 16: Drawing circles a sequence of draw commands. causes the circle with radius r, with an appropriate dimensional unit, and center point (a, b) to be drawn. The current point is not updated as a result. Figures 15 and 16 provide examples. The situation for an ellipse is similar, though two radii are needed, one for each axis. The syntax: \draw (a,b) ellipse (r 1 dimand 2 dim); causes the ellipse centered at (a, b) with semi-axes r 1 and r 2 to be drawn. See Figure 17. y b r 2 r 1 a x Figure 17: An ellipse in TikZ. 10
12 Like circle, the ellipse command does not change the current point, so multiple ellipses which share the same center point can be draw with a single draw command, as Figure 18 shows. \begin{tikzpicture} \draw (0,0) ellipse (2cm and 1cm) ellipse (0.5cm and 1 cm) ellipse (0.5cm and 0.25cm); Figure 18: Three ellipses produced with a single draw command. Arcs may also be specified in TikZ. For a circular arc, what is required is an initial point on the circle, the radius of the circle and an indication of how much of the circle to be swept out. In more detail, the syntax \draw (P) arc (α:β:rim); draws the arc shown in Figure 19. At first glance it might seem unusual to use the point P and not the center point of the circle. However, when one realizes that the arc might be just one of several components of a draw command, it is very natural to use the point P, as it will be the current point. r β α P Figure 19: An arc in TikZ. For example, Figure 20 shows how to draw a portion of an annulus by drawing two arcs and two line segments. This particular figure is drawn by directing 11
13 \begin{tikzpicture} \draw (0:1cm) -- (0:2cm) arc (0:60:2cm) -- (60:1cm) arc (60:0:1cm) -- cycle; Figure 20: Combining arcs and line segments. the pen in a counter-clockwise fashion the horizontal line segment, the outer circular arc, a line segment, and finally the inner arc. TikZ also provides the ability to produce Bézier curves. The command \draw (P).. controls (C) and (D).. (Q); draws the curve shown in Figure 21. Four points are needed: an initial point P, a final point Q, and two control points. The location of the control points controls the extent of the curve and the slope of the curve at the initial and final points. Bézier curves provide for a wealth of variety as Figure 22 indicates. An alternate syntax for Bézier curves allows for a more convenient specification of the curvature at the starting and ending points. Using polar coordinates with respect to these two points provides this capability. The syntax is as follows: \draw (P).. controls +(α:r 1 im) and +(β:r 2 im).. (Q); See Figure From coordinates to nodes A node is a generalization of the coordinate primitive. Two characteristics of a node are its shape and its text. A node allows for arbitrary TEX text to appear within a diagram. The command \path (0,0) node[draw,shape=circle] (v0) {$v_0$}; defines a node named v0, centered at the origin, with a circular shape and text component $v_0$. The draw option causes the associated shape (in this case, a circle) to be drawn. Figure 24 illustrates how nodes can be used to draw an undirected graph. Notice how line segments which join nodes stop at the boundary 12
14 x y P Q C D Figure 21: A Bézier curve. P Q C D P Q C D P Q C D P Q C D Figure 22: Various Bézier curves. P Q r 1 r 2 α β Figure 23: A Bézier curve specified with relative coordinates. 13
15 of the shape rather than protruding into the center point of the node. In this example, we have made use of the tikzstyle command to factor out code that would otherwise be repeated in each of the node commands. Additionally, this example illustrates the use of the option [scale=2.5], which indicates the result is to be scaled by a factor of 2.5. Using scale factors allows the picture to be designed in convenient units, then resized as desired. However, scaling a TikZ picture does not scale the font size in use. \begin{tikzpicture}[scale=2.5] \tikzstyle{every node}=[draw,shape=circle]; \path (0:0cm) node (v0) {$v_0$}; \path (0:1cm) node (v1) {$v_1$}; \path (72:1cm) node (v2) {$v_2$}; \path (2*72:1cm) node (v3) {$v_3$}; \path (3*72:1cm) node (v4) {$v_4$}; \path (4*72:1cm) node (v5) {$v_5$}; \draw (v0) -- (v1) (v0) -- (v2) (v0) -- (v3) (v0) -- (v4) (v0) -- (v5); Figure 24: Drawing an undirected graph with nodes. There are various features within TikZ which provide fine control over nodes. Many of these are related to how line segments or curves connect a pair of nodes. For example, one can provide specific locations on the node s shape where connections should touch, whether or not to shorten the connection, how and where to annotate the connection with text, and so forth. 14
16 v 2 v 3 v 0 v 1 v 4 v 5 Figure 25: Output produced by Figure Loops TikZ provides a loop structure which can simplify the creation of certain types of graphics. The basic loop syntax is as follows: \foreach \var in {iteration list} { loop body } The loop variable, \var, takes on the values given in the iteration list. In the simplest case, this list can be a fixed list of values, such as {1,2,3,4} or as an implied list of values, such as {1,...,4}. Consider the loop in Figure 26. Four coordinates, X1 through X4 are introduced at (1, 0), (2, 0), (3, 0), and (4, 0), respectively. In addition, a small filled circle is drawn at each coordinate. Figure 27 shows how to extend this idea to yield a bipartite graph. As one might expect, foreach loops can be nested, a feature utilized here to specify all the edges in the graph. Iteration lists need not consist of consecutive integers. An implicit step size is obtained by providing the first two values of the list in addition to the final value. 15
17 \foreach \i in {1,...,4} { \path (\i,0) coordinate (X\i); \fill (X\i) circle (1pt); } Figure 26: A loop to create four named coordinates \begin{tikzpicture}[scale=2] \foreach \i in {1,...,4} { \path (\i,0) coordinate (X\i); \fill (X\i) circle (1pt); } \foreach \j in {1,...,3} { \path (\j,1) coordinate (Y\j); \fill (Y\j) circle (1pt); } \foreach \i in {1,...,4} { \foreach \j in {1,...,3} { \draw (X\i) -- (Y\j); } } Figure 27: A bipartite graph drawn using loops. 16
18 For example, \foreach \angle in {0,60,...,300} { loop body } causes \angle to take on values of the form 60k, where 0 k 5. Specifying pairs of values in an iteration list provides simultaneous iteration over these values. For example, \foreach \angle / \c in {0/red,120/green,240/blue} { loop body } produces three iterations of the loop body, successively assigning the pairs (0, red), (120, green), and (240, blue) to the variables \angle and \c. 7 Plotting A list of points can be plotted using the TikZ plot command. Lists can be generated on-the-fly by gnuplot[6], read from a file, or specified within a plot itself. These three approaches are supported by the following commands: \draw plot function{gnuplot formula}; \draw plot file{filename}; \draw plot coordinates{point sequence}; Using other TikZ commands, these graphs can be enhanced with symbols or other desired annotations. Figure 29 provides an example of one such plot, the graph of y = sin(2x)e x/4. The curve itself is generated with the command: \draw[smooth,domain=0:6.5] plot function{sin(2*x)*exp(-x/4)}; 17
19 This command causes gnuplot to generate points of the graph, saving them in a file, which is subsequently processed by TikZ. The smooth option joins these points with a curve, in contrast to line segments. Although not used in this example, the samples option can be used to control the number of generated points. The domain option specifies the desired range of x values. Everything else which appears in this graph, including axes, tick marks, and multiples of π/2 have been added with additional TikZ commands. A list of points can be used to create a bar chart, as illustrated in Figure 30. Each of the bars is drawn by command: \draw[ycomb,color=gray,line width=0.5cm] plot coordinates{(1,1) (2,2) (3,3)}; The ycomb option specifies vertical bars are to be drawn and line width establishes the width of the bars. 8 Clipping and scope It is sometimes useful to be able to specify regions of a graphic where drawing is allowed to take place any drawing which falls outside this defined region is clipped and is not visible. This feature is made available by the \clip command, which defines the clipping region. For example, \clip (-0.5,0) circle (1cm); specifies that all future drawing should take place relative to the clipping area consisting of the circle centered at ( 0.5, 0) with radius 1 cm. Figure 31 shows how to fill a semicircle with clipping. The yin-yang symbol, a popular example, can be easily obtained by superimposing four filled circles on this filled semicircle:. To generate points with gnuplot, TEX must be configured to allow external programs to be invoked. For TEX Live, this can be accomplished by adjusting texmf.cnf to allow a shell escape. 18
20 Figure 28: Results produced by Figure 27. y π 2 π 3π 2 2π x Figure 29: The graph of a function, with tick marks and annotations. y x Figure 30: A graph that includes a bar chart. 19
21 When multiple \clip commands appear, the effective clipping region is the intersection of all specified regions. For example, \clip (-0.5,0) circle (1cm); \clip (0.5,0) circle (1cm); defines a clipping area corresponding to the intersection of the two indicated circles. All subsequent commands which cause drawing to occur are clipped with respect to this region. A scoping mechanism allows a clipping region to be defined for a specified number of commands. This is achieved with a scope environment. Any commands inside this environment respect the clipping region; commands which fall outside behave as usual. For example, \begin{scope} \clip (-0.5,0) circle (1cm); \clip (0.5,0) circle (1cm); \fill (-2,1.5) rectangle (2,-1.5); \end{scope} shades the intersection of two overlapping circles, since the filled rectangle is clipped to this region. Commands which follow this scope environment are not subject to this clipping region. Figure 32 shows a complete example which makes use of \clip and scoping. The scoping mechanism may also be used to apply options to a group of actions, as illustrated in Figure 33. In this example, options to control color and line width are applied to each of three successive \draw commands, yielding the top row of the figure. At the conclusion of the scope environment, the remaining \draw commands revert to the TikZ defaults, yielding the lower row of the figure. \begin{tikzpicture} \draw (0,0) circle (1cm); \clip (0,0) circle (1cm); \fill[black] (0cm,1cm) rectangle (-1cm,-1cm); Figure 31: An example of clipping. 20
22 \begin{tikzpicture} \draw (-2,1.5) rectangle (2,-1.5); \begin{scope} \clip (-0.5,0) circle (1cm); \clip (0.5,0) circle (1cm); \fill[color=gray] (-2,1.5) rectangle (2,-1.5); \end{scope} \draw (-0.5,0) circle (1cm); \draw (0.5,0) circle (1cm); Figure 32: Using clipping and scope to show set intersection. \begin{tikzpicture} \begin{scope}[color=gray,line width=4pt] \draw (0,0) -- (2,2); \draw (2,0) -- (0,2); \draw (-1,1) circle (1cm); \end{scope} \draw (0,0) -- (-2,-2); \draw (0,-2) -- (-2,0); \draw (1,-1) circle (1cm); Figure 33: Using scope to apply options. 21
23 9 Summary TikZ, a high-level interface to PGF, is a language-based tool for specifying graphics. It uses familiar graphics-related concepts, such as point, line, and circle and has a concise and natural syntax. It meshes well with pdflatex in the sense that no additional processing steps are needed. Another positive aspect of TikZ is its ability to blend TEX fonts, symbols, and mathematics within the generated graphics. We are especially indebted to Till Tantau for developing TikZ and for contributing it to the TEX community. References [1] Robin Fairbairns, ed. The UK TEX FAQ. Available from ftp://cam.ctan.org/tex-archive/help/uk-tex-faq/letterfaq.pdf. [2] John Hobby. Introduction to MetaPost. Available from [3] Uwe Kern. Extending LATEX s color facilities: the xcolor package. Available from [4] Till Tantau. TikZ and PGF, Version Available from [5] Kresten Krab Thorup, Frank Jensen, and Chris Rowley. The calc package: infix arithmetic in LATEX. Available from ftp://tug.ctan.org/pub/ tex-archive/macros/latex/required/tools/calc.pdf. [6] Thomas Williams and Colin Kelley. gnuplot. Available from 22
Graphics in MathBook XML
Thomas W. Judson Stephen F. Austin State University April 27, 2016 The L A TEX picture environment In the beginning graphics was created with the L A TEX picture environment or imported from a third party
More informationA very minimal introduction to TikZ (Jacques Crémer) 2015/08/24
TikZ 繪圖套件 104 學年度第一學期基礎統計 許湘伶 高雄大學統計學研究所 A very minimal introduction to TikZ (Jacques Crémer) 2015/08/24 Outline 1 Introduction 2 Lines 3 Curve 4 Function plot 5 Function plot 6 Label 7 With beamer 8 Loops
More informationIllustrative Mathematics. G-MG Paper Clip. Alignment 1: G-MG.A.3. This paper clip is just over 4 cm long.
Illustrative Mathematics G-MG Paper Clip Alignment : G-MG.A.3 This paper clip is just over 4 cm long. How many paper clips like this may be made from a straight piece of wire 0 meters long? Commentary:
More informationTypesetting spectral sequences in L A TEX with luasseq.sty
Typesetting spectral sequences in L A TEX with luasseq.sty Tilman Bauer November 6, 1 1 Introduction The present package, luasseq, facilitates the typesetting of mathematical objects called spectral sequence
More informationIn this chapter, we will investigate what have become the standard applications of the integral:
Chapter 8 Overview: Applications of Integrals Calculus, like most mathematical fields, began with trying to solve everyday problems. The theory and operations were formalized later. As early as 70 BC,
More informationMoore Catholic High School Math Department
Moore Catholic High School Math Department Geometry Vocabulary The following is a list of terms and properties which are necessary for success in a Geometry class. You will be tested on these terms during
More informationPARAMETRIC EQUATIONS AND POLAR COORDINATES
10 PARAMETRIC EQUATIONS AND POLAR COORDINATES PARAMETRIC EQUATIONS & POLAR COORDINATES A coordinate system represents a point in the plane by an ordered pair of numbers called coordinates. PARAMETRIC EQUATIONS
More informationChapter - 2: Geometry and Line Generations
Chapter - 2: Geometry and Line Generations In Computer graphics, various application ranges in different areas like entertainment to scientific image processing. In defining this all application mathematics
More informationOpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.
D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,
More informationTikZ & PGF(plots) Daniel Knittl-Frank. May This work is licensed under the Creative Commons Attribution-ShareAlike 3.
TikZ & PGF(plots) Daniel Knittl-Frank May 2015 This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Austria license (CC-BY-SA) 2D value plot Bitstamp USD 20,000 Weighted Price High
More informationTikZ and pgf. Manual for version 1.09
TikZ and pgf Manual for version 1.09 \tikzstyle{level 1}=[sibling angle=120] \tikzstyle{level 2}=[sibling angle=60] \tikzstyle{level 3}=[sibling angle=30] \tikzstyle{every node}=[fill] \tikzstyle{edge
More informationApplications of Integration. Copyright Cengage Learning. All rights reserved.
Applications of Integration Copyright Cengage Learning. All rights reserved. Volume: The Disk Method Copyright Cengage Learning. All rights reserved. Objectives Find the volume of a solid of revolution
More informationform are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates.
Plot 3D Introduction Plot 3D graphs objects in three dimensions. It has five basic modes: 1. Cartesian mode, where surfaces defined by equations of the form are graphed in Cartesian coordinates, 2. cylindrical
More informationSPECIAL TECHNIQUES-II
SPECIAL TECHNIQUES-II Lecture 19: Electromagnetic Theory Professor D. K. Ghosh, Physics Department, I.I.T., Bombay Method of Images for a spherical conductor Example :A dipole near aconducting sphere The
More informationUSING TIKZ WITH L A TEX
USING TIKZ WITH L A TEX MATTHEW LAGRO Abstract. Tikz is a library which allows the creation of pictures and diagrams inside of LATEXdocuments. The advantages are several: Documents are self-contained,
More informationPlot four points A, B, C and D on the grid to make a rectangle ABCD of length 6 cm and width 4 cm. (2)
Q1. (a) Here is a centimetre grid. Plot four points A, B, C and D on the grid to make a rectangle ABCD of length 6 cm and width 4 cm. (2) (b) Tick whether each statement is always true, sometimes true
More informationReview of 7 th Grade Geometry
Review of 7 th Grade Geometry In the 7 th Grade Geometry we have covered: 1. Definition of geometry. Definition of a polygon. Definition of a regular polygon. Definition of a quadrilateral. Types of quadrilaterals
More information25 The vibration spiral
25 The vibration spiral Contents 25.1 The vibration spiral 25.1.1 Zone Plates............................... 10 25.1.2 Circular obstacle and Poisson spot.................. 13 Keywords: Fresnel Diffraction,
More information5 Applications of Definite Integrals
5 Applications of Definite Integrals The previous chapter introduced the concepts of a definite integral as an area and as a limit of Riemann sums, demonstrated some of the properties of integrals, introduced
More informationL A TEX E Here s the example of a X
When an example needs a special package, I ve put a \usepackage statement in code for the example. The one exception is \usepackage{amsmath}. I always use this, and so should you, if only to get the align
More informationTo graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:
Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points
More informationLesson 14 Blends. For Resources go to > click on the Creo Parametric 2.0 Book cover
Lesson 14 Blends Figure 14.1 Cap OBJECTIVES Create a Parallel Blend feature Use the Shell Tool Create a Hole Pattern REFERENCES AND RESOURCES For Resources go to www.cad-resources.com > click on the Creo
More information2.3 Circular Functions of Real Numbers
www.ck12.org Chapter 2. Graphing Trigonometric Functions 2.3 Circular Functions of Real Numbers Learning Objectives Graph the six trigonometric ratios as functions on the Cartesian plane. Identify the
More information03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations
Multimedia Systems 03 Vector Graphics 2D and 3D Graphics, Transformations Imran Ihsan Assistant Professor, Department of Computer Science Air University, Islamabad, Pakistan www.imranihsan.com Lectures
More informationTo graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6
Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points
More informationLesson 14 Blends. For Resources go to > click on the Creo Parametric Book cover
Lesson 14 Blends Figure 14.1 Cap OBJECTIVES Create a Parallel Blend feature Use the Shell Tool Create a Swept Blend REFERENCES AND RESOURCES For Resources go to www.cad-resources.com > click on the Creo
More informationAP CALCULUS BC PACKET 2 FOR UNIT 4 SECTIONS 6.1 TO 6.3 PREWORK FOR UNIT 4 PT 2 HEIGHT UNDER A CURVE
AP CALCULUS BC PACKET FOR UNIT 4 SECTIONS 6. TO 6.3 PREWORK FOR UNIT 4 PT HEIGHT UNDER A CURVE Find an expression for the height of an vertical segment that can be drawn into the shaded region... = x =
More informationMATH 234. Excercises on Integration in Several Variables. I. Double Integrals
MATH 234 Excercises on Integration in everal Variables I. Double Integrals Problem 1. D = {(x, y) : y x 1, 0 y 1}. Compute D ex3 da. Problem 2. Find the volume of the solid bounded above by the plane 3x
More informationROSE-HULMAN INSTITUTE OF TECHNOLOGY
EXAM 2 WRITTEN PORTION NAME SECTION NUMBER CAMPUS MAILBOX NUMBER EMAIL ADDRESS @rose-hulman.edu Written Portion / 48 Computer Portion / 52 Total / 100 ROSE-HULMAN INSTITUTE OF TECHNOLOGY USE MATLAB SYNTAX
More informationChapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.
Chapter 1 Linear Equations and Straight Lines 2 of 71 Outline 1.1 Coordinate Systems and Graphs 1.4 The Slope of a Straight Line 1.3 The Intersection Point of a Pair of Lines 1.2 Linear Inequalities 1.5
More informationMoore Catholic High School Math Department
Moore Catholic High School Math Department Geometry Vocabulary The following is a list of terms and properties which are necessary for success in a Geometry class. You will be tested on these terms during
More informationRational Numbers: Graphing: The Coordinate Plane
Rational Numbers: Graphing: The Coordinate Plane A special kind of plane used in mathematics is the coordinate plane, sometimes called the Cartesian plane after its inventor, René Descartes. It is one
More informationChapter 8: Applications of Definite Integrals
Name: Date: Period: AP Calc AB Mr. Mellina Chapter 8: Applications of Definite Integrals v v Sections: 8.1 Integral as Net Change 8.2 Areas in the Plane v 8.3 Volumes HW Sets Set A (Section 8.1) Pages
More informationMET71 COMPUTER AIDED DESIGN
UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X
More informationGstarCAD Complete Features Guide
GstarCAD 2017 Complete Features Guide Table of Contents Core Performance Improvement... 3 Block Data Sharing Process... 3 Hatch Boundary Search Improvement... 4 New and Enhanced Functionalities... 5 Table...
More informationDC2 File Format. 1. Header line 2. Entity line 3. Point line 4. String line
DC2 File Format The DesignCAD DC2 drawing file is an ASCII file, with the data present in character format. Each "record" in the file is actually a line in a text file. There are four types of records,
More informationTópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.
Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática Chap. 2 Rasterization Rasterization Outline : Raster display technology. Basic concepts: pixel, resolution,
More informationAppendix E. Plane Geometry
Appendix E Plane Geometry A. Circle A circle is defined as a closed plane curve every point of which is equidistant from a fixed point within the curve. Figure E-1. Circle components. 1. Pi In mathematics,
More informationGeneral Certificate of Secondary Education Higher Tier November Time allowed 1 hour 30 minutes
Centre Number Surname Candidate Number For Examiner s Use Other Names Candidate Signature Examiner s Initials Pages Mark Mathematics General Certificate of Secondary Education Higher Tier November 2014
More information9.1 Parametric Curves
Math 172 Chapter 9A notes Page 1 of 20 9.1 Parametric Curves So far we have discussed equations in the form. Sometimes and are given as functions of a parameter. Example. Projectile Motion Sketch and axes,
More informationCourse Number: Course Title: Geometry
Course Number: 1206310 Course Title: Geometry RELATED GLOSSARY TERM DEFINITIONS (89) Altitude The perpendicular distance from the top of a geometric figure to its opposite side. Angle Two rays or two line
More informationRoadmap for tonight. What are Bezier curves (mathematically)? Programming Bezier curves (very high level view).
Roadmap for tonight Some background. What are Bezier curves (mathematically)? Characteristics of Bezier curves. Demo. Programming Bezier curves (very high level view). Why Bezier curves? Bezier curves
More information= f (a, b) + (hf x + kf y ) (a,b) +
Chapter 14 Multiple Integrals 1 Double Integrals, Iterated Integrals, Cross-sections 2 Double Integrals over more general regions, Definition, Evaluation of Double Integrals, Properties of Double Integrals
More informationChapter 3. Sukhwinder Singh
Chapter 3 Sukhwinder Singh PIXEL ADDRESSING AND OBJECT GEOMETRY Object descriptions are given in a world reference frame, chosen to suit a particular application, and input world coordinates are ultimately
More information2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into
2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel
More informationLecture IV Bézier Curves
Lecture IV Bézier Curves Why Curves? Why Curves? Why Curves? Why Curves? Why Curves? Linear (flat) Curved Easier More pieces Looks ugly Complicated Fewer pieces Looks smooth What is a curve? Intuitively:
More informationThis is the vector graphics "drawing" technology with its technical and creative beauty. SVG Inkscape vectors
1 SVG This is the vector graphics "drawing" technology with its technical and creative beauty SVG Inkscape vectors SVG 2 SVG = Scalable Vector Graphics is an integrated standard for drawing Along with
More informationProducing graphs with MetaPost
12 MAPS 31 Maarten Sneep Producing graphs with MetaPost multiple aligned graphs and error bars Keywords MetaPost, graphs, error-bars Abstract MetaPost is an interesting companion for generating figures
More informationENV Laboratory 2: Graphing
Name: Date: Introduction It is often said that a picture is worth 1,000 words, or for scientists we might rephrase it to say that a graph is worth 1,000 words. Graphs are most often used to express data
More informationMeasurement and Geometry (M&G3)
MPM1DE Measurement and Geometry (M&G3) Please do not write in this package. Record your answers to the questions on lined paper. Make notes on new definitions such as midpoint, median, midsegment and any
More informationNETLOGO 6.0 QUICK GUIDE
Agents NETLOGO 6.0 QUICK GUIDE Luis R. Izquierdo (http://luis.izqui.org) The NetLogo world is made up of agents. Agents are beings that can follow instructions. There are four types of agents: Turtles.
More informationPolar Coordinates. 2, π and ( )
Polar Coordinates Up to this point we ve dealt exclusively with the Cartesian (or Rectangular, or x-y) coordinate system. However, as we will see, this is not always the easiest coordinate system to work
More informationL E S S O N 2 Background
Flight, Naperville Central High School, Naperville, Ill. No hard hat needed in the InDesign work area Once you learn the concepts of good page design, and you learn how to use InDesign, you are limited
More informationComputational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm
GEOMETRY COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming Challenges books. Computational
More informationAn interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.
Using Monte Carlo to Estimate π using Buffon s Needle Problem An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Here s the problem (in a simplified form). Suppose
More informationThe reflectgraphics package
The reflectgraphics package Oliver Reiche oliver.reiche@gmail.com v0.2c from 2015/07/07 Abstract This small package provides a new macro, which adds fancy reflections at the bottom of graphics. To keep
More informationSHAPE AND STRUCTURE. Shape and Structure. An explanation of Mathematical terminology
Shape and Structure An explanation of Mathematical terminology 2005 1 POINT A dot Dots join to make lines LINE A line is 1 dimensional (length) A line is a series of points touching each other and extending
More informationtkz-berge.sty by Alain Matthes AlterMundus
tkz-berge.sty by Alain Matthes AlterMundus AlterMundus AlterMundus Alain Matthes tkz-berge.sty v2.7c The package tkz-berge.sty is a collection of some useful macros if you want to draw some classic graphs
More information5/27/12. Objectives. Plane Curves and Parametric Equations. Sketch the graph of a curve given by a set of parametric equations.
Objectives Sketch the graph of a curve given by a set of parametric equations. Eliminate the parameter in a set of parametric equations. Find a set of parametric equations to represent a curve. Understand
More informationvenndiagram v1.2: Drawing Simple Venn Diagrams
venndiagram v1.2: Drawing Simple Venn Diagrams Nicola L. C. Talbot http://www.dickimaw-books.com/ 2018-06-07 The venndiagram package is provided to assist generating simple two- and three-set Venn diagrams
More information(Refer Slide Time: 00:02:00)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts
More informationPolar Coordinates. Calculus 2 Lia Vas. If P = (x, y) is a point in the xy-plane and O denotes the origin, let
Calculus Lia Vas Polar Coordinates If P = (x, y) is a point in the xy-plane and O denotes the origin, let r denote the distance from the origin O to the point P = (x, y). Thus, x + y = r ; θ be the angle
More informationI IS II. = 2y"\ V= n{ay 2 l 3 -\y 2 )dy. Jo n [fy 5 ' 3 1
r Exercises 5.2 Figure 530 (a) EXAMPLE'S The region in the first quadrant bounded by the graphs of y = i* and y = 2x is revolved about the y-axis. Find the volume of the resulting solid. SOLUTON The region
More informationVocabulary Unit 2-3: Linear Functions & Healthy Lifestyles. Scale model a three dimensional model that is similar to a three dimensional object.
Scale a scale is the ratio of any length in a scale drawing to the corresponding actual length. The lengths may be in different units. Scale drawing a drawing that is similar to an actual object or place.
More informationChapter 10. Creating 3D Objects Delmar, Cengage Learning
Chapter 10 Creating 3D Objects 2011 Delmar, Cengage Learning Objectives Extrude objects Revolve objects Manipulate surface shading and lighting Map artwork to 3D objects Extrude Objects Extrude & Bevel
More informationComputer Graphics. - Rasterization - Philipp Slusallek
Computer Graphics - Rasterization - Philipp Slusallek Rasterization Definition Given some geometry (point, 2D line, circle, triangle, polygon, ), specify which pixels of a raster display each primitive
More informationProblem A. Interactive Smiley Face
Problem A. Interactive Smiley Face 1 second Igor likes smiley faces a lot. He wrote a program that generates really large pictures of white and black pixels with smiley faces. Depending on Igor s mood,
More informationThe basics of LaTeX. Cédric Buron. April 25, 2016
The basics of LaTeX Cédric Buron April 25, 2016 Hello fellows! Today, I introduce a very important language in my PhD, L A TEX(what a logo!). In this article, I m going to introduce very quickly the purpose,
More informationUsing Symbolic Geometry to Teach Secondary School Mathematics - Geometry Expressions Activities for Algebra 2 and Precalculus
Using Symbolic Geometry to Teach Secondary School Mathematics - Geometry Expressions Activities for Algebra and Precalculus Irina Lyublinskaya, CUNY College of Staten Island, Staten Island, NY, USA and
More informationLARSA Section Composer. for. LARSA 2000 Finite Element Analysis and Design Software
for LARSA 2000 Finite Element Analysis and Design Software Larsa, Inc. Melville, New York, USA Revised August 2004 Table of Contents Features 4 Sections & Shapes 5 Using Section Composer 7 Creating Shapes
More informationL A TEX Course at ICT School
L A TEX Course at ICT School Let s add some mathematics Alexandre L École polytechnique, F labrosse@kth.se KTH Royal Institute of Technology Spring 2012 Course overview 1. Basics and tips for your first
More informationINSTRUCTIONS FOR THE USE OF THE SUPER RULE TM
INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM NOTE: All images in this booklet are scale drawings only of template shapes and scales. Preparation: Your SUPER RULE TM is a valuable acquisition for classroom
More informationFilling Space with Random Line Segments
Filling Space with Random Line Segments John Shier Abstract. The use of a nonintersecting random search algorithm with objects having zero width ("measure zero") is explored. The line length in the units
More informationCSCI 4620/8626. Coordinate Reference Frames
CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.
More informationA TikZ tutorial: Generating graphics in the spirit of TEX
Eastern Illinois University From the SelectedWorks of ndrew Mertz 2009 TikZ tutorial: Generating graphics in the spirit of TEX ndrew Mertz, Eastern Illinois University William Slough, Eastern Illinois
More informationStrategy. Using Strategy 1
Strategy Using Strategy 1 Scan Path / Strategy It is important to visualize the scan path you want for a feature before you begin taking points on your part. You want to try to place your points in a way
More informationME 111: Engineering Drawing. Geometric Constructions
ME 111: Engineering Drawing Lecture 2 01-08-2011 Geometric Constructions Indian Institute of Technology Guwahati Guwahati 781039 Geometric Construction Construction of primitive geometric forms (points,
More informationGeometry / Integrated II TMTA Test units.
1. An isosceles triangle has a side of length 2 units and another side of length 3 units. Which of the following best completes the statement The length of the third side of this triangle? (a) is (b) is
More informationHow to create shapes. Drawing basic shapes. Adobe Photoshop Elements 8 guide
How to create shapes With the shape tools in Adobe Photoshop Elements, you can draw perfect geometric shapes, regardless of your artistic ability or illustration experience. The first step to drawing shapes
More informationComputer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling Welcome to the lectures on computer graphics. We have
More informationMathematics Background
Measurement All measurements are approximations. In their work in this Unit, students explore ways to find measures for two and three dimensional figures. Even using exact formulas depends on how students
More informationAdobe Illustrator CS5 Part 2: Vector Graphic Effects
CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Adobe Illustrator CS5 Part 2: Vector Graphic Effects Summer 2011, Version 1.0 Table of Contents Introduction...2 Downloading the
More informationLine Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller
Line Drawing Introduction to Computer Graphics Torsten Möller / Mike Phillips Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Color Interaction Texture/ Realism
More informationIntermediate Mathematics League of Eastern Massachusetts
IMLEM Meet #4 March, 2017 Intermediate Mathematics League of Eastern Massachusetts This is a calculator meet! Category 1 Mystery Meet #4 - February, 2017 Calculator Meet 1) What is the maximum (greatest)
More informationLesson 1. Unit 2 Practice Problems. Problem 2. Problem 1. Solution 1, 4, 5. Solution. Problem 3
Unit 2 Practice Problems Lesson 1 Problem 1 Rectangle measures 12 cm by 3 cm. Rectangle is a scaled copy of Rectangle. Select all of the measurement pairs that could be the dimensions of Rectangle. 1.
More information2009 Fall Startup Event Thursday, September 24th, 2009
009 Fall Startup Event This test consists of 00 problems to be solved in 0 minutes. All answers must be exact, complete, and in simplest form. To ensure consistent grading, if you get a decimal, mixed
More information2. MODELING A MIXING ELBOW (2-D)
MODELING A MIXING ELBOW (2-D) 2. MODELING A MIXING ELBOW (2-D) In this tutorial, you will use GAMBIT to create the geometry for a mixing elbow and then generate a mesh. The mixing elbow configuration is
More informationPolygons in the Coordinate Plane
Polygons in the Coordinate Plane LAUNCH (8 MIN) Before How can you find the perimeter of the sandbox that the park worker made? During How will you determine whether the park worker s plan for the sandbox
More informationProperties of a Circle Diagram Source:
Properties of a Circle Diagram Source: http://www.ricksmath.com/circles.html Definitions: Circumference (c): The perimeter of a circle is called its circumference Diameter (d): Any straight line drawn
More informationWorking with Charts Stratum.Viewer 6
Working with Charts Stratum.Viewer 6 Getting Started Tasks Additional Information Access to Charts Introduction to Charts Overview of Chart Types Quick Start - Adding a Chart to a View Create a Chart with
More informationCharting new territory: Formulating the Dalivian coordinate system
Parabola Volume 53, Issue 2 (2017) Charting new territory: Formulating the Dalivian coordinate system Olivia Burton and Emma Davis 1 Numerous coordinate systems have been invented. The very first and most
More informationLesson 5: Definition of Rotation and Basic Properties
Student Outcomes Students know how to rotate a figure a given degree around a given center. Students know that rotations move lines to lines, rays to rays, segments to segments, and angles to angles. Students
More informationGraphics (Output) Primitives. Chapters 3 & 4
Graphics (Output) Primitives Chapters 3 & 4 Graphic Output and Input Pipeline Scan conversion converts primitives such as lines, circles, etc. into pixel values geometric description a finite scene area
More informationLearning to use the drawing tools
Create a blank slide This module was developed for Office 2000 and 2001, but although there are cosmetic changes in the appearance of some of the tools, the basic functionality is the same in Powerpoint
More informationThe radius for a regular polygon is the same as the radius of the circumscribed circle.
Perimeter and Area The perimeter and area of geometric shapes are basic properties that we need to know. The more complex a shape is, the more complex the process can be in finding its perimeter and area.
More informationScalable Vector Graphics (SVG) vector image World Wide Web Consortium (W3C) defined with XML searched indexed scripted compressed Mozilla Firefox
SVG SVG Scalable Vector Graphics (SVG) is an XML-based vector image format for twodimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed
More informationUNIT 11 VOLUME AND THE PYTHAGOREAN THEOREM
UNIT 11 VOLUME AND THE PYTHAGOREAN THEOREM INTRODUCTION In this Unit, we will use the idea of measuring volume that we studied to find the volume of various 3 dimensional figures. We will also learn about
More informationShape and Line Tools. tip: Some drawing techniques are so much easier if you use a pressuresensitive
4Drawing with Shape and Line Tools Illustrator provides tools for easily creating lines and shapes. Drawing with shapes (rectangles, ellipses, stars, etc.) can be a surprisingly creative and satisfying
More informationVIEWZ 1.3 USER MANUAL
VIEWZ 1.3 USER MANUAL 2007-08 Zeus Numerix ViewZ 1.3.0 User Manual Revision: 200806061429 The latest copy of this PDF may be downloaded from the website. An online (HTML) version is also available. Zeus
More informationHow to draw and create shapes
Adobe Flash Professional Guide How to draw and create shapes You can add artwork to your Adobe Flash Professional documents in two ways: You can import images or draw original artwork in Flash by using
More information