Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Project #504

Open
wants to merge 88 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
eb5b621
Add files via upload
Likhithasri224 Sep 13, 2022
872a8d0
Delete CS460_Assignment_01 (2).docx
Likhithasri224 Sep 13, 2022
278ba57
Add files via upload
Likhithasri224 Sep 13, 2022
36b9fcf
Delete .gitignore
Likhithasri224 Sep 13, 2022
b5611aa
Delete LICENSE
Likhithasri224 Sep 13, 2022
e22b0c8
Delete README.md
Likhithasri224 Sep 13, 2022
c8be7d8
Delete webgl-master.zip
Likhithasri224 Sep 13, 2022
d46fac7
Add files via upload
Likhithasri224 Sep 13, 2022
eae723c
Add files via upload
Likhithasri224 Sep 20, 2022
d2ee6ca
Add files via upload
Likhithasri224 Sep 20, 2022
4f553ea
Delete Assignment2_Likhitha Sri Vulasa.pdf
Likhithasri224 Sep 20, 2022
f5b8940
Add files via upload
Likhithasri224 Sep 20, 2022
b75692a
Delete Likhitha Sri Vulasa_ Assignment 2.pdf
Likhithasri224 Sep 20, 2022
cf11879
Delete ReadMe.txt
Likhithasri224 Sep 20, 2022
15d39ca
Delete index.html
Likhithasri224 Sep 20, 2022
4e9482e
Add files via upload
Likhithasri224 Sep 20, 2022
3f228f3
Add files via upload
Likhithasri224 Sep 27, 2022
0695424
Add files via upload
Likhithasri224 Oct 11, 2022
c47d503
Add files via upload
Likhithasri224 Oct 18, 2022
2a9b002
Add files via upload
Likhithasri224 Oct 27, 2022
ef4b52a
Delete index.html
Likhithasri224 Oct 27, 2022
115242a
Delete robot.js
Likhithasri224 Oct 27, 2022
ab6c1ab
Add files via upload
Likhithasri224 Oct 27, 2022
74dc06e
Add files via upload
Likhithasri224 Nov 4, 2022
fddf660
Add files via upload
Likhithasri224 Nov 8, 2022
76869b2
Delete Helper.js
Likhithasri224 Nov 8, 2022
d91399c
Delete Index.html
Likhithasri224 Nov 8, 2022
fadbfb5
Delete robot.js
Likhithasri224 Nov 8, 2022
ed46cc1
Add files via upload
Likhithasri224 Nov 8, 2022
2e6d288
Delete robot.js
Likhithasri224 Nov 8, 2022
1849605
Delete Index7.html
Likhithasri224 Nov 8, 2022
16ab823
Delete Helper.js
Likhithasri224 Nov 8, 2022
9e410e2
Add files via upload
Likhithasri224 Nov 8, 2022
a4e6370
Delete Helper.js
Likhithasri224 Nov 8, 2022
07b245b
Delete Index7.html
Likhithasri224 Nov 8, 2022
2c80a8a
Delete robot.js
Likhithasri224 Nov 8, 2022
3be3b3a
Add files via upload
Likhithasri224 Nov 8, 2022
b6adbca
Add files via upload
Likhithasri224 Nov 8, 2022
4c08314
Add files via upload
Likhithasri224 Nov 8, 2022
2d9330e
Add files via upload
Likhithasri224 Nov 22, 2022
c001bfd
Delete index.html
Likhithasri224 Nov 22, 2022
21d0ff9
Delete helper.js
Likhithasri224 Nov 22, 2022
58262e6
Delete robot.js
Likhithasri224 Nov 22, 2022
9e5d49f
Add files via upload
Likhithasri224 Nov 22, 2022
1daef27
Add files via upload
Likhithasri224 Nov 22, 2022
8c09e68
Add files via upload
Likhithasri224 Nov 29, 2022
2ebd2bd
Delete Index09.html
Likhithasri224 Nov 29, 2022
9f41f95
Delete dolphins.ply
Likhithasri224 Nov 29, 2022
ba5a040
Add files via upload
Likhithasri224 Nov 29, 2022
b382465
Delete Index9.html
Likhithasri224 Nov 29, 2022
2b201c5
Add files via upload
Likhithasri224 Nov 29, 2022
944619a
Delete Index09.html
Likhithasri224 Nov 29, 2022
0ae75de
Add files via upload
Likhithasri224 Nov 29, 2022
8f7c35e
Delete Dolphins.ply
Likhithasri224 Nov 29, 2022
c6f8cc8
Add files via upload
Likhithasri224 Nov 29, 2022
288a6bf
Delete Armadillo.ply
Likhithasri224 Nov 29, 2022
ed07e6b
Delete Index-9.html
Likhithasri224 Nov 29, 2022
da0ef40
Add files via upload
Likhithasri224 Nov 29, 2022
5c0eb5d
Add files via upload
Likhithasri224 Nov 29, 2022
f2939a2
Create test
Likhithasri224 Nov 30, 2022
cb15476
Add files via upload
Likhithasri224 Nov 30, 2022
f5726aa
Add files via upload
Likhithasri224 Nov 30, 2022
cb5f33a
Add files via upload
Likhithasri224 Nov 30, 2022
0e7061f
Add files via upload
Likhithasri224 Dec 9, 2022
76feaf5
Delete board.jpg
Likhithasri224 Dec 9, 2022
5369ebf
Delete helper.js
Likhithasri224 Dec 9, 2022
c56ab4a
Delete index10.html
Likhithasri224 Dec 9, 2022
2a308d7
Delete robo.ply
Likhithasri224 Dec 9, 2022
f62fac0
Delete sky.jpg
Likhithasri224 Dec 9, 2022
0973816
Delete robot.js
Likhithasri224 Dec 9, 2022
d6f3a9b
Add files via upload
Likhithasri224 Dec 9, 2022
b224309
Create test
Likhithasri224 Dec 9, 2022
5c444b9
Delete CS460_Assignment_10_Finish.pdf
Likhithasri224 Dec 9, 2022
b3b1b25
Delete airplane.gltf
Likhithasri224 Dec 9, 2022
138c90c
Delete airplane.ply
Likhithasri224 Dec 9, 2022
6eadafb
Add files via upload
Likhithasri224 Dec 9, 2022
e786f93
Delete airplane.png
Likhithasri224 Dec 9, 2022
e2085f8
Delete airplane_1.png
Likhithasri224 Dec 9, 2022
3ef99af
Delete converter.py
Likhithasri224 Dec 9, 2022
ae0210a
Delete galleon.ply
Likhithasri224 Dec 9, 2022
771fab1
Delete gltf.py
Likhithasri224 Dec 9, 2022
9d2983d
Delete hammerhead.ply
Likhithasri224 Dec 9, 2022
1301a9c
Delete index (2).html
Likhithasri224 Dec 9, 2022
cb60e4f
Delete verification.png
Likhithasri224 Dec 9, 2022
e80e31d
Create blank
Likhithasri224 Dec 22, 2022
f1d50ae
Add files via upload
Likhithasri224 Dec 22, 2022
b6a6a9c
Delete CS460_Final_Project_Report.pdf
Likhithasri224 Dec 22, 2022
45ceda8
Add files via upload
Likhithasri224 Dec 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 0 additions & 129 deletions .gitignore

This file was deleted.

Binary file added 02/Assignment-3.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_04.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_05.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_07__Copy_ (1).pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_08__Copy_.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_09.docx.pdf
Binary file not shown.
158 changes: 158 additions & 0 deletions 02/Index (1).html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="2113.5">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1">&lt;html&gt;</p>
<p class="p1"><span class="Apple-converted-space">  </span>&lt;head&gt;</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;meta charset="UTF-8" /&gt;</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;style&gt;</p>
<p class="p1"><span class="Apple-converted-space">      </span>html, body {<span class="Apple-converted-space"> </span></p>
<p class="p1"><span class="Apple-converted-space">        </span>background-color:#000;</p>
<p class="p1"><span class="Apple-converted-space">        </span>margin: 0;</p>
<p class="p1"><span class="Apple-converted-space">        </span>padding: 0;</p>
<p class="p1"><span class="Apple-converted-space">        </span>height: 100%;</p>
<p class="p1"><span class="Apple-converted-space">        </span>overflow: hidden !important; <span class="Apple-converted-space"> </span></p>
<p class="p1"><span class="Apple-converted-space">      </span>}</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;/style&gt;</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;script src="https://threejs.org/build/three.min.js" type="text/javascript"&gt;&lt;/script&gt;</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;script src="https://threejs.org/examples/js/controls/TrackballControls.js" type="text/javascript"&gt;&lt;/script&gt;</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;script&gt;</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>function getRandomColor() {</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>function getRandomRGB() {</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return Math.floor(Math.random()*256);</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return {color: `rgb(${getRandomRGB()}, ${getRandomRGB()}, ${getRandomRGB()})`};</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>function getRandomGeometry() {</p>
<p class="p1"><span class="Apple-converted-space">        </span>function getRandomCase() {</p>
<p class="p1"><span class="Apple-converted-space">        </span>return Math.floor(Math.random() * 5)</p>
<p class="p1"><span class="Apple-converted-space">        </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>switch(getRandomCase()) {</p>
<p class="p1"><span class="Apple-converted-space">          </span>case 0:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.RingGeometry(8, 20, 24);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>case 1:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.ConeGeometry(20, 40);<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>case 2:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.SphereGeometry(20, 40, 40);</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>case 3:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.OctahedronGeometry(20);</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>case 4:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.TorusKnotGeometry(20, 6, 48, 8);</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>case 5:</p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>return new THREE.BoxGeometry(10, 10, 10);</p>
<p class="p1"><span class="Apple-converted-space">        </span>}</p>
<p class="p1"><span class="Apple-converted-space">      </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>var global_counter = 0;</p>
<p class="p1"><span class="Apple-converted-space">      </span>window.onload = function() {</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>scene = new THREE.Scene();</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>fov = 75; /degrees corresponds to up and down that constitutes frustrum/</p>
<p class="p1"><span class="Apple-converted-space">        </span>ratio = window.innerWidth / window.innerHeight;</p>
<p class="p1"><span class="Apple-converted-space">        </span>zNear = 1;</p>
<p class="p1"><span class="Apple-converted-space">        </span>zFar = 10000;</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);</p>
<p class="p1"><span class="Apple-converted-space">        </span>camera.position.set( 0, 0, 500);</p>
<p class="p1"><span class="Apple-converted-space">        </span>renderer = new THREE.WebGLRenderer();</p>
<p class="p1"><span class="Apple-converted-space">        </span>renderer.setSize( window.innerWidth, window.innerHeight );</p>
<p class="p1"><span class="Apple-converted-space">        </span>document.body.appendChild(renderer.domElement );</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>geometry = new THREE.PlaneGeometry( 10000, 10000 );</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>material = new THREE.MeshBasicMaterial( {</p>
<p class="p1"><span class="Apple-converted-space">          </span>visible: false</p>
<p class="p1"><span class="Apple-converted-space">        </span>});</p>
<p class="p1"><span class="Apple-converted-space">        </span>invisible_plane = new THREE.Mesh( geometry, material);</p>
<p class="p1"><span class="Apple-converted-space">        </span>scene.add(invisible_plane);</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>renderer.domElement.onmousemove = function( e ){</p>
<p class="p1"><span class="Apple-converted-space">            </span>if(!e.shiftKey) return false;</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">            </span>pixel_coords = new THREE.Vector2( e.clientX, e.clientY);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">            </span>vp_coords = new THREE.Vector2(<span class="Apple-converted-space"> </span></p>
<p class="p1"><span class="Apple-converted-space">                        </span>( pixel_coords.x / window.innerWidth ) * 2 - 1, <span class="Apple-converted-space"> </span></p>
<p class="p1"><span class="Apple-converted-space">                        </span>-( pixel_coords.y / window.innerHeight ) * 2 + 1)<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">            </span>vp_coords_near = new THREE.Vector3( vp_coords.x, vp_coords.y, 0);</p>
<p class="p1"><span class="Apple-converted-space">            </span>raycaster = new THREE.Raycaster();</p>
<p class="p1"><span class="Apple-converted-space">            </span>raycaster.setFromCamera(vp_coords_near, camera);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">            </span>intersects = raycaster.intersectObject(invisible_plane);</p>
<p class="p1"><span class="Apple-converted-space">            </span>p = intersects[0].point;</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">            </span>geometry = getRandomGeometry();</p>
<p class="p1"><span class="Apple-converted-space">            </span>material = new THREE.MeshStandardMaterial(getRandomColor());</p>
<p class="p1"><span class="Apple-converted-space">            </span>cube = new THREE.Mesh( geometry, material);</p>
<p class="p1"><span class="Apple-converted-space">            </span>scene.add(cube);</p>
<p class="p1"><span class="Apple-converted-space">            </span>cube.position.set(p.x, p.y, p.z);</p>
<p class="p1"><span class="Apple-converted-space">            </span>global_counter++;</p>
<p class="p1"><span class="Apple-converted-space">            </span>console.log(global_counter);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">          </span>};</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>ambientLight = new THREE.AmbientLight( 0x404040 );</p>
<p class="p1"><span class="Apple-converted-space">        </span>scene.add( ambientLight );</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>light = new THREE.DirectionalLight( 0xd2ded2, 5.0);</p>
<p class="p1"><span class="Apple-converted-space">        </span>light.position.set( 20, 100, 20 );</p>
<p class="p1"><span class="Apple-converted-space">        </span>scene.add(light);</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>geometry = new THREE.BoxGeometry( 40, 40, 40);</p>
<p class="p1"><span class="Apple-converted-space">        </span>material = new THREE.MeshStandardMaterial(getRandomColor());</p>
<p class="p1"><span class="Apple-converted-space">        </span>cube = new THREE.Mesh( geometry, material);</p>
<p class="p1"><span class="Apple-converted-space">        </span>scene.add(cube);</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>controls = new THREE.TrackballControls( camera, renderer.domElement );</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>animate();</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>};</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>function animate() {</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>requestAnimationFrame( animate );</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>controls.update();</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">        </span>renderer.render( scene, camera);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space">      </span>};</p>
<p class="p1"><span class="Apple-converted-space">    </span>&lt;/script&gt;</p>
<p class="p1"><span class="Apple-converted-space">  </span>&lt;/head&gt;</p>
<p class="p1"><span class="Apple-converted-space">  </span>&lt;body&gt;&lt;/body&gt;</p>
<p class="p1">&lt;/html&gt;</p>
</body>
</html>
Loading