Skip to content

Instantly share code, notes, and snippets.

@ntbrock
Created March 15, 2019 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntbrock/b9713d1399fd3e8898d2cf9b76cb0e6e to your computer and use it in GitHub Desktop.
Save ntbrock/b9713d1399fd3e8898d2cf9b76cb0e6e to your computer and use it in GitHub Desktop.
IWP6 Sample of New JSON
{
"author": {
"email": "",
"name": "",
"organization": "",
"username": "winters@ncssm.edu"
},
"objects": [
{
"start": 0,
"stop": 100,
"change": 0.05,
"fps": 20,
"objectType": "time"
},
{
"xmin": 0,
"xmax": 0.1,
"ymin": -0.1,
"ymax": 0.1,
"xgrid": 0.01,
"ygrid": 0.01,
"objectType": "graphWindow"
},
{
"xmin": -0.1,
"xmax": 0.1,
"ymin": -0.1,
"ymax": 0.1,
"xgrid": 0.02,
"ygrid": 0.02,
"xunit": "meters",
"yunit": "meters",
"objectType": "window"
},
{
"text": "A red ball is connected to a spring which is fixed at the left side of the screen. ",
"objectType": "description"
},
{
"name": "m",
"text": "Mass of ball",
"initialValue": 0.5,
"units": "kg",
"hidden": false,
"objectType": "input"
},
{
"name": "k",
"text": "Spring Constant",
"initialValue": 10,
"units": "N/m",
"hidden": false,
"objectType": "input"
},
{
"name": "h",
"text": "Spring height",
"initialValue": 0.03,
"units": "m",
"hidden": true,
"objectType": "input"
},
{
"name": "a",
"text": "Amplitude",
"initialValue": 0.085,
"units": "m",
"hidden": false,
"objectType": "input"
},
{
"name": "p",
"text": "Phase",
"initialValue": 3.14,
"units": "rad",
"hidden": false,
"objectType": "input"
},
{
"name": "w",
"text": "Angular speed",
"units": "1/s",
"calculator": {
"calcType": "parametric",
"value": "(k/m)^.5"
},
"hidden": true,
"objectType": "output"
},
{
"name": "ball",
"shape": {
"shapeType": "circle",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": ".02"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": ".02"
}
},
"graphOptions": {
"graphVisible": true,
"initiallyOn": {
"xPos": true,
"xVel": true,
"xAccel": true,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": true,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 255,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "a*cos(w*t+p)"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "0"
}
},
"objectType": "solid"
},
{
"name": "pitch",
"text": "Spring pitch",
"units": "m",
"calculator": {
"calcType": "parametric",
"value": "(ball.xpos+0.1)/6"
},
"hidden": true,
"objectType": "output"
},
{
"name": "line1",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch/2"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "h/2"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "0"
}
},
"objectType": "solid"
},
{
"name": "line2",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "-h"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "0+h/2"
}
},
"objectType": "solid"
},
{
"name": "line3",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "h"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+3*pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "-h/2"
}
},
"objectType": "solid"
},
{
"name": "line4",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "-h"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+5*pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "h/2"
}
},
"objectType": "solid"
},
{
"name": "line5",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "h"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+7*pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "-h/2"
}
},
"objectType": "solid"
},
{
"name": "line6",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "-h"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+9*pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "h/2"
}
},
"objectType": "solid"
},
{
"name": "line7",
"shape": {
"shapeType": "line",
"vectors": {
"xVel": false,
"yVel": false,
"xAccel": false,
"yAccel": false,
"Vel": false,
"Accel": false
},
"width": {
"calculator": {
"calcType": "parametric",
"value": "pitch/2"
}
},
"height": {
"calculator": {
"calcType": "parametric",
"value": "h/2"
}
},
"graphOptions": {
"graphVisible": false,
"initiallyOn": {
"xPos": false,
"xVel": false,
"xAccel": false,
"yPos": false,
"yVel": false,
"yAccel": false
}
},
"isGraphable": false,
"drawTrails": false,
"drawVectors": false
},
"color": {
"red": 0,
"green": 0,
"blue": 0
},
"xpath": {
"calculator": {
"calcType": "parametric",
"value": "-.1+11*pitch/2"
}
},
"ypath": {
"calculator": {
"calcType": "parametric",
"value": "-h/2"
}
},
"objectType": "solid"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment