-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
115 lines (105 loc) · 6.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Michell Structures</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="dependencies/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="dependencies/flat-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="dependencies/jquery-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="main.css"/>
<script type="text/javascript" src="dependencies/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="dependencies/jquery-ui.min.js"></script>
<script type="text/javascript" src="dependencies/flat-ui.min.js"></script>
<script type="text/javascript" src="dependencies/three.js"></script>
<script type="text/javascript" src="dependencies/underscore-min.js"></script>
<script type="text/javascript" src="js/threeView.js"></script>
<script type="text/javascript" src="js/solveGeo.js"></script>
<script type="text/javascript" src="js/MethodOfJoints.js"></script>
<script type="text/javascript" src="js/node.js"></script>
<script type="text/javascript" src="js/beam.js"></script>
<script type="text/javascript" src="js/force.js"></script>
<script type="text/javascript" src="js/plot.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<!--resize="true"-->
<a id="logo" target="_blank" href="http://cba.mit.edu/">
<img src="logo.png"/>
<img id="activeLogo" src="logo-active.png"/>
</a>
<div id="threeDiv"></div>
<div id="lengthControl">
<div>
Length = <input id="lValInput" value="" placeholder="" class="form-control" type="text">
<div id="L" class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
</div>
</div>
<div id="hControl">
<div>
<span class="rotate" >Height = <input id="hValInput" value="" placeholder="" class="form-control" type="text"></span>
<div id="h" class="flat-slider ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"></div>
</div>
</div>
<div id="rainbow" class="scaleBars"></div>
<div id="tension-compressionScale" class="scaleBars"></div>
<div id="controls">
<a id="about" href="#" class="btn btn-lg btn-default">About</a><br/>
<span id="gammaDisplay">γ<span id="gammaPrescaled"> (prescaled)</span>: <span id="gamma"></span></span><br/>
<span class="label-slider">n : </span><div id="n" class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<input id="nInput" value="" placeholder="" class="form-control int" type="text"><br/>
<span class="label-slider">scale X : </span><div id="scaleX" class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<input id="xScaleInput" value="" placeholder="" class="form-control" type="text"><br/>
<span class="label-slider">scale Y : </span><div id="scaleY" class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<input id="yScaleInput" value="" placeholder="" class="form-control" type="text"><br/>
<div id="viewModeSelection">
<label class="radio">
<input name="viewMode" value="none" data-toggle="radio" class="custom-radio" type="radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Geometry
</label>
<label class="radio">
<input name="viewMode" value="length" data-toggle="radio" class="custom-radio" type="radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Beam Length
</label>
<label class="radio">
<input name="viewMode" value="force" data-toggle="radio" class="custom-radio" type="radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Internal Forces
</label>
<label class="radio">
<input name="viewMode" value="FL" data-toggle="radio" class="custom-radio" type="radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Force x Length
</label>
<label class="radio">
<input name="viewMode" value="tension-compression" data-toggle="radio" class="custom-radio" type="radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Tension/Compression
</label>
</div>
Applied Force Direction (XY):<br/><input id="xForce" value="" placeholder="" class="form-control" type="text"> <input id="yForce" value="" placeholder="" class="form-control" type="text"><br/>
<br/>
Applied Force Magnitude (N): <input id="magForce" value="" placeholder="" class="form-control" type="text">
<br/>
<span id="FLContainer">Σ | F<sub>i</sub> L<sub>i</sub> | = <span id="FL"></span> Nm</span>
</div>
<div id="moreInfo"></div>
<div id="unsolvable"><div>UNSOLVABLE</div></div>
<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<p>This simulation visualizes geometric properties and static internal forces in a loaded Michell cantilever anchored at two points.
Michell geometry is parameterized by total length (Length), distance between attachment points (Height), and number of truss layers (n) - additional x and y scaling may be applied.
Internal static forces are calculated using the <a href="https://en.wikibooks.org/wiki/Statics/Method_of_Joints" target="_blank">method of joints</a>.
<br/><br/>
Drag on the applied force to change its magnitude and direction.
Use the sliders to adjust geometric parameters of the Michell truss.
Mouse over a beam to see more information about its properties.
<br/><br/>
Built by <a href="http://www.amandaghassaei.com/" target="_blank">Amanda Ghassaei</a> as a homework assignment for <a href="https://architecture.mit.edu/subject/fall-2016-4450" target="_blank">Computational Structural Design and Optimization</a>.
Code available on <a href="https://github.com/amandaghassaei/MichellStructures" target="_blank">Github</a>.
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</body>
</html>