Math 290: L A TEXSeminar Week 10

Similar documents
GEOG 490/590 SPATIAL MODELING SPRING 2015 ASSIGNMENT 3: PATTERN-ORIENTED MODELING WITH AGENTS

Name: Date: Algebra I - Unit 3, Lesson 4: Writing and Graphing Inequalities to Represent Constraints

6. 1 Leaping Lizards!

Code, Draw, and 3D-Print with Turtle Tina

Grade: 8. Author: Hope Phillips

1 Turtle Graphics Concepts

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

In this project you will use loops to create a racing turtle game and draw a race track.

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

Algebra 3 SAILS. Pacing Guide to make an A in the course = equivalent to 21 ACT math sub-score: SAILS Pacing for Traditional Schedule Module 1

StarLogo Complete Command List (Edited and reformatted by Nicholas Gessler, 6 June 2001.)

Cane toads and Australian snakes

SUGGESTED LEARNING STRATEGIES:

Animal Speeds Grades 7 12

Phenotypic and Genetic Variation in Rapid Cycling Brassica Parts III & IV

Scratch. To do this, you re going to need to have Scratch!

Our class had 2 incubators full of eggs. On day 21, our chicks began to hatch. In incubator #1, 1/3 of the eggs hatched. There were 2 chicks.

Sketch Out the Design

Pete s Eats Alan s Diner Sarah s Snackbar Total Dissatisfied Satisfied Total

GENETIC DRIFT Carol Beuchat PhD ( 2013)

2.1H Warm Up: Pet Sitters A Develop Understanding Task

Writing Simple Procedures Drawing a Pentagon Copying a Procedure Commanding PenUp and PenDown Drawing a Broken Line...

RUBBER NINJAS MODDING TUTORIAL

Naked Bunny Evolution

Comparing DNA Sequences to Understand Evolutionary Relationships with BLAST

6Measurement. What you will learn. Australian curriculum. Chapter 6B 6C 6D 6H 6I

Jack s Rabbits Book 3

A Guide to the TurtleGraphics Package for R

Hello Scratch! by Gabriel Ford, Sadie Ford, and Melissa Ford. Sample Chapter 3. Copyright 2018 Manning Publications

Lab 5: Bumper Turtles

How to Solve Word Problems

Performance Task: Lizards, Lizards, Everywhere!

Reference Guide Playful Invention Company

Turtle Ballet: Simulating Parallel Turtles in a Nonparallel LOGO Version. Erich Neuwirth

Workbook. Version 3. Created by G. Mullin and D. Carty

Body Parts and Products (Sessions I and II) BROWARD COUNTY ELEMENTARY SCIENCE BENCHMARK PLAN

Chapter 18: Categorical data

CAPABILITIES AND RESTRICTIONS OF ORTHOPHOTO PROCUCTION SYSTEMS FOR TERRESTRIAL ARCHAEOLOGICAL SURVEYS

Homework Case Study Update #3

Econometric Analysis Dr. Sobel

XSEED Summative Assessment Test 1

Mastitis Reports in Dairy Comp 305

Study Guide and Intervention

PATTERNS OF EVOLUTION STATIONS

Human Impact on Sea Turtle Nesting Patterns

Package TurtleGraphics

Darwin and the Family Tree of Animals

You are not forced to use the colours I use! Do your own thing if you wish, or copy it exactly as it is it s totally up to you

Integrated Math 1 Honors Module 2 Honors Systems of Equations and Inequalities

2. Joseph tweets 13 times a day. Define each variable and write an algebraic expression to describe the number of posts after any given number of days

Python 3 Turtle graphics. Lecture 24 COMPSCI111/111G SS 2017

Getting Started. Instruction Manual

Punnett Squares. and Pedigrees. How are patterns of inheritance studied? Lesson ESSENTIAL QUESTION. J S7L3.b Reproduction and genetic variation

Phantom Lake Math Challenge September-October 2016 The Power of Pets

The Do s and Don ts Guide of Livestock Handling

Kentucky Academic Standards

Life Under Your Feet: Field Research on Box Turtles

Call of the Wild. Investigating Predator/Prey Relationships

UNIT 6 DESCRIBING DATA Lesson 1: Summarizing, Representing, and Interpreting Data on a Single Measurement Variable

EASTER ACTIVITY BOOK COLOURING IN EASTER CUPCAKES WORD FIND BACKYARD BINOCULARS MAZE STRING ART JOIN THE DOTS DIY TERRARIUM

5 State of the Turtles

Activity 1: Changes in beak size populations in low precipitation

P M. Also Available! K J - H - C U U H C U F E.

Differentiated Activities for Teaching Key

Exit Ticket 89 Chapter 6 Quiz Review. 1. Three classes took the same test. Here is a box-and-whisker plot showing each class s scores.

About the Show. The Characters

Basic Commands and Training

PROBLEM SOLVING JUNIOR CIRCLE 01/09/2011

Getting Started! Searching for dog of a specific breed:

Fractal. Fractals. L- Systems 1/17/12

Measure time using nonstandard units. (QT M 584)

COMPARING DNA SEQUENCES TO UNDERSTAND EVOLUTIONARY RELATIONSHIPS WITH BLAST

COMPARING DNA SEQUENCES TO UNDERSTAND EVOLUTIONARY RELATIONSHIPS WITH BLAST

Fraction Approximation: Closer to Zero, One-half or One whole? CCSS: 3.NF.3, 4.NF.2 VA SOLs: 3.3, 4.2, 5.2

Professional Ultrasonic Dog Whistle Guide

Evolution in Action: Graphing and Statistics

Sampling and Experimental Design David Ferris, noblestatman.com

Stock items Häfele. telescopic slides. Stock items Häfele. solutions in movement. solutions in movement

USING FARMAX LITE. Upper navigation pane showing objects. Lower navigation pane showing tasks to be performed on objects

PARADE COLLEGE Mathematics Methods 3&4-CAS Probability Analysis SAC 2

Structured PVA Historical essay: for example history of protection of Everglades

Code Documentation MFA (Movable Finite Automata) Eric Klemchak CS391/CS392

Games! June Seven Mathematical Games. HtRaMTC Paul Zeitz,

Sample unit. At the Eco Zoo VISIT THE ANIMALS! UNIT Listen and number Read and match. Listen and check. 10 ten. lion. bear.

How Mosquitoes Grow. Observation Journal. Name:

PROBLEM SOLVING. (2) Cross out one digit in the number 1829 so that you get the smallest possible number.

STATISTICAL REPORT. Preliminary Analysis of the Second Collaborative Study of the Hard Surface Carrier Test

Primary Activity #1. The Story of Noir, the Black-footed Ferret. Description: Procedure:

The Ecology of Lyme Disease 1

Moose And Wolves Of Isle Graph Answers

Interpreting graphs and charts

Introducing and using InterHerd on the farm

Lab 6: Energizer Turtles

Lesson Objectives. Core Content Objectives. Language Arts Objectives

Graphics libraries, PCS Symbols, Animations and Clicker 5

Scratch Programming Lesson One: Create an Scratch Animation

Evolution and Selection

The Kaggle Competitions: An Introduction to CAMCOS Fall 2015

STUDYING PEDIGREES ACTIVITY

Relationship Between Eye Color and Success in Anatomy. Sam Holladay IB Math Studies Mr. Saputo 4/3/15

Transcription:

Math 290: L A TEXSeminar Week 10 Justin A. James Minnesota State University Moorhead jamesju@mnstate.edu March 22, 2011 Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 1 / 33

1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 2 / 33

Outline PST-FUNC 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 3 / 33

Getting Func-y! PST-FUNC Our goal this week is to learn to use some powerful L A TEX macros to graph without having to do as much work as we did with standard postscript commands. We will need two to use two new packages to do this. Start a document and put this in the preamble. \usepackage{pst-func,pst-3dplot,graphicx} including pst-func will load the following packages: pst-plot, pstricks, pstricks-add, pst-math, and pst-xkey. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 4 / 33

Outline Using pst-plot 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 5 / 33

Using pst-plot A Blast From the Past: Recall that back in week 6, we used the following commands to graph the function 1 12 x4 1 6 x3 3x 2 1: \pscurve[linewidth=1.2pt,arrowsize=10pt]{<->} (-6.27,10)(-5.95,6.547)(-4.89,-1.10)(-3.56,-3.624) (-2,-2.06667)(0,-.2)(1.277,-1.203)(3,-5.15)(4.04,-7.76) (5.06,-8.954)(5.745,-8.17)(6.81,-2.72)(7.234,1.425) (7.65,6.99)(7.8,10) If we add this command to postscript commands for the large grid (see the files from week 6), we get the following graph: Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 6 / 33

A Better Way? Using pst-plot Enter the following text into your document and build: \scalebox{.3}{\begin{pspicture}(-10,-50)(10,50) \psplot[algebraic,plotstyle=curve]{-10}{10} {1/(12)*x^4-1/6*x^3-3*x^2-1} \end{pspicture}} This is not exactly what we were looking for... Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 7 / 33

Hey Jude... Using pst-plot We will now add some additional commands to make our graph a bit better. Just before \begin{pspicture} type \psset{xunit=1cm,yunit=.2cm} Now after the plot command type \psaxes(0,0)(-10,-50)(10,50) Now let s adjust the axes a bit. Change the command to read \psaxes[dx=1,dy=5](0,0)(-10,-50)(10,50) This is a step in the right direction, but there is still a problem. Our function runs right off of our grid. We can use the clip command to stop this. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 8 / 33

More Commands Using pst-plot Before the line with the psplot command on it, type \begin{psclip}{\pspolygon[linestyle=none](-10,-50) (10,-50)(10,50)(-10,50)} After the psplot command type \end{psclip} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 9 / 33

Using pst-plot What Do These Commands Do? Let s look at each of these commands in detail. \psplot[algebraic] allows you to graph nearly any curve your interested in. Even if it isn t an algebraic curve. For example we could plot sin(x) and cos(x) if we wanted to. The commands for psplot are as follows: \psplot[options]{xmin}{xmax}{f(x)} \psset{options} allows you to set values of certain commands until another psset command is entered. We used it to set the length of 1 unit in the x and y directions. \psaxes[options](x0,y0)(xmin,ymin)(xmax,ymax) gives axes centered at (x0,y0) with the minimums and maximums as described. The commands Dx and Dy allow us to change the increment of each axis. The default for these is 1. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 10 / 33

Clipping Using pst-plot The syntax for the clip commands is as follows: \begin{psclip}{control object} object to be clipped \end{psclip} This commands allows you to clip an object so that all that you see of the object is inside of the control object. In our example we created a rectangle using pspolygon to clip our object. The rectangle covers the entire coordinate grid. We can use any object to clip. See what happens when you delete the last point of the polygon. Now remove the linestyle command. This will show you what this command was doing. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 11 / 33

Outline Some Interesting Examples 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 12 / 33

Some Interesting Examples I always feel like somebody s watching me Here is a cool example that Dr. Goyt designed: Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 13 / 33

Some Interesting Examples I always feel like somebody s watching me Here is the code for this example: \begin{center} \psset{xunit=1cm,yunit=1cm} \begin{pspicture}(0,0)(4,4) \begin{psclip}{\psellipse(1,2)(.5,1)} \pscircle*[linecolor=blue](1,1){1} \end{psclip} \psellipse(1,2)(.5,1) \begin{psclip}{\psellipse(3,2)(.5,1)} \pscircle*[linecolor=blue](3,1){1} \end{psclip} \psellipse(3,2)(.5,1) \parabola[arrows=)-(](0,1)(2,0) \end{pspicture} \end{center} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 14 / 33

Outline 3D Examples 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 15 / 33

3D 3D Examples Here is a fun 3D graphic: z x y Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 16 / 33

The Code: 3D Examples \begin{pspicture}(-2,-1)(1,2) \psset{unit=1cm} \pstthreedcoor[ linewidth=1.5pt,linecolor=blue, xmin=-1,xmax=2,ymin=-1,ymax=2, zmin=-1,zmax=2] \pstthreedellipse[linecolor=green] (1,0.5,0.5)(-0.5,0.5,0.5)(0.5,0.5,-1) \pstthreeddot(1,.5,.5) \pstthreeddot(-.5,.5,.5) \pstthreeddot(.5,.5,-1) \end{pspicture} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 17 / 33

More 3D 3D Examples Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 18 / 33

More 3D 3D Examples Code: \begin{center} \begin{pspicture}(-3,0)(3,6) \pstparaboloid[showinside=false]{3}{2} \pstthreedsphere(0,0,4){1} \end{pspicture} \end{center} \end{frame} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 19 / 33

Outline Practice Examples 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 20 / 33

Practice Examples Let s Try Some Examples Let s begin by graphing a few functions. Try graphing sin and cos on the same coordinate axes. Graph them from 2π to 2π. \begin{pspicture}(-7,-2)(7,2) \psplot[algebraic]{-6.283}{6.283}{sin(x)} \psplot[algebraic]{-6.283}{6.283}{cos(x)} \end{pspicture} Now add some axes of appropriate length. Make the sin curve red and the cos curve blue. Now change the psaxes command to psgrid. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 21 / 33

Grids Practice Examples There are many options that can be used with psgrid. Add the following options to the command [subgriddiv=1,griddots=10,gridlabels=0] subgriddiv=# determines the number of subdivisions of the grid. The default is 5. griddots=# determines the number of dots to use between ticks. The default is 0, which gives a solid line. gridlabels=# determines the size of the labels. 0 gets rid of them altogether. Try modifying the previous command to change how the grid on your example looks. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 22 / 33

Parametrized Curves Practice Examples To graph a parametrized curve the notation changes slightly. Suppose we want to use sin and cos to graph a parameterized circle. To your current code add the line: \parametricplot[algebraic,linecolor=green] {-3.14}{3.14}{2*cos(t) 2*sin(t)} There should now be a green circle of radius 2 on your grid. Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 23 / 33

Practice Examples A Graphic to Depict the Area Under a Curve Suppose you want to shade the area under a curve for integrating. Let s use the curve x from 1 to 9. Graph this with a set of coordinate axes. Make your picture from (-1,-1) to (10,4). You 4 should have: 3 2 1 1 1 1 2 3 4 5 6 7 8 9 10 Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 24 / 33

Shading Practice Examples Now, let s use the psclip option to shade it. Replace your code by: \begin{pspicture}(-1,-1)(10,4) \begin{psclip}{ \psplot[algebraic]{0}{10}{sqrt(x)}} \pspolygon*[linecolor=gray](1,0)(9,0)(9,4)(1,4) \end{psclip} \psaxes(0,0)(-1,-1)(10,4) \end{pspicture} 4 3 2 1 1 1 1 2 3 4 5 6 7 8 9 10 Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 25 / 33

The Rest Practice Examples We have not yet shaded in the entire area. To fill in the rest we ll use another pspolygon. Add the following to your code: \pspolygon*[linecolor=gray](1,0)(9,0)(9,3)(1,1) 4 3 2 1 1 1 1 2 3 4 5 6 7 8 9 10 Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 26 / 33

Solid of Revolution Practice Examples What if we want to draw a picture of the washer method for finding the volume of the solid formed by revolving the function f(x) = x around the x-axis. It would look as follows: 3 2 1 1 2 3 4 5 6 7 8 Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 27 / 33

The Code Practice Examples The code for the object on the previous slide is: \begin{pspicture}(-1,-1)(10,4) \psaxes[arrows=<->](0,0)(-1,-1)(9,4) \psvolume[fillstyle=solid,fillcolor=red] (0,9){10}{x sqrt} \psline[arrows=->](9,0)(10,0) \end{pspicture}} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 28 / 33

Outline 3 Dimensions 1 PST-FUNC 2 Using pst-plot 3 Some Interesting Examples 4 3D Examples 5 Practice Examples 6 3 Dimensions Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 29 / 33

A Sphere 3 Dimensions The pst-3dplot allows us to graph in 3 dimensions. Try the following code. \begin{pspicture}(-4,-4)(4,4) \pstthreedcoor \pstthreedsphere(0,0,0){3} \end{pspicture} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 30 / 33

A Helix 3 Dimensions We can also do parametric plots in 3D. z x y Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 31 / 33

The Code 3 Dimensions The Code for the Helix in the Previous Page. \begin{pspicture}(-4,-4)(4,4) \pstthreedcoor[xmin=-2,xmax=2,ymin=-2, ymax=2,zmin=-1,zmax=4] \parametricplotthreed[xplotpoints=200, plotstyle=curve,algebraic,linewidth=1.5pt] (0,12.564){cos(t) sin(t) t/4} \end{pspicture} Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 32 / 33

3 Dimensions Some Resources Here is a list of links to websites that have useful information about using pst-plot. (Follow the links embedded in the posted.pdf file for this week) General PSTricks Some Pst-Plot without the algebraic option Pst-Plot with the algebraic option pst-3dplot Justin A. James Minnesota State University Moorhead Mathjamesju@mnstate.edu 290: LATEXSeminar Week () 10 March 22, 2011 33 / 33