A function to draw flaps for a cut out and fold model.
Last active
December 24, 2017 00:12
-
-
Save tlfrd/0f646e4a6c7da975e63f805d8f43a40b to your computer and use it in GitHub Desktop.
Cut Out Tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script src="https://d3js.org/d3.v4.min.js"></script> | |
| <style> | |
| body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } | |
| </style> | |
| </head> | |
| <body> | |
| <script> | |
| var lineCoordinates = [[200, 200],[400, 300]]; | |
| var svg = d3.select("body").append("svg") | |
| .attr("width", 960) | |
| .attr("height", 500); | |
| var line = svg.append("line") | |
| .attr("x1", lineCoordinates[0][0]) | |
| .attr("y1", lineCoordinates[0][1]) | |
| .attr("x2", lineCoordinates[1][0]) | |
| .attr("y2", lineCoordinates[1][1]) | |
| .style("stroke", "black"); | |
| function generateCutOutFlap(line, distance, direction) { | |
| } | |
| </script> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment