Skip to content

Instantly share code, notes, and snippets.

@ajayyy
ajayyy / iti1120_clean.py
Created October 15, 2019 17:58
Converts the sample tests into runnable commands for ITI 1120.
# These lines will get the inputs cleaned from
important_lines = [">>> "]
# Used if there is an input on the line after this
important_proceeding_lines = []
raw = ""
while True:
current_input = input()
var nDots = 7;
var Xpos = 0;
var Ypos = 0;
var DELTAT = .01;
var SEGLEN = 10;
var SPRINGK = 10;
var MASS = 1;
var GRAVITY = 50;
var RESISTANCE = 10;
//modified from http://ilkinulas.github.io/development/unity/2016/04/30/cube-mesh-in-unity3d.html
//modification adds the ability to specify an offset and size
void CreateCube(Vector3 offset, Vector3 size) {
Vector3[] vertices = {
new Vector3 (0, 0, 0),
new Vector3 (1, 0, 0),
new Vector3 (1, 1, 0),
new Vector3 (0, 1, 0),
new Vector3 (0, 1, 1),