Skip to content
/ FP2 Public
forked from oplS15projects/FP2

Explore another library! Due 2015-03-30

Notifications You must be signed in to change notification settings

rthok/FP2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

Final Project Assignment 2: Explore One More! (FP2)

DUE March 30, 2015 Monday (2015-03-30)

My Library: 1.4 Plotting Multiple 2D Renderers

Write what you did! Remember that this report must include:

  • a narrative of what you did

In this assignement, I worked with the graph plotting library. I made 2-dimensional two graphs. Each graph has two functions with tables that shows what color line corresponds to which function. The first graph plots the functions: y = 3x and y= x^2. This graph has the x and y axis going through the graph while the second graph doesn't. The second graph has the functions: cos(x) and sin(x). I've change the style of the line for the cos function so it is dotted instead of a solid line.

  • the code that you wrote
#lang racket

(require plot)

(define (double x)( * 2 x))
(define (square x)( * x x))
(define (triple x)( * 2 x))
 
;;(plot(function cos(- pi) pi #:label "y = cos(x)" ))

(plot (list(axes)
           (function square -2 2
                     #:label "y = x^2 "
                     #:color "red")
           (function triple -2 2 
                     #:label "y = 3x"
                     #:color "blue")))

(plot (list (function cos (- pi) pi
                      #:label "y = cos(x)"
                      #:color "black"
                      #:style 'dot)
            (function sin (- pi) pi
                      #:label "y = cos(x)"
                      #:color "green")))
   

  • output from your code demonstrating what it produced
  1. [Screen shot of the first graph] (rthok/image#2)
  2. [Screen shot of the second graph] (rthok/image#3)
  • any diagrams or figures explaining your work

The narrative itself should be no longer than 350 words. Yes, you can add more files and link or refer to them. This is github, handling files is awesome and easy!

Ask questions publicly in the Piazza group.

How to Do and Submit this assignment

  1. To start, fork this repository.
  2. Modify the README.md file and commit changes to complete your solution.
  3. (This assignment is just one README.md file, so you can edit it right in github without cloning)
  4. (You may need to clone and push if you want to add extra files)
  5. Create a pull request on the original repository to turn in the assignment.

About

Explore another library! Due 2015-03-30

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published