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

https://fhwarsam.github.io/cs460student/Final_Project/CS460Intro.html #498

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5b2b86f
initial commit
fhwarsam Sep 13, 2022
5f2e53b
initial commit
fhwarsam Sep 13, 2022
be427f0
Edited in the class
fhwarsam Sep 16, 2022
1a0872e
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Sep 19, 2022
f6e0ff9
Ready for submission
fhwarsam Sep 20, 2022
8a1699c
assignment3 ready for submission
fhwarsam Sep 27, 2022
9996860
Assigment4 with PDF
fhwarsam Oct 11, 2022
c3bba54
Delete xtk.html
fhwarsam Oct 18, 2022
78b46cf
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Oct 19, 2022
2755a4e
half done
fhwarsam Oct 27, 2022
33d1ec3
completed
fhwarsam Oct 27, 2022
4ffb65a
Merge branch 'main' of https://github.com/fhwarsam/cs460student
fhwarsam Oct 27, 2022
8d071ff
Test commit
fhwarsam Oct 31, 2022
65d9e8d
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Nov 4, 2022
3f6ea43
assigment7 completed
fhwarsam Nov 8, 2022
a125406
Assignment 8 started
fhwarsam Nov 11, 2022
45c8de5
Assignment 8 started
fhwarsam Nov 11, 2022
62b7f88
Assignment 5 files from another repository to the CS460 repository
fhwarsam Nov 15, 2022
e00b904
Assignment 5 reload2
fhwarsam Nov 15, 2022
d885d27
Assignment 5 reload2
fhwarsam Nov 15, 2022
a52a2a8
changed xtk.html to index.html because GitHub expects index.html
fhwarsam Nov 15, 2022
a635768
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Nov 18, 2022
5c4ab52
Completed assignment 8
fhwarsam Nov 19, 2022
419bc68
Completed assignment 8
fhwarsam Nov 19, 2022
14fb0df
assignment 8 - error correction
fhwarsam Nov 19, 2022
6004e5f
assignment 8 - error correction
fhwarsam Nov 19, 2022
c1e4aaf
Update index.html
fhwarsam Nov 19, 2022
1038a94
Assigment 9 completed
fhwarsam Nov 29, 2022
9d3fc22
Merge branch 'main' of https://github.com/fhwarsam/cs460student
fhwarsam Nov 29, 2022
4c0abd2
Added pdf file
fhwarsam Nov 29, 2022
41524bb
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Dec 2, 2022
570a36c
Merge branch 'main' of https://github.com/bostongfx/cs460student
fhwarsam Dec 7, 2022
2098aba
New commit
fhwarsam Dec 22, 2022
f5aab6f
Update CS460Intro.html
fhwarsam Dec 22, 2022
72cdc6d
Update CS460Intro.html
fhwarsam Dec 22, 2022
ab774ce
xtk link issue fix
fhwarsam Dec 22, 2022
9f1a99c
Update CS460Intro.html
fhwarsam Dec 22, 2022
70c5745
Update CS460Intro.html
fhwarsam Dec 22, 2022
9fde201
Update CS460Intro.html
fhwarsam Dec 22, 2022
5b4d89c
Report included
fhwarsam Dec 22, 2022
96a1ac4
Merge branch 'main' of https://github.com/fhwarsam/cs460student
fhwarsam 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
188 changes: 188 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<! DOCTYPE html>

<html lan="en">

<head>
<meta charset="UTF-8">
<title> CS460 Assigment </title>


<style >
body{
background-color: black;
color:white;
font-family: sans-serif;
overflow: hidden !important;
}
#logo{
margin-top:10px;
margin-right:10px;

}
</style>
<script type="text/javascript" src="https://get.goXTK.com/xtk_edge.js"></script>
<script type="text/javascript">

window.onload = function(){
var r = new X.renderer3D();
r.init();

for(var i =0; i<1; i++){
var c10 = new X.cube();
c10.center=[22*i, -50, 0];
c10.color=[0,1,0];
r.add(c10);
}

for(var i =0; i<2; i++){
var c2 = new X.cube();
c2.center = [22*i, -75, 0];
c2.color=[0,1,0];
r.add(c2);
}
for(var i =0; i<2; i++){
var c3 = new X.cube();
c3.center=[-22*i, -75, 0];
c3.color=[0,1,0];
r.add(c3);
}


// Takes care of two of the three cubes
for(var i =0; i<3; i++){
var c3 = new X.cube();
c3.center=[-22*i, -100, 0];
c3.color=[0,1,0];
r.add(c3);
}
// Takes care of the
for(var i =0; i<2; i++){
var c4 = new X.cube();
c4.center=[-22*i+1, -100, 0];
c4.color=[0, 1, 0];
r.add(c4);

}





for(var i =0; i<4; i++){
var c5 = new X.cube();
c5.center=[-22*i, -125, 0];
c5.color=[0,1,0];
r.add(c5);
}

for(var i =0; i<3; i++){
var c5 = new X.cube();
c5.center=[22*i, -125, 0];
c5.color=[0,1,0];
r.add(c5);
}



for(var i =0; i<4; i++){
var c5 = new X.cube();
c5.center=[-22*i, -150, 0];
c5.color=[0,1,0];
r.add(c5);
}

for(var i =0; i<3; i++){
var c5 = new X.cube();
c5.center=[22*i, -150, 0];
c5.color=[0,1,0];
r.add(c5);
}




for(var i =0; i<5; i++){
var c5 = new X.cube();
c5.center=[-22*i, -175, 0];
c5.color=[0,1,0];
r.add(c5);
}
for(var i =0; i<5; i++){
var c6 = new X.cube();
c6.center=[22*i, -175, 0];
c6.color=[0,1,0];
r.add(c6);
}
for(var i =0; i<5; i++){
var c7 = new X.cube();
c7.center=[-22*i, -200, 0];
c7.color=[0,1,0];
r.add(c7);

}
for(var i =0; i<5; i++){

var c8 = new X.cube();
c8.center=[22*i, -200, 0];
c8.color=[0,1,0];
r.add(c8);
}

for(var i =0; i<2; i++){
var c9 = new X.cube();
c9.center=[22*i, -225, 0];
c9.color=[0,1,0];
r.add(c9);
}

for(var i =0; i<2; i++){
var c10 = new X.cube();
c10.center=[-22*i, -225, 0];
c10.color=[0,1,0];
r.add(c10);
}

for(var i =0; i<2; i++){
var c10 = new X.cube();
c10.center=[22*i, -250, 0];
c10.color=[0,1,0];
r.add(c10);
}

for(var i =0; i<2; i++){
var c10 = new X.cube();
c10.center=[-22*i, -250, 0];
c10.color=[0,1,0];
r.add(c10);
}

function animate(){
for(var i =0; i<1; i++){
var c10 = new X.cube();
c10.center=[22*i, -50, 0];
c10.color=[1,0,0];
r.add(c10);
}

}
setInterval(animate, 1000);

r.render();r.camera.position=[0,0, 1000];
r.render();
}

</script>
</head>
<body>

<h1> CS460 Assignment </h1>
<div id="logo">
<img src = "gfx/CS460.png" alt="No image">
</div>

</body>




</html>
14 changes: 14 additions & 0 deletions 03/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "msedge",
"request": "launch",
"name": "Open Untitled-1.html",
"file": "c:\\Users\\fhwarsam\\Desktop\\Untitled-1.html"
}
]
}
Binary file added 03/CS460_Assignment_03__Copy_.pdf
Binary file not shown.
120 changes: 120 additions & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style>
html, body{

background-color: #0000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;

};
</style>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Assignment_03 threejs</title>

<script src="https://threejs.org/build/three.min.js" type="text/javascript"></script>
<script src="https://threejs.org/examples/js/controls/TrackballControls.js" type="text/javascript"></script>

<script>

window.onload = function(){


// create scene as the first step
scene = new THREE.Scene();

var fov =75;
var ratio = window.innerWidth / window.innerHeight;
var zNear = 1;
var zFar = 10000;

camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);
camera.position.set(0,0,100);

// rendering Starts here
renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

geometry= new THREE.PlaneGeometry(10000, 10000);
material = new THREE.MeshBasicMaterial({visible:false});
invisible_plane = new THREE.Mesh(geometry, material);
scene.add(invisible_plane);

renderer.domElement.onclick = function(e){
console.log("Yay We Clicked");
pixel_coords = new THREE.Vector2(e.clientX, e.clientY);
console.log('pixel coords', pixel_coords)
vp_coords = new THREE.Vector2(( pixel_coords.x / window.innerWidth ) * 2 - 1,
-( pixel_coords.y / window.innerHeight ) * 2 + 1);
console.log('Viewport coords', vp_coords);
vp_coords_near = new THREE.Vector3(vp_coords.x, vp_coords.y);
raycaster = new THREE.Raycaster();

raycaster.setFromCamera(vp_coords_near, camera);
intersect = raycaster.intersectObject(invisible_plane);
console.log('Ray to plane', intersect[0].point);

for(i = 1; 1<=10; i++){
p=intersect[0].point;

geometry = new THREE.BoxGeometry(20, 20, 20);
material = new THREE.MeshStandardMaterial({color:0xffff1111});
cube = new THREE.Mesh(geometry, material);
scene.add(cube);

cube.position.set(p.x, p.y, p.z);


//p2=intersect[1].point;
geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 );
material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
torusKnot = new THREE.Mesh( geometry, material );
scene.add( torusKnot );
cube.position.set(p.x+4, p2.y*3, p2.z*1);

sphere = new THREE.SphereGeometry( 15, 32, 16 );
material = new THREE.MeshBasicMaterial( { color: 0xffffff } );
sphere = new THREE.Mesh( geometry, material );
scene.add( sphere );
sphere.position.set(p.x+4, p2.y*3, p2.z*1);

};
};
// adds canvas to the page ui=sing the append child method of document


// Setting up the light using Ambient light
ambientLight = new THREE.AmbientLight(0x404040);
// add the light to the scene
scene.add(ambientLight);

//Directional light with positions setup
light = new THREE.DirectionalLight(0xffffff, 5.0);
light.position.set(10, 100, 10);
scene.add(light);

// build shapes starting with geometry, cube in this case. BoxeBufferGeometry from THREEJS gives few shapes


//setup interactions
controls = new THREE.TrackballControls(camera, renderer.domElement);

animate();

};
function animate(){
requestAnimationFrame(animate);
controls.update();
renderer.render(scene,camera);
};

</script>
</head>
<body></body>
</html>
Binary file added 04/CS460_Assignment_04__Copy_.pdf
Binary file not shown.
Loading