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 done! #507

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5b4287f
Add files via upload
NaveenMuthusamy94 Sep 12, 2022
c4a15e1
Delete Naveen_CS460_Assignment_01.pdf
NaveenMuthusamy94 Sep 12, 2022
9a755be
Add files via upload
NaveenMuthusamy94 Sep 12, 2022
b79b18f
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
20a8811
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
32843e7
Delete index.html
NaveenMuthusamy94 Sep 20, 2022
a56a05d
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
e56983c
Delete index.html
NaveenMuthusamy94 Sep 20, 2022
ba0ff04
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
04a5db0
Delete index.html
NaveenMuthusamy94 Sep 20, 2022
3cbf44d
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
0c60a9b
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
a909980
Add files via upload
NaveenMuthusamy94 Sep 20, 2022
dc5ef2d
Add files via upload
NaveenMuthusamy94 Sep 27, 2022
827de08
Add files via upload
NaveenMuthusamy94 Sep 27, 2022
037c06e
Add files via upload
NaveenMuthusamy94 Oct 9, 2022
d69c1a3
Add files via upload
NaveenMuthusamy94 Oct 11, 2022
4e5b5ea
Add files via upload
NaveenMuthusamy94 Oct 11, 2022
383c32f
Add files via upload
NaveenMuthusamy94 Oct 11, 2022
f4e7523
Add files via upload
NaveenMuthusamy94 Oct 11, 2022
151f014
Add files via upload
NaveenMuthusamy94 Oct 18, 2022
f66251a
Add files via upload
NaveenMuthusamy94 Oct 18, 2022
36ad63f
Merge branch 'bostongfx:main' into main
NaveenMuthusamy94 Oct 27, 2022
2fe9e32
Add files via upload
NaveenMuthusamy94 Oct 27, 2022
14bc0d3
Add files via upload
NaveenMuthusamy94 Oct 27, 2022
1a93096
Add files via upload
NaveenMuthusamy94 Oct 27, 2022
55abe67
Add files via upload
NaveenMuthusamy94 Oct 27, 2022
c8204d0
Merge branch 'bostongfx:main' into main
NaveenMuthusamy94 Nov 8, 2022
a1e032f
Add files via upload
NaveenMuthusamy94 Nov 8, 2022
03417ba
Add files via upload
NaveenMuthusamy94 Nov 8, 2022
bae5c65
Add files via upload
NaveenMuthusamy94 Nov 8, 2022
57b2dc4
Delete dhoom2.mp3
NaveenMuthusamy94 Nov 8, 2022
cdecd23
Add files via upload
NaveenMuthusamy94 Nov 8, 2022
b175328
Delete face.jfif
NaveenMuthusamy94 Nov 8, 2022
e0a5ff4
Create 08
NaveenMuthusamy94 Nov 22, 2022
ce9f07b
Delete 08
NaveenMuthusamy94 Nov 22, 2022
5374070
Add files via upload
NaveenMuthusamy94 Nov 22, 2022
a037dac
Add files via upload
NaveenMuthusamy94 Nov 22, 2022
95f05d8
Merge branch 'bostongfx:main' into main
NaveenMuthusamy94 Nov 28, 2022
c539326
Add files via upload
NaveenMuthusamy94 Nov 29, 2022
4b8e8fb
Add files via upload
NaveenMuthusamy94 Nov 29, 2022
9bd6ea5
Merge branch 'bostongfx:main' into main
NaveenMuthusamy94 Dec 9, 2022
8a484c8
Add files via upload
NaveenMuthusamy94 Dec 9, 2022
b3b9b96
Add files via upload
NaveenMuthusamy94 Dec 9, 2022
7a660a2
Final Project
Robertkevin96 Dec 22, 2022
f07ceaa
Delete Final Project directory
NaveenMuthusamy94 Dec 22, 2022
03a620c
Final Project
Robertkevin96 Dec 22, 2022
dcfdffa
Final Project
NaveenMuthusamy94 Dec 22, 2022
1146189
Report
NaveenMuthusamy94 Dec 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
92 changes: 92 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>CS460 Assignment 2</title>
<style>
body {
background-color: black;
color: white; /* font color */
font-family: sans-serif;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
}

#logo {
position: absolute;
right: 10px;
top: 10px;
}
</style>

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

<script type="text/javascript">

window.onload = function() {

// this gets called when the site is ready

// create a new scene and renderer
r = new X.renderer3D();
r.init();
const shape = new Array();
r.camera.position = [0, 0, 700];
// drawing the shape
for(var i=0; i<9; i++)
{
for (var j=0; j<9; j++)
{
var c = new X.cube();
if(i<3)
c.color = [0, 1, 0];
else if(i<6)
c.color = [1, 1, 1];
else
c.color = [1, 0.647, 0];
c.center = [25*j, 25*i, 0];
r.add(c);
shape.push(c);
}
}

// making the sakram blink
setInterval(function()
{
shape[30].color = [0, 0, 1];
shape[31].color = [0, 0, 1];
shape[32].color = [0, 0, 1];
shape[39].color = [0, 0, 1];
shape[40].color = [0, 0, 1];
shape[41].color = [0, 0, 1];
shape[48].color = [0, 0, 1];
shape[49].color = [0, 0, 1];
shape[50].color = [0, 0, 1];
}, 500);
setInterval(function()
{
shape[30].color = [1, 1, 1];
shape[31].color = [1, 1, 1];
shape[32].color = [1, 1, 1];
shape[39].color = [1, 1, 1];
shape[40].color = [1, 1, 1];
shape[41].color = [1, 1, 1];
shape[48].color = [1, 1, 1];
shape[49].color = [1, 1, 1];
shape[50].color = [1, 1, 1];
}, 1000);

// render everything!
r.render();

};

</script>
</head>
<body>
<h1>CS460 Assignment 2</h1>
<div id="logo"><img style="height:60px" src="gfx/cs460.png"></div>
</body>
</html>
Binary file added 03/Naveen_CS460_Assignment_03_.pdf
Binary file not shown.
167 changes: 167 additions & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<html>
<head>
<meta charset="UTF-8" />
<style>
html,
body {
background-color: #000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
}
</style>
<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>
var shapecount = 0;

// Generate random color

function randomizec() {
var rc =
"#" +
Math.floor(Math.random() * (256 * 256 * 256))
.toString(16)
.padStart(6, "0");
return rc;
}

// List of Shapes
const shapelist = [
"Box",
"TorusKnot",
"Octahedron",
"Sphere",
"Ring",
"Cone",
];

// get a random geometry
function randomizeg() {
var shape = Math.floor(Math.random() * shapelist.length);
return shapelist[shape];
}


window.onload = function () {
scene = new THREE.Scene();

fov = 75;
ratio = window.innerWidth / window.innerHeight;
zNear = 1;
zFar = 10000;
// console.log(ratio);
camera = new THREE.PerspectiveCamera(fov, ratio, zNear, zFar);
camera.position.set(0, 0, 100);

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

// light
ambientLight = new THREE.AmbientLight(0x404040);
scene.add(ambientLight);
light = new THREE.DirectionalLight(0xffffff, 5.0);
light.position.set(10, 100, 10);
scene.add(light);

// The invisible plane

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

invisible_plane = new THREE.Mesh(geometry, material);
scene.add(invisible_plane);
controls = new THREE.TrackballControls(camera, renderer.domElement);
animate();

// Onmouse move action

renderer.domElement.onmousemove = function (e) {
if (!e.shiftKey) {
e.preventDefault();
return false;
}

console.log("yes! you clicked!");

pixel_coords = new THREE.Vector2(e.clientX, e.clientY);

console.log("Pixel coordinates", pixel_coords);

vp_coords = new THREE.Vector2(
(pixel_coords.x / window.innerWidth) * 2 - 1,
-(pixel_coords.y / window.innerHeight) * 2 + 1
);
console.log("Viewport coordinates", vp_coords);

vp_coords_near = new THREE.Vector3(vp_coords.x, vp_coords.y, 0);

raycaster = new THREE.Raycaster();
raycaster.setFromCamera(vp_coords_near, camera);
intersects = raycaster.intersectObject(invisible_plane);
console.log("Ray to Invisible Plane", intersects[0].point);

// Object creation
function create_Object(geo) {
material = new THREE.MeshStandardMaterial({
color: randomizec(),
});
obj = new THREE.Mesh(geometry, material);
scene.add(obj);
p = intersects[0].point;
obj.position.set(p.x, p.y, p.z);
shapecount++;
console.log(`Number of shapes ${shapecount}`);
}

switch (randomizeg()) {
case "Box":
geometry = new THREE.BoxGeometry(10, 10, 10);
create_Object(geometry);
break;
case "TorusKnot":
geometry = new THREE.TorusKnotGeometry(10, 3, 64, 8);
create_Object(geometry);
break;
case "Octahedron":
geometry = new THREE.OctahedronGeometry(10);
create_Object(geometry);
break;
case "Sphere":
geometry = new THREE.SphereGeometry(10,20,20);
create_Object(geometry);
break;
case "Ring":
geometry = new THREE.RingGeometry(4, 10, 12);
create_Object(geometry);
break;
case "Cone":
geometry = new THREE.ConeGeometry(10, 20, 32);
create_Object(geometry);
break;
default:
console.log("hello");
}
};
};

function animate() {
requestAnimationFrame(animate);

controls.update();
renderer.render(scene, camera);
}
</script>
</head>
<body></body>
</html>
Binary file added 04/Naveen_CS460_Assignment_04_.pdf
Binary file not shown.
Loading