Parametric plot maker in Snap!

Project

Explanations of Graphing menus

Which one would you like to define?

  • Custom function: Defines a function using the Snap*!* Expression and saves the input converted to blocks into the ‘Custom Function Definitions’ list.
  • Graph function: Plots a parametric graph using the ‘Custom Function Definitions’ list that you’ve defined.
    • ‘Enter item number to plot. (x(t)-position)’: Enter the item number existing in the ‘Custom Function Definitions’ list to set the definition of x(t).
    • ‘Enter item number to plot. (y(t)-position)’: Enter the item number existing in the ‘Custom Function Definitions’ list to set the definition of y(t).
    • ‘Enter the Snap! Expression syntax to set the starting point of t-value.’: Enter the Snap! Expression syntax to set the starting point of t-value.
    • ‘Enter the Snap! Expression syntax to set the ending point of t-value.’: Enter the Snap! Expression syntax to set the ending point of t-value.
    • ‘Enter the interval count.’: Enter the interval count to draw the graph.

Tips for writing the Snap! Expression Syntax

Replace the [parameters] into the actual parameter names.

  • To write 1+2: (+ 1 2 [parameters])
  • To write 10-2: (- 10 2 [parameters])
  • To write 5\times2: (* 5 2 [parameters])
  • To write 6\div3: (/ 6 3 [parameters])
  • To write 8^2: (^ 8 2 [parameters])
  • Get variables
    • To get the variable named definitions: (get definitions [parameters])
    • To get the variable named function items: (get "function items" [parameters])
  • To write -x(Negation of x): (fn [neg] (get x) [parameters])
  • To write \sqrt{x}(Square root of x): (fn [sqrt] (get x) [parameters])
  • To write \pi: (pi)
  • To write \sin x: (fn [sin] (get x) [parameters])(Any trigonometric functions (\sin, \cos, \tan) are supported)
  • To write \sin^{-1} x: (fn [asin] (get x) [parameters])(Any trigonometric functions (\sin^{-1}, \cos^{-1}, \tan^{-1}) are supported)
  • To write e^x: (fn [e^] (get x) [parameters])
  • To write |x|: (fn [abs] (get x) [parameters])
  • Get specific item in specific list
    • To get the first item of list definitions: (item 1 (get definitions) [parameters])
    • To get the last item of list function items: (item [last] (get "function items") [parameters])
  • Calling functions
    • To write f(x): (call (get f) : (items (get x)) [parameters])
    • To write g(x,y): (call (get g) : (items (get x) (get y)) [parameters])

Examples

Adding soon!

Final description

If the info is not enough or has the typo, Explain it to me, I will enhance it.

If you want to test the reporter, run on this project. The functions are described in the top.