diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86caa5c --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# Compiled Object files + +*.slo + +*.lo + +*.o + +*.obj + +*.exe + + +# Compiled Dynamic libraries + +*.so + +*.dylib + + +# Compiled Static libraries + +*.lai + +*.la + +*.a + +*/Debug* + +*Release* + +ipch +*.sdf +*.sln +*.vcxproj +/TGCViewer/*.filters +*.user +*.filters +*.ncb +*.opt +*.plg +*.suo +*.vcproj +Debug diff --git a/Clase 1 - Proyeccion.ppt b/Clase 1 - Proyeccion.ppt new file mode 100644 index 0000000..ae5dd2d Binary files /dev/null and b/Clase 1 - Proyeccion.ppt differ diff --git a/Clase 1 - Proyeccion.pptx b/Clase 1 - Proyeccion.pptx new file mode 100644 index 0000000..7ed7a7c Binary files /dev/null and b/Clase 1 - Proyeccion.pptx differ diff --git a/Clase 2 - Colisiones.ppt b/Clase 2 - Colisiones.ppt new file mode 100644 index 0000000..744b84b Binary files /dev/null and b/Clase 2 - Colisiones.ppt differ diff --git a/Clase 2 - Colisiones.pptx b/Clase 2 - Colisiones.pptx new file mode 100644 index 0000000..167270c Binary files /dev/null and b/Clase 2 - Colisiones.pptx differ diff --git a/Dibujo2.png b/Dibujo2.png new file mode 100644 index 0000000..1d6c3df Binary files /dev/null and b/Dibujo2.png differ diff --git a/Dibujo2.vsd b/Dibujo2.vsd new file mode 100644 index 0000000..a9f8d76 Binary files /dev/null and b/Dibujo2.vsd differ diff --git a/Ejercicios de Proyecciones.doc b/Ejercicios de Proyecciones.doc new file mode 100644 index 0000000..4ef49e9 Binary files /dev/null and b/Ejercicios de Proyecciones.doc differ diff --git a/algebra_y_videojuegos.ppt b/algebra_y_videojuegos.ppt new file mode 100644 index 0000000..25c70c6 Binary files /dev/null and b/algebra_y_videojuegos.ppt differ diff --git a/algebra_y_videojuegos2014.ppt b/algebra_y_videojuegos2014.ppt new file mode 100644 index 0000000..7baef5f Binary files /dev/null and b/algebra_y_videojuegos2014.ppt differ diff --git a/algebra_y_videojuegos2014.zip b/algebra_y_videojuegos2014.zip new file mode 100644 index 0000000..3047d76 Binary files /dev/null and b/algebra_y_videojuegos2014.zip differ diff --git a/ball.png b/ball.png new file mode 100644 index 0000000..749b911 Binary files /dev/null and b/ball.png differ diff --git a/bilinear.html b/bilinear.html new file mode 100644 index 0000000..61ef8a1 --- /dev/null +++ b/bilinear.html @@ -0,0 +1,98 @@ + + + + + + + + + + + diff --git a/bilinear2.html b/bilinear2.html new file mode 100644 index 0000000..024250a --- /dev/null +++ b/bilinear2.html @@ -0,0 +1,103 @@ + + + + + + + + + + + diff --git a/canvas_1.htm b/canvas_1.htm new file mode 100644 index 0000000..0450ca0 --- /dev/null +++ b/canvas_1.htm @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/canvas_2.htm b/canvas_2.htm new file mode 100644 index 0000000..4252fe3 --- /dev/null +++ b/canvas_2.htm @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/canvas_3.htm b/canvas_3.htm new file mode 100644 index 0000000..fbb3711 --- /dev/null +++ b/canvas_3.htm @@ -0,0 +1,745 @@ + + + + + + + + + + + diff --git a/coli_1.htm b/coli_1.htm new file mode 100644 index 0000000..3f7eef5 --- /dev/null +++ b/coli_1.htm @@ -0,0 +1,266 @@ + + + + + + + + + + + + + diff --git a/coli_2.htm b/coli_2.htm new file mode 100644 index 0000000..be23b53 --- /dev/null +++ b/coli_2.htm @@ -0,0 +1,368 @@ + + + + + + + + + + + diff --git a/coli_3.htm b/coli_3.htm new file mode 100644 index 0000000..babd353 --- /dev/null +++ b/coli_3.htm @@ -0,0 +1,376 @@ + + + + + + + + + + + diff --git a/coli_4.htm b/coli_4.htm new file mode 100644 index 0000000..a4c7e1c --- /dev/null +++ b/coli_4.htm @@ -0,0 +1,394 @@ + + + + + + + + + + + diff --git a/coli_5.htm b/coli_5.htm new file mode 100644 index 0000000..27451cb --- /dev/null +++ b/coli_5.htm @@ -0,0 +1,421 @@ + + + + + + + + + + + + diff --git a/coli_6.htm b/coli_6.htm new file mode 100644 index 0000000..5a9ee1e --- /dev/null +++ b/coli_6.htm @@ -0,0 +1,461 @@ + + + + + + + + + + + + diff --git a/coli_7.htm b/coli_7.htm new file mode 100644 index 0000000..ba54eee --- /dev/null +++ b/coli_7.htm @@ -0,0 +1,460 @@ + + + + + + + + + + + + diff --git a/coli_8.htm b/coli_8.htm new file mode 100644 index 0000000..b16b5e7 --- /dev/null +++ b/coli_8.htm @@ -0,0 +1,333 @@ + + + + + + + + + + + diff --git a/cubo_tex.htm b/cubo_tex.htm new file mode 100644 index 0000000..c2515e4 --- /dev/null +++ b/cubo_tex.htm @@ -0,0 +1,297 @@ + + + + + + + + + + + diff --git a/ejer_1.htm b/ejer_1.htm new file mode 100644 index 0000000..1e45f40 --- /dev/null +++ b/ejer_1.htm @@ -0,0 +1,185 @@ + + + + + + + + + + + diff --git a/ejer_2.htm b/ejer_2.htm new file mode 100644 index 0000000..26ed722 --- /dev/null +++ b/ejer_2.htm @@ -0,0 +1,194 @@ + + + + + + + + + + + diff --git a/ejer_3.htm b/ejer_3.htm new file mode 100644 index 0000000..099cad2 --- /dev/null +++ b/ejer_3.htm @@ -0,0 +1,188 @@ + + + + + + + + + + + diff --git a/ejer_4.htm b/ejer_4.htm new file mode 100644 index 0000000..cb31576 --- /dev/null +++ b/ejer_4.htm @@ -0,0 +1,818 @@ + + + + + + + + + + + diff --git a/ejer_5.htm b/ejer_5.htm new file mode 100644 index 0000000..e884713 --- /dev/null +++ b/ejer_5.htm @@ -0,0 +1,271 @@ + + + + + + + + + + + diff --git a/ejer_6.htm b/ejer_6.htm new file mode 100644 index 0000000..cfd666f --- /dev/null +++ b/ejer_6.htm @@ -0,0 +1,152 @@ + + + + + + + + + + + diff --git a/ejer_7.htm b/ejer_7.htm new file mode 100644 index 0000000..fbb3711 --- /dev/null +++ b/ejer_7.htm @@ -0,0 +1,745 @@ + + + + + + + + + + + diff --git a/ejer_8.htm b/ejer_8.htm new file mode 100644 index 0000000..a3b5317 --- /dev/null +++ b/ejer_8.htm @@ -0,0 +1,28240 @@ + + + + + + + + + + + diff --git a/ejer_9.htm b/ejer_9.htm new file mode 100644 index 0000000..d278913 --- /dev/null +++ b/ejer_9.htm @@ -0,0 +1,753 @@ + + + + + + + + + + + diff --git a/flipper.htm b/flipper.htm new file mode 100644 index 0000000..41100de --- /dev/null +++ b/flipper.htm @@ -0,0 +1,523 @@ + + + + + + + + + + + + diff --git a/flipper2.htm b/flipper2.htm new file mode 100644 index 0000000..acafd3c --- /dev/null +++ b/flipper2.htm @@ -0,0 +1,527 @@ + + + + + + + + + + + + diff --git a/gradiente.htm b/gradiente.htm new file mode 100644 index 0000000..cb227c1 --- /dev/null +++ b/gradiente.htm @@ -0,0 +1,334 @@ + + + + + + + + + + + diff --git a/isometrica.htm b/isometrica.htm new file mode 100644 index 0000000..e34f3a7 --- /dev/null +++ b/isometrica.htm @@ -0,0 +1,190 @@ + + + + + + + + + + + diff --git a/matematica_y_videojuegos.ppt b/matematica_y_videojuegos.ppt new file mode 100644 index 0000000..657d24a Binary files /dev/null and b/matematica_y_videojuegos.ppt differ diff --git a/nearespoint.html b/nearespoint.html new file mode 100644 index 0000000..3b458e7 --- /dev/null +++ b/nearespoint.html @@ -0,0 +1,79 @@ + + + + + + + + + + + diff --git a/nearespoint2.html b/nearespoint2.html new file mode 100644 index 0000000..385242e --- /dev/null +++ b/nearespoint2.html @@ -0,0 +1,84 @@ + + + + + + + + + + + diff --git a/point_in_tri_test.htm b/point_in_tri_test.htm new file mode 100644 index 0000000..812b7fc --- /dev/null +++ b/point_in_tri_test.htm @@ -0,0 +1,281 @@ + + + + + + + + + + + + + diff --git a/point_in_tri_test2.htm b/point_in_tri_test2.htm new file mode 100644 index 0000000..838699a --- /dev/null +++ b/point_in_tri_test2.htm @@ -0,0 +1,183 @@ + + + + + + + + + + + + + diff --git a/quad_affine_tex.htm b/quad_affine_tex.htm new file mode 100644 index 0000000..b763abc --- /dev/null +++ b/quad_affine_tex.htm @@ -0,0 +1,296 @@ + + + + + + + + + + + diff --git a/quad_color.htm b/quad_color.htm new file mode 100644 index 0000000..1c99913 --- /dev/null +++ b/quad_color.htm @@ -0,0 +1,300 @@ + + + + + + + + + + + diff --git a/quad_perspective_tex.htm b/quad_perspective_tex.htm new file mode 100644 index 0000000..8b3739b --- /dev/null +++ b/quad_perspective_tex.htm @@ -0,0 +1,317 @@ + + + + + + + + + + + diff --git a/quad_raster.htm b/quad_raster.htm new file mode 100644 index 0000000..47709d3 --- /dev/null +++ b/quad_raster.htm @@ -0,0 +1,276 @@ + + + + + + + + + + + diff --git a/rayt_1.htm b/rayt_1.htm new file mode 100644 index 0000000..488ace6 --- /dev/null +++ b/rayt_1.htm @@ -0,0 +1,249 @@ + + + + + + + + + + + + diff --git a/shaderdoy.c b/shaderdoy.c new file mode 100644 index 0000000..cd452fb --- /dev/null +++ b/shaderdoy.c @@ -0,0 +1,181 @@ + + +const vec3 lb = vec3(-10,-10,-10); +const vec3 rt = vec3(40,40,40); + +float ray_aabb(vec3 org,vec3 dir) +{ + float t = -1.0; + + vec3 dirfrac; + dirfrac.x = 1.0 / dir.x; + dirfrac.y = 1.0 / dir.y; + dirfrac.z = 1.0 / dir.z; + // lb is the corner of AABB with minimal coordinates - left bottom, rt is maximal corner + // r.org is origin of ray + float t1 = (lb.x - org.x)*dirfrac.x; + float t2 = (rt.x - org.x)*dirfrac.x; + float t3 = (lb.y - org.y)*dirfrac.y; + float t4 = (rt.y - org.y)*dirfrac.y; + float t5 = (lb.z - org.z)*dirfrac.z; + float t6 = (rt.z - org.z)*dirfrac.z; + + float tmin = max(max(min(t1, t2), min(t3, t4)), min(t5, t6)); + float tmax = min(min(max(t1, t2), max(t3, t4)), max(t5, t6)); + + // if tmax < 0, ray (line) is intersecting AABB, but whole AABB is behing us + if (tmax < 0.0) + { + t = -1.0; + } + else + // if tmin > tmax, ray doesn't intersect AABB + if (tmin > tmax) + { + t = -1.0; + } + else + { + t = tmin; + } + + return t; +} + +float ray_sphere(vec3 ray, vec3 dir, vec3 center, float radius) +{ + vec3 rc = ray-center; + float c = dot(rc, rc) - (radius*radius); + float b = dot(dir, rc); + float d = b*b - c; + float t = -b - sqrt(abs(d)); + float st = step(0.0, min(t,d)); + return mix(-1.0, t, st); +} + +void main(void) +{ + + vec2 uv = (-1.0 + 2.0*gl_FragCoord.xy / iResolution.xy) * + vec2(iResolution.x/iResolution.y, 1.0); + vec3 D = normalize(vec3(uv, 1.0)); + vec3 vLookFrom = vec3(0.0,0.0,-3.0); + + float t = ray_sphere(vLookFrom,D , vec3(0.0,0.0,0.0),1.0); + + + if(t>-1.0) + gl_FragColor = vec4(0.0,0.0,0.0,1.0); + else + gl_FragColor = vec4(1.0,1.0,1.0,1.0); + +} + +const vec3 lb = vec3(-10,-10,-10); +const vec3 rt = vec3(40,40,40); + +float ray_aabb(vec3 org,vec3 dir) +{ + float t = -1.0; + + vec3 dirfrac; + dirfrac.x = 1.0 / dir.x; + dirfrac.y = 1.0 / dir.y; + dirfrac.z = 1.0 / dir.z; + // lb is the corner of AABB with minimal coordinates - left bottom, rt is maximal corner + // r.org is origin of ray + float t1 = (lb.x - org.x)*dirfrac.x; + float t2 = (rt.x - org.x)*dirfrac.x; + float t3 = (lb.y - org.y)*dirfrac.y; + float t4 = (rt.y - org.y)*dirfrac.y; + float t5 = (lb.z - org.z)*dirfrac.z; + float t6 = (rt.z - org.z)*dirfrac.z; + + float tmin = max(max(min(t1, t2), min(t3, t4)), min(t5, t6)); + float tmax = min(min(max(t1, t2), max(t3, t4)), max(t5, t6)); + + // if tmax < 0, ray (line) is intersecting AABB, but whole + +AABB is behing us + if (tmax < 0.0) + { + t = -1.0; + } + else + // if tmin > tmax, ray doesn't intersect AABB + if (tmin > tmax) + { + t = -1.0; + } + else + { + t = tmin; + } + + return t; +} + + +float ray_sphere(vec3 p0,vec3 D,vec3 centro,float radio) +{ + float rta = -1.0; + // verifico si interseta con la esfera + vec3 aux = p0 - centro; + float c = dot(aux,aux) - radio*radio; + float B = 2.0*dot(D,aux); + float disc = B*B - 4.0*c; + if(disc>=0.0) + { + float t0 = (-B-sqrt(disc))/2.0; + float t1 = (-B+sqrt(disc))/2.0; + + if(t0<0.0) + rta = t1; + else + if(t0>t1) + { + float aux_t = t1; + t1 = t0; + t0 = aux_t; + } + + // entra en la esfera por t0 y sale por t1. + // se supone que el punto p0 NO esta dentro de la + // esfera, asi que t0, t1 son ambos positivos o ambos negativos + rta = t0; + } + return rta; +} + + + +void main(void) +{ + vec2 uv = gl_FragCoord.xy / iResolution.xy; + float x =2.0*(uv.x-1.0); + float y = 1.0-2.0*uv.y; + + vec3 vLookFrom = vec3(0.0,0.0,2000); + vec3 vLookAt = vec3(0,0,0); + + vec3 N = normalize(vLookAt-vLookFrom); + vec3 V = normalize(N * vec3(0,1,0)); + vec3 U = V * N; + const float fov = 3.1415 / 4.0; + float k = 2.0*tan(fov/2.0); + vec3 Dy = U*(k*iResolution.y/iResolution.x); + vec3 Dx = V*k; + + // direccion de cada rayo + + vec3 D = normalize(N + Dx*x + Dy*y); + + float t = ray_sphere(vLookFrom,D , vec3(0.0,0.0,0.0),50.0); + + + if(t>0.0) + gl_FragColor = vec4(0.0,0.0,0.0,1.0); + else + gl_FragColor = vec4(1.0,1.0,1.0,1.0); + +} \ No newline at end of file diff --git a/ws_1.htm b/ws_1.htm new file mode 100644 index 0000000..e3ade0d --- /dev/null +++ b/ws_1.htm @@ -0,0 +1,122 @@ + + + + + + + + + + + diff --git a/ws_2.htm b/ws_2.htm new file mode 100644 index 0000000..1efbdb4 --- /dev/null +++ b/ws_2.htm @@ -0,0 +1,154 @@ + + + + + + + + + + + diff --git a/ws_3.htm b/ws_3.htm new file mode 100644 index 0000000..2862f30 --- /dev/null +++ b/ws_3.htm @@ -0,0 +1,253 @@ + + + + + + + + + + + diff --git a/ws_3bis.htm b/ws_3bis.htm new file mode 100644 index 0000000..2f9629c --- /dev/null +++ b/ws_3bis.htm @@ -0,0 +1,272 @@ + + + + + + + + + + + diff --git a/ws_4.htm b/ws_4.htm new file mode 100644 index 0000000..e7a59d7 --- /dev/null +++ b/ws_4.htm @@ -0,0 +1,278 @@ + + + + + + + + + + + diff --git a/ws_5.htm b/ws_5.htm new file mode 100644 index 0000000..ba83794 --- /dev/null +++ b/ws_5.htm @@ -0,0 +1,395 @@ + + + + + + + + + + + diff --git a/ws_x.htm b/ws_x.htm new file mode 100644 index 0000000..9c8635b --- /dev/null +++ b/ws_x.htm @@ -0,0 +1,274 @@ + + + + + + + + + + +