-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.php
More file actions
45 lines (40 loc) · 2.16 KB
/
Copy pathplot.php
File metadata and controls
45 lines (40 loc) · 2.16 KB
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
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="icon" href="favicon.png" type="image/png"/>
<script src="vendor/aframe-0.8.0/aframe.min.js"></script>
<script src="vendor/aframe-line-component-1.0.1/aframe-line-component.min.js"></script>
<script src="vendor/jquery-3.3.1/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%7CRoboto+Mono" media="all" /><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%7CRoboto+Mono" media="all" /><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%7CRoboto+Mono" media="all" /></head>
<body class="a-body " cz-shortcut-listen="true">
<a-scene id="frame" class="fullscreen" inspector="" keyboard-shortcuts="" screenshot="" vr-mode-ui=""><canvas class="a-canvas" data-aframe-canvas="true" width="269" height="134"></canvas>
<a-entity position="0 1 2">
<a-entity camera look-controls wasd-controls="fly:true"></a-entity>
</a-entity>
<a-cylinder color="#FFC65D" material="color:#000000" geometry="radius:0.01;height:10"></a-cylinder>
<a-plane rotation="-90 0 0" material="opacity:0.5;" geometry="width:10;height:10"></a-plane>
<a-sky color="#ECECEC" material="" geometry=""></a-sky>
</a-sphere></a-scene>
<script type="text/javascript">
var demo = document.getElementById('frame')
var points = new Array();
var x = 0;
var y = 0;
var z = x + y;
var i =0;
for( x = -10; x < 10 ; x = x+ 0.25){
for(y = -10; y < 10 ; y= y +0.25){
// z = 5*Math.exp(-Math.pow(x,2) -Math.pow(y,2));
z = <?php echo $_GET['exp']; ?> ;
points[i] = x.toString() + " " +z.toString() + " " + y.toString();
i++;
}
}
for(j=0; j < points.length ; j++){
var newSpan = document.createElement('a-sphere');
newSpan.setAttribute('position', points[j]);
newSpan.setAttribute('radius', "0.1");
newSpan.setAttribute('color', "tomato");
demo.appendChild(newSpan);
}
console.log(points);
</script>
</body></html>