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 Complete #252

Open
wants to merge 94 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
7c1d990
Assignment 1 Finished.
Sep 8, 2019
07de9fe
Merge branch 'master' of https://github.com/bostongfx/cs460student
Sep 9, 2019
2a6f1d0
Milestone 1
Sep 9, 2019
37921ba
Milestone 2
Sep 9, 2019
80782ff
Milestone 3
Sep 9, 2019
41a858f
Milestone 3
Sep 9, 2019
497d8d7
Assignment 2 - First Complete Draft
Sep 13, 2019
209ffb2
Rotation added
Sep 13, 2019
955e4a1
Figure out blinking
Sep 13, 2019
e776620
The Fox Blinks!
Sep 14, 2019
e9eaa58
Assignment 2 Finished!
genlikan Sep 14, 2019
4dba907
Now the Fox Blinks random Colors!
Sep 14, 2019
448d47d
Merge branch 'master' of https://github.com/genlikan/cs460student
Sep 14, 2019
779a7f3
Added 's' in http
genlikan Sep 16, 2019
6387046
Pull
genlikan Sep 16, 2019
9dc0919
updated index.html
genlikan Sep 16, 2019
11a6555
Update index.html
genlikan Sep 16, 2019
d5c4355
Added Pixel and viewport coordinates on click.
genlikan Sep 18, 2019
df30b8e
Update index.html
Sep 20, 2019
abfdbc1
Create Test.html
genlikan Sep 20, 2019
9fba9bd
Assignment Completion!
Sep 22, 2019
20660d4
Update index.html
Sep 22, 2019
114d543
Merge branch 'master' of https://github.com/bostongfx/cs460student
genlikan Sep 23, 2019
7544daa
Create index.html
genlikan Sep 23, 2019
aa69ad6
Update index.html
genlikan Sep 23, 2019
860435b
Assignment 3 Complete!
Sep 23, 2019
e6601b9
Updated index.html
Sep 27, 2019
d43f6a2
Assignment Plus Bonus Questions Complete!
Oct 2, 2019
ba738de
Assignment 4 Complete!
Oct 2, 2019
7ab1a6b
Fixed URL
Oct 2, 2019
58e8336
Update index.html
genlikan Oct 2, 2019
11f52bf
Delete index.html
genlikan Oct 2, 2019
8d241b3
Merge branch 'master' of https://github.com/genlikan/cs460student
genlikan Oct 2, 2019
ff8f6aa
onkeydown to up
genlikan Oct 2, 2019
88e013d
Merge branch 'master' of https://github.com/bostongfx/cs460student
genlikan Oct 2, 2019
9cb4a05
Create xtk.html
genlikan Oct 2, 2019
4b28950
Some confusion on Keysup or Down
genlikan Oct 2, 2019
14dd8fd
Fixed keys and leaving boundaries
genlikan Oct 2, 2019
aa6a49d
Assignment 4 Finished! (The Sequal)
genlikan Oct 2, 2019
cf32c01
Final Cleanup
genlikan Oct 2, 2019
77e9f26
XtK updated
genlikan Oct 4, 2019
cf3942b
Update index.html
Oct 7, 2019
3d96b6f
Merge branch 'master' of https://github.com/genlikan/cs460student
Oct 7, 2019
e348c22
Create index.html
Oct 7, 2019
8b166d8
Progress up to Part 4!
Oct 7, 2019
462019c
Progress up to Part 8!
Oct 7, 2019
cfe71ae
Progress Figure out Part 8 and Explain Part 9
Oct 7, 2019
346958c
Update index.html
genlikan Oct 7, 2019
ea04876
Fixed 'add new' function
genlikan Oct 7, 2019
055ec61
Merge branch 'master' of https://github.com/bostongfx/cs460student
genlikan Oct 11, 2019
492f4d5
Assignment 5 Complete!
Oct 12, 2019
5e2783b
Merge branch 'master' of https://github.com/genlikan/cs460student
Oct 12, 2019
d008a94
Update index.html
Oct 12, 2019
554ee6d
Merge branch 'master' of https://github.com/bostongfx/cs460student
genlikan Oct 18, 2019
418a867
Update index.html
genlikan Oct 18, 2019
6748f37
Merge branch 'master' of https://github.com/genlikan/cs460student
genlikan Oct 18, 2019
600c375
Updated index.html added robot.js
genlikan Oct 21, 2019
5e70423
Update robot.js
Oct 22, 2019
301ed53
updated index.html and robot.js
Oct 22, 2019
7790a8a
Part 11 in progress
Oct 23, 2019
f1f0f0a
Updated to deal with slerp
genlikan Oct 23, 2019
ae80c8e
Updated robot.js
genlikan Oct 23, 2019
49299a9
Updated Robo
genlikan Oct 25, 2019
3c15c76
Update robot.js
Oct 26, 2019
7b5d890
Implrement .listen() function from dat.GUI and Make Robot Dance!
Oct 27, 2019
e79d013
Dancing More
Oct 27, 2019
7916033
Flailing hands
Oct 28, 2019
f1ccc86
Assignment 6 Complete (Cleanup needed)
Oct 28, 2019
a405adb
Update robot.js
Oct 28, 2019
b11f806
Assignment 06 Completion
Oct 28, 2019
a52aff1
updated index and robot.js
Oct 28, 2019
572b35b
Merge branch 'master' of https://github.com/bostongfx/cs460student
genlikan Nov 5, 2019
268991f
Assignment 07 update
genlikan Nov 5, 2019
df1a850
UPDATE
genlikan Nov 6, 2019
a448347
Updated
genlikan Nov 6, 2019
7ae3bfb
Added [but commented out] Armadillo.ply
genlikan Nov 6, 2019
fbdef01
Added Test, Figure out how to make Steve
genlikan Nov 6, 2019
de7342f
Updated added Steve
genlikan Nov 8, 2019
e4088c3
Assignment 07 Updated
Nov 12, 2019
9694f09
Create CS460_Assignment_07_genlikan.pdf
Nov 12, 2019
8c2d583
Updated Assignment 08
genlikan Nov 15, 2019
5daef88
Added Rick
genlikan Nov 15, 2019
9f1fb85
Assignment 08 Completion
Nov 16, 2019
2a5ef98
Fixed robot.js
Nov 16, 2019
5d4c960
Update robot.js
Nov 16, 2019
2091b6e
Update robot.js
Nov 16, 2019
0f32955
Merge branch 'master' of https://github.com/bostongfx/cs460student
Nov 27, 2019
8792e93
Updated to near Completion
Nov 27, 2019
da96649
Completion Assignment 09
Nov 27, 2019
31ee68e
Added PDF
Nov 27, 2019
ed4887e
Create hind.ply
Dec 4, 2019
6b4af10
Updated 03 to Orbital Camera
Dec 9, 2019
0c8de20
Final Projects
genlikan Dec 21, 2019
5bd3f29
Added 00 from OG repository
Aug 9, 2020
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
16 changes: 16 additions & 0 deletions 00/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<body>
<h1>Unit21 (in 1280 x 720)</h1>
<p>By nogalo and unknown</p>
<p>Controls: WASD to walk. Hold left mouse button to pan the camera. Left click to select.</p>
<p>URL:<a href="https://www.productexample.com/unit21/index.html">https://www.productexample.com/unit21/index.html</a></p>
<iframe id="unit21"
title="Unit 21"
width="1280"
height="720"
src="https://www.productexample.com/unit21/index.html">
</iframe>
<h2> Hosted by genlikan on Github at <a href="https://github.com/genlikan/genlikan.github.io">genlikan.github.io</a></h2>
</body>
</html>
Binary file added 01/CS460_Assignment_01_genlikan.pdf
Binary file not shown.
Binary file added 02/CS460_Assignment_02_genlikan.pdf
Binary file not shown.
139 changes: 139 additions & 0 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<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">

// this gets called when the site is ready
window.onload = function() {
//makes and adds cube
function makecube(){
c = new X.cube();
c.center = [ x * 3, y * 3, 0];
c.lengthX = c.lengthY = c.lengthZ = 2;
//fox cyan eyes
if ((y == 3) && (x == 2)){
eye1 = new X.cube();
eye1.center = [ x * 3, y * 3, 0];
eye1.lengthX = eye1.lengthY = eye1.lengthZ = 2.1;
eye1.color = [ 0, 1, 1];
r.add(eye1);
}
if ((y == 3) && (x == 3)){
eye2 = new X.cube();
eye2.center = [ x * 3, y * 3, 0];
eye2.lengthX = eye2.lengthY = eye2.lengthZ = 2.1;
eye2.color = [ 0, 1, 1];
r.add(eye2);
}
if ((y == 3) && (x == 5)){
eye3 = new X.cube();
eye3.center = [ x * 3, y * 3, 0];
eye3.lengthX = eye3.lengthY = eye3.lengthZ = 2.1;
eye3.color = [ 0, 1, 1];
r.add(eye3);
}
if ((y == 3) && (x == 6)){
eye4 = new X.cube();
eye4.center = [ x * 3, y * 3, 0];
eye4.lengthX = eye4.lengthY = eye4.lengthZ = 2.1;
eye4.color = [ 0, 1, 1];
r.add(eye4);
}
//fox red nose
else if ((y == 6) && (x == 4)){
c.color = [ 1, 0, 0];
}
else {
c.color = [ 1, 1, 1];
}
// add it!
r.add(c);
}
// create a new scene and renderer
r = new X.renderer3D();
r.init();

// create canvas, top down,
//starts upper right to bottom left
for ( var y = 0; y < 9; y++) {
for ( var x = 0; x < 9; x++) {

if ( (y < 6) && (x == 1 || x == 7) ){
makecube();
}
if ( (y >= 1 && y < 7) && (x == 2 || x == 6) ){
makecube();
}
if ( (y >= 2 && y < 8) && (x == 3 || x == 5) ){
makecube();
}
if ( (y >= 2 && y < 8) && (x == 4) ){
makecube();
}

}

}

// render everything!
r.camera.position = [0, 0, -100];
r.render();

// rotates the camera
// r.onRender = function() {
// r.camera.rotate([0,-1]);
// };

// Eye turns white
setInterval(function() {
eye1.color = [ 1, 1, 1];
eye2.color = [ 1, 1, 1];
eye3.color = [ 1, 1, 1];
eye4.color = [ 1, 1, 1];
}, 1000);

// Eye turns random colors
setInterval(function() {
// this portion was inspired by observing git user dotcasek
var red = Math.random();
var green = Math.random();
var blue = Math.random();

eye1.color = [ red, green, blue];
eye2.color = [ red, green, blue];
eye3.color = [ red, green, blue];
eye4.color = [ red, green, blue];
}, 2000);


};

</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/CS460_Assignment_03_genlikan.pdf
Binary file not shown.
202 changes: 202 additions & 0 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
<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://unpkg.com/[email protected]/examples/js/controls/OrbitControls.js"></script>
<script>
window.onload = function() {

// Three.js code goes here

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);
// placed camera futher from canvas
camera.position.set( 0, 0, 1000);

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

function makecube(){
// Add cube
geometry = new THREE.BoxBufferGeometry( 15, 15, 15);
var color = new THREE.Color( rannum(),rannum(),rannum());
material = new THREE.MeshStandardMaterial({color: color});
cube = new THREE.Mesh( geometry, material);
scene.add(cube);
cube.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

function makeknot(){
// Add knot
geometry = new THREE.TorusKnotBufferGeometry( 10, 3, 100, 16);
var color = new THREE.Color( rannum(),rannum(),rannum());
material = new THREE.MeshStandardMaterial({color: color});
knot = new THREE.Mesh( geometry, material);
scene.add(knot);
knot.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

function makesphere(){
// Add sphere
geometry = new THREE.SphereBufferGeometry( 5, 32, 32);
var color = new THREE.Color( rannum(),rannum(),rannum());
material = new THREE.MeshStandardMaterial({color: color});
sphere = new THREE.Mesh( geometry, material);
scene.add(sphere);
sphere.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

function makeocta(){
// Add octahedron
geometry = new THREE.OctahedronBufferGeometry( 10);
var color = new THREE.Color( rannum(),rannum(),rannum());
material = new THREE.MeshStandardMaterial({color: color});
octahedron = new THREE.Mesh( geometry, material);
scene.add(octahedron);
octahedron.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

function makecone(){
// Add cone
geometry = new THREE.ConeBufferGeometry( 10, 10);
var color = new THREE.Color( rannum(),rannum(),rannum());
material = new THREE.MeshStandardMaterial({color: color});
cone = new THREE.Mesh( geometry, material);
scene.add(cone);
cone.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

function makering(){
// Add ring
geometry = new THREE.RingBufferGeometry( 1, 10, 32);
var color = new THREE.Color( rannum(),rannum(),rannum() );
material = new THREE.MeshStandardMaterial({color: color});
ring = new THREE.Mesh( geometry, material);
scene.add(ring);
ring.position.set(first_intersection.point.x, first_intersection.point.y, first_intersection.point.z);
counterCount();
}

//returns a random number, made into a function if tweaking is required
function rannum(){

return Math.random();
}

//Has an array of shapes, returns random shapes
function newshape(){

var shapes = [makecube, makeknot, makesphere, makeocta, makecone, makering];

return shapes[Math.floor(Math.random() * shapes.length)];
}


//Keeps track of amount of shapes
var shapeCounter = 0;
function counterCount() {

shapeCounter++;
}

//onclick is now onmousemove
renderer.domElement.onmousemove = function( e ){

if (!e.shiftKey) {
e.preventDefault();
return false;
}


//Can we click?
console.log('Yay! We clicked!');
pixel_coords = new THREE.Vector2( e.clientX, e.clientY );

//pixel coordinates
console.log('Pixel coords', pixel_coords);
vp_coords = new THREE.Vector2(
( pixel_coords.x / window.innerWidth ) * 2 - 1, //X
-( pixel_coords.y / window.innerHeight ) * 2 + 1) // Y

//view port coordinates
console.log('Viewport coords', 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);

first_intersection = intersects[0];

//3D position coordinates
console.log('3D point' + first_intersection.point);


//Creates a New random Shape
newshape()();

//Keeps track of shape count.
console.log('There has been ' + shapeCounter + ' shapes.');




};

ambientLight = new THREE.AmbientLight();
scene.add( ambientLight );

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

//Make invisible plane
geometry = new THREE.PlaneBufferGeometry(10000, 10000);
material = new THREE.MeshStandardMaterial({visible: false});
invisible_plane = new THREE.Mesh(geometry, material);

scene.add(invisible_plane);

controls = new THREE.OrbitControls( camera );

animate();

};

function animate() {

requestAnimationFrame( animate );

// console.log('check');

controls.update();

// and here...
renderer.render( scene, camera);

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