{"__browser":{"country":"US","device":"unknown_device","mobile":false,"name":"unknown browser","platform":"unknown_platform","version":"0"},"__constants":{},"__CPDATA":{"domain_iframe":"https://cdpn.io","environment":"production","host":"codepen.io","iframe_allow":"accelerometer *; ambient-light-sensor *; camera *; display-capture *; encrypted-media *; geolocation *; gyroscope *; microphone *; midi *; payment *; serial *; vr *; web-share *; xr-spatial-tracking *","iframe_sandbox":"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"},"__graphql":{"data":{"data":{"sessionUser":{"id":"VoDkNZ","name":"Captain Anonymous","title":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","currentContext":{"id":"VoDkNZ","title":"Captain Anonymous","name":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","username":"anon","__typename":"User"},"currentTeamId":null,"username":"anon","admin":false,"anon":true,"pro":false,"verified":false,"featureFlags":[],"teams":[],"__typename":"User"}}},"url":"https://codepen.io/graphql","api":"cprails"},"__user":{"anon":true,"base_url":"/anon/","cohorts":[],"current_team_hashid":null,"current_team_id":0,"hashid":"VoDkNZ","id":1,"itemType":"user","name":"Captain Anonymous","paid":false,"tier":0,"username":"anon","created_at":null,"email_verified":null,"collections_count":0,"collections_private_count":0,"followers_count":0,"followings_count":0,"pens_count":0,"pens_private_count":0,"projects_count":0,"projects_private_count":0},"__firebase":{"config":{"apiKey":"AIzaSyBgLAe7N_MdFpuVofMkcQLGwwhUu5tuxls","authDomain":"codepen-store-production.firebaseapp.com","databaseURL":"https://codepen-store-production.firebaseio.com","disabled":false,"projectId":"codepen-store-production"},"token":"eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImNsYWltcyI6eyJvd25lcklkIjoiVm9Ea05aIiwiYWRtaW4iOmZhbHNlfSwiZXhwIjoxNzQ4MDgxNTUxLCJpYXQiOjE3NDgwNzc5NTEsImlzcyI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlZvRGtOWiJ9.RmBKmesqIj8o_k5VvLQLloTSgfWhx-_Kk9kD0iz5JbsDVgM9SeEEa3HIi43mosAmMUq0z-S5PDl1Qss61J5uRYbMqqEfsiLOGX_KU-Yt1rnCZwfCpaGVBipfpW9NqSsr_5eKisKl3EVcgOt4Rx_gxIxwsrYie0dqu5DgFQQwXzlxB6tMFZ8VuNZbhI206ke9mSvFB8ZS4hExBENsNBytiEyneSC72YcNXztTjAfjUQykb0oXsqmplnW0AlBt5PHJ3b7cRiY7PsF9ItdgMyIQyQtfW4nUuc_QaBIMCnO2Aqtl3rFaztq5mMCIZvtTvGavzepwpJmw-3hWsX88C-nZIQ"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__item":"{\"id\":55720519,\"user_id\":4559259,\"html\":\"\",\"css\":\"\",\"js\":\"\\/\\/mathober day 6 - tetrahedron\\nlet tArray = [];\\nn = 1;\\nfunction setup() {\\n createCanvas(windowWidth, windowHeight);\\n angleMode(DEGREES);\\n stroke(255);\\n strokeWeight(0.5);\\n w = min(width, height) \\/ 3;\\n tArray.push(new tetraP(0, w, 0, 0, 0));\\n}\\nfunction draw() {\\n t = 360 * sin(frameCount \\/ 10);\\n background(0, 0, 0);\\n translate(width \\/ 2, height \\/ 2);\\n for (let i = 0; i < n; i++) {\\n tArray[i].move(t);\\n tArray[i].display();\\n }\\n}\\n\\nfunction tgraph() {\\n x1 = w * sin(t) * sin(t) + w \\/ 5;\\n y1 = w * cos(t) * cos(t) + w \\/ 5;\\n x2 = w * sin(t + 90) * cos(t + 90) - w \\/ 5;\\n y2 = w * sin(t + 90) * sin(t + 90) - w \\/ 5;\\n x3 = w * sin(t + 45) * cos(t + 45);\\n y3 = w * cos(t + 45) * sin(t + 45);\\n x4 = w * cos(t) * sin(t) - w \\/ 3;\\n y4 = w * sin(t) * sin(t) - w \\/ 3;\\n circle(x1, y1, 10);\\n circle(x2, y2, 10);\\n circle(x3, y3, 10);\\n circle(x4, y4, 10);\\n stroke(255);\\n line(x1, y1, x2, y2);\\n line(x3, y3, x2, y2);\\n line(x4, y4, x2, y2);\\n line(x4, y4, x3, y3);\\n line(x1, y1, x4, y4);\\n line(x1, y1, x3, y3);\\n}\\nfunction mousePressed() {\\n r = random(0, 360);\\n c = random(10, w);\\n tArray.push(new tetraP(t, c, mouseX - width \\/ 2, mouseY - height \\/ 2, 0));\\n n++;\\n}\\n\\nclass tetraP {\\n constructor(t, w, tx, ty, r) {\\n this.w = w;\\n this.x1 = w * sin(t) * sin(t) + w \\/ 5;\\n this.y1 = w * cos(t) * cos(t) + w \\/ 5;\\n this.x2 = w * sin(t + 90) * cos(t + 90) - w \\/ 5;\\n this.y2 = w * sin(t + 90) * sin(t + 90) - w \\/ 5;\\n this.x3 = w * sin(t + 45) * cos(t + 45);\\n this.y3 = w * cos(t + 45) * sin(t + 45);\\n this.x4 = w * cos(t) * sin(t) - w \\/ 3;\\n this.y4 = w * sin(t) * sin(t) - w \\/ 3;\\n this.tx = tx;\\n this.ty = ty;\\n this.r = r;\\n }\\n move(t) {\\n this.x1 = this.w * sin(t + this.r) * sin(t + this.r) + this.w \\/ 5 + this.r;\\n this.y1 = this.w * cos(t + this.r) * cos(t + this.r) + this.w \\/ 5;\\n this.x2 = this.w * sin(t + 90 + this.r) * cos(t + 90 + this.r) - w \\/ 5;\\n this.y2 = this.w * sin(t + 90 + this.r) * sin(t + 90 + this.r) - w \\/ 5;\\n this.x3 = this.w * sin(t + 45) * cos(t + 45);\\n this.y3 = this.w * cos(t + 45) * sin(t + 45);\\n this.x4 = this.w * cos(t) * sin(t) - this.w \\/ 3;\\n this.y4 = this.w * sin(t) * sin(t) - this.w \\/ 3;\\n }\\n display() {\\n push();\\n translate(this.tx, this.ty);\\n rotate(t - this.w);\\n fill(255, 255, 255 + 100 * sin(t), 200 * abs(cos(t \\/ 2)));\\n triangle(this.x1, this.y1, this.x2, this.y2, this.x3, this.y3);\\n fill(25 + 100 * sin(t), 255, 255, 200 * abs(cos(t \\/ 2)));\\n triangle(this.x1, this.y1, this.x4, this.y4, this.x3, this.y3);\\n fill(255 * abs(cos(t \\/ 2)), 25, 255 + 100 * sin(t), 200 * abs(cos(t \\/ 2)));\\n triangle(this.x3, this.y3, this.x2, this.y2, this.x4, this.y4);\\n fill(255, 255 + 100 * sin(t), 25, 200 * abs(cos(t \\/ 2)));\\n triangle(this.x1, this.y1, this.x2, this.y2, this.x4, this.y4);\\n fill(255)\\n circle(this.x1,this.y1,5)\\n circle(this.x2,this.y2,5)\\n circle(this.x3,this.y3,5)\\n circle(this.x4,this.y4,5)\\n pop();\\n }\\n}\\nfunction keyPressed() {\\n frameCount = 0;\\n tArray = [];\\n n = 1;\\n setup();\\n}\\n\",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"none\",\"js_pre_processor\":\"none\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2021-10-06T17:47:29.446Z\",\"updated_at\":\"2021-10-06T23:13:16.741Z\",\"title\":\"tetraSpin\",\"description\":\"\",\"slug_hash\":\"GREVOBx\",\"head\":\"\",\"private\":false,\"slug_hash_private\":\"22c4e8a933ad9f7bd75076c127c02c67\",\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":1,\"pick\":false,\"popularity\":9,\"views_count\":41,\"pick_visible_at\":null,\"cpid\":\"017c56b7-a926-724d-a23b-49612c0fa0b0\",\"is_new_editor_pen\":false,\"access\":\"Public\",\"pen_hash\":null,\"hashid\":\"GREVOBx\"}"}