diff --git a/index.html b/index.html index d31a42c2c9dbfaaefa8b5155e0b44d722c8c6f39..d2a4ee50212d319728c17ddccedd04c4f44aa1e1 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,6 @@ <script type="module" src="/src/cg/perspectiveDivide.ts"></script> <script type="module" src="/src/cg/walkToVec.ts"></script> <script type="module" src="/src/cg/basis.ts"></script--> - <script type="module" src="/src/cg/raytracing2animation.ts"></script> + <script type="module" src="/src/cg/bird.ts"></script> </body> </html> diff --git a/src/cg/bird.ts b/src/cg/bird.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed69bfae64db474d966d9e326ef07ba4ffd7d298 --- /dev/null +++ b/src/cg/bird.ts @@ -0,0 +1,88 @@ +import Framebuffer from "./framebuffer"; +import { Vec3, Matrix4, Matrix3, matrix3ToMatrix4, matrix4Product, raySphereIntersect, ISphere, rotX, rotY, multVec3Matrix4 } from "./utils"; +import spheres from './bird/bird.json'; + +const width = 600 +const height = 600 +const framebuffer = new Framebuffer(width, height); +const imagePlaneDist = -0.5 + +const tNear = 1; +const tFar = 1000; + +// Transform data from Blender +const birdRotation = matrix3ToMatrix4(rotX(-90))/// <--- create a rotation matrix +for (let i = 0; i < spheres.length; i++) { + // overwrite the data with the new transformation: + spheres[i].position = multVec3Matrix4(spheres[i].position, birdRotation); +} + +const o: Vec3 = [0, 0, 0] + +const camT: Matrix4 = [ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 10, 1 // <--- 4x4 matrix that moves the camera in Z +] + +const camRx = matrix3ToMatrix4(rotX(-30))// <--- rotation matrix around X. Convert it to 4x4. + +const camInitialTransform = matrix4Product(camT, camRx)// <--- combine camT and camRX into a new matrix + +let currentFrame = 0 + +for (let i = 0; i <= 1; i += .1) { + framebuffer.clear() + + + const camRot = rotY(360*i)// <--- rotation matrix around Y using 360 * i in each frame + + + const combinedCameraTransform = matrix4Product(camInitialTransform, matrix3ToMatrix4(camRot)) // <--- Combine transformations: + // initial transform then rotate + + + // Loop over framebuffer pixels + for (let x = 0; x <= width; x++) { + for (let y = 0; y <= height; y++) { + + // Convert to screen space + const v = framebuffer.rasterToScreen(x, y, width, height, imagePlaneDist)// <--- convert raster to screen space + const vTransformed = multVec3Matrix4(v, combinedCameraTransform)// <--- apply camera transform + const oTransformed = multVec3Matrix4(o, combinedCameraTransform)// <--- apply camera transform + + // ... + // ... same as in previous task but using transformed camera vectors + let closestSphere = null; + let closestIntersection = 9999; + + for (let i = 0; i < spheres.length; i++) { + + //const position = spheres[i].position; + + const [t1, t2] = raySphereIntersect(vTransformed, oTransformed, spheres[i] as ISphere)// <--- Calculate intersections + + if (t1 < closestIntersection && tNear < t1 && t1 < tFar) { + closestIntersection = t1; + closestSphere = spheres[i] + } + + if (t2 < closestIntersection && tNear < t2 && t2 < tFar) { + closestIntersection = t2; + closestSphere = spheres[i]; + } + } + if (!closestSphere) { + framebuffer.draw(x,y,[0,0,50]) // <--- Draw a background color + } else { + framebuffer.draw(x,y,closestSphere.color) // <--- Draw color of closest sphere + } + + } + + } + framebuffer.update(); + framebuffer.save("spheres." + ++currentFrame); + +} \ No newline at end of file diff --git a/src/cg/bird/bird.json b/src/cg/bird/bird.json new file mode 100644 index 0000000000000000000000000000000000000000..e8f5e5e7203d3e1c6872d405871395ab25094f42 --- /dev/null +++ b/src/cg/bird/bird.json @@ -0,0 +1,2017 @@ +[ + { + "position": [ + 0.0, + -2.213, + 4.3705 + ], + "radius": 1.0051, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 0.0, + -1.792, + 4.1487 + ], + "radius": 1.1497, + "color": [ + 105, + 25, + 10 + ] + }, + { + "position": [ + 0.0, + -1.371, + 3.9268 + ], + "radius": 1.2943, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + 0.0, + -0.95, + 3.705 + ], + "radius": 1.439, + "color": [ + 144, + 35, + 17 + ] + }, + { + "position": [ + -0.0, + -0.529, + 3.4832 + ], + "radius": 1.5836, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + 0.0, + -0.108, + 3.2614 + ], + "radius": 1.7282, + "color": [ + 102, + 15, + 10 + ] + }, + { + "position": [ + 0.0, + 0.2807, + 2.9875 + ], + "radius": 1.5599, + "color": [ + 116, + 24, + 17 + ] + }, + { + "position": [ + 0.0, + 0.6659, + 2.7081 + ], + "radius": 1.3583, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + 0.0, + 1.0511, + 2.4287 + ], + "radius": 1.1566, + "color": [ + 145, + 43, + 30 + ] + }, + { + "position": [ + 0.0, + 1.4363, + 2.1493 + ], + "radius": 0.9549, + "color": [ + 159, + 52, + 36 + ] + }, + { + "position": [ + 0.0, + 1.8791, + 2.0249 + ], + "radius": 0.7633, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + 0.0, + 2.3533, + 1.9853 + ], + "radius": 0.5772, + "color": [ + 142, + 46, + 29 + ] + }, + { + "position": [ + 0.0, + 2.8276, + 2.0034 + ], + "radius": 0.5867, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + 0.0, + 3.3019, + 2.0419 + ], + "radius": 0.6655, + "color": [ + 106, + 31, + 13 + ] + }, + { + "position": [ + 0.0, + 3.7762, + 2.0804 + ], + "radius": 0.7443, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 0.0, + -3.7552, + 3.9901 + ], + "radius": 0.1536, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 0.0, + -3.5179, + 4.0549 + ], + "radius": 0.2386, + "color": [ + 133, + 30, + 15 + ] + }, + { + "position": [ + 0.0, + -3.2802, + 4.1179 + ], + "radius": 0.3419, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + 0.0, + -3.0419, + 4.1789 + ], + "radius": 0.4648, + "color": [ + 151, + 50, + 33 + ] + }, + { + "position": [ + 0.0, + -2.8036, + 4.2399 + ], + "radius": 0.5876, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 0.4826, + -1.2501, + 3.794 + ], + "radius": 1.0033, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 0.6085, + -0.9962, + 3.6119 + ], + "radius": 1.0556, + "color": [ + 131, + 33, + 14 + ] + }, + { + "position": [ + 0.7535, + -0.7555, + 3.4258 + ], + "radius": 1.1121, + "color": [ + 133, + 30, + 15 + ] + }, + { + "position": [ + 0.8726, + -0.4977, + 3.2454 + ], + "radius": 1.1684, + "color": [ + 105, + 17, + 12 + ] + }, + { + "position": [ + 0.917, + -0.2047, + 3.0878 + ], + "radius": 1.2249, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + 0.8769, + 0.1055, + 2.9664 + ], + "radius": 1.1288, + "color": [ + 155, + 49, + 35 + ] + }, + { + "position": [ + 0.7521, + 0.4086, + 2.8924 + ], + "radius": 0.9937, + "color": [ + 151, + 50, + 33 + ] + }, + { + "position": [ + 0.5892, + 0.6997, + 2.8438 + ], + "radius": 0.8601, + "color": [ + 120, + 37, + 19 + ] + }, + { + "position": [ + 0.0, + 0.9963, + 2.7828 + ], + "radius": 1.186, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -0.4826, + -1.2501, + 3.794 + ], + "radius": 1.0033, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -0.6085, + -0.9962, + 3.6119 + ], + "radius": 1.0556, + "color": [ + 131, + 33, + 14 + ] + }, + { + "position": [ + -0.7535, + -0.7555, + 3.4258 + ], + "radius": 1.1121, + "color": [ + 133, + 30, + 15 + ] + }, + { + "position": [ + -0.8726, + -0.4977, + 3.2454 + ], + "radius": 1.1684, + "color": [ + 105, + 17, + 12 + ] + }, + { + "position": [ + -0.917, + -0.2047, + 3.0878 + ], + "radius": 1.2249, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + -0.8769, + 0.1055, + 2.9664 + ], + "radius": 1.1288, + "color": [ + 155, + 49, + 35 + ] + }, + { + "position": [ + -0.7521, + 0.4086, + 2.8924 + ], + "radius": 0.9937, + "color": [ + 151, + 50, + 33 + ] + }, + { + "position": [ + -0.5892, + 0.6997, + 2.8438 + ], + "radius": 0.8601, + "color": [ + 120, + 37, + 19 + ] + }, + { + "position": [ + 0.935, + 0.4104, + 1.8814 + ], + "radius": 0.3467, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 0.972, + 0.4867, + 1.752 + ], + "radius": 0.3253, + "color": [ + 149, + 37, + 18 + ] + }, + { + "position": [ + 1.009, + 0.5629, + 1.6225 + ], + "radius": 0.304, + "color": [ + 110, + 20, + 14 + ] + }, + { + "position": [ + 1.046, + 0.6392, + 1.4931 + ], + "radius": 0.2826, + "color": [ + 150, + 46, + 32 + ] + }, + { + "position": [ + 1.083, + 0.7155, + 1.3636 + ], + "radius": 0.2613, + "color": [ + 138, + 45, + 27 + ] + }, + { + "position": [ + 1.1201, + 0.7918, + 1.2342 + ], + "radius": 0.2399, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -0.935, + 0.4104, + 1.8814 + ], + "radius": 0.3467, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -0.972, + 0.4867, + 1.752 + ], + "radius": 0.3253, + "color": [ + 149, + 37, + 18 + ] + }, + { + "position": [ + -1.009, + 0.5629, + 1.6225 + ], + "radius": 0.304, + "color": [ + 110, + 20, + 14 + ] + }, + { + "position": [ + -1.046, + 0.6392, + 1.4931 + ], + "radius": 0.2826, + "color": [ + 150, + 46, + 32 + ] + }, + { + "position": [ + -1.083, + 0.7155, + 1.3636 + ], + "radius": 0.2613, + "color": [ + 138, + 45, + 27 + ] + }, + { + "position": [ + -1.1201, + 0.7918, + 1.2342 + ], + "radius": 0.2399, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 1.4282, + -0.4012, + 0.1195 + ], + "radius": 0.1746, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 1.3653, + -0.5079, + 0.1065 + ], + "radius": 0.167, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + 1.3024, + -0.6146, + 0.0936 + ], + "radius": 0.1595, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + 1.2395, + -0.7213, + 0.0806 + ], + "radius": 0.152, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + 1.1766, + -0.828, + 0.0677 + ], + "radius": 0.1444, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + 1.1136, + -0.9347, + 0.0547 + ], + "radius": 0.1369, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + 1.0507, + -1.0414, + 0.0418 + ], + "radius": 0.1294, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + 0.9878, + -1.1481, + 0.0288 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -1.4282, + -0.4012, + 0.1195 + ], + "radius": 0.1746, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -1.3653, + -0.5079, + 0.1065 + ], + "radius": 0.167, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + -1.3024, + -0.6146, + 0.0936 + ], + "radius": 0.1595, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + -1.2395, + -0.7213, + 0.0806 + ], + "radius": 0.152, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + -1.1766, + -0.828, + 0.0677 + ], + "radius": 0.1444, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + -1.1136, + -0.9347, + 0.0547 + ], + "radius": 0.1369, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + -1.0507, + -1.0414, + 0.0418 + ], + "radius": 0.1294, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + -0.9878, + -1.1481, + 0.0288 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 1.4949, + -0.4194, + 0.1195 + ], + "radius": 0.1744, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 1.5013, + -0.5538, + 0.1065 + ], + "radius": 0.1669, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + 1.5076, + -0.6882, + 0.0936 + ], + "radius": 0.1594, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + 1.514, + -0.8226, + 0.0806 + ], + "radius": 0.1519, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + 1.5203, + -0.957, + 0.0677 + ], + "radius": 0.1443, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + 1.5267, + -1.0914, + 0.0547 + ], + "radius": 0.1368, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + 1.533, + -1.2258, + 0.0418 + ], + "radius": 0.1293, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + 1.5394, + -1.3602, + 0.0288 + ], + "radius": 0.1218, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -1.4949, + -0.4194, + 0.1195 + ], + "radius": 0.1744, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -1.5013, + -0.5538, + 0.1065 + ], + "radius": 0.1669, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + -1.5076, + -0.6882, + 0.0936 + ], + "radius": 0.1594, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + -1.514, + -0.8226, + 0.0806 + ], + "radius": 0.1519, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + -1.5203, + -0.957, + 0.0677 + ], + "radius": 0.1443, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + -1.5267, + -1.0914, + 0.0547 + ], + "radius": 0.1368, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + -1.533, + -1.2258, + 0.0418 + ], + "radius": 0.1293, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + -1.5394, + -1.3602, + 0.0288 + ], + "radius": 0.1218, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 1.6161, + -0.3951, + 0.1195 + ], + "radius": 0.1746, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 1.6866, + -0.5001, + 0.1065 + ], + "radius": 0.167, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + 1.757, + -0.6051, + 0.0936 + ], + "radius": 0.1595, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + 1.8274, + -0.71, + 0.0806 + ], + "radius": 0.152, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + 1.8978, + -0.815, + 0.0677 + ], + "radius": 0.1445, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + 1.9683, + -0.92, + 0.0547 + ], + "radius": 0.1369, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + 2.0387, + -1.0249, + 0.0418 + ], + "radius": 0.1294, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + 2.1091, + -1.1299, + 0.0288 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -1.6161, + -0.3951, + 0.1195 + ], + "radius": 0.1746, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -1.6866, + -0.5001, + 0.1065 + ], + "radius": 0.167, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + -1.757, + -0.6051, + 0.0936 + ], + "radius": 0.1595, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + -1.8274, + -0.71, + 0.0806 + ], + "radius": 0.152, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + -1.8978, + -0.815, + 0.0677 + ], + "radius": 0.1445, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + -1.9683, + -0.92, + 0.0547 + ], + "radius": 0.1369, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + -2.0387, + -1.0249, + 0.0418 + ], + "radius": 0.1294, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + -2.1091, + -1.1299, + 0.0288 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 1.5495, + -0.1709, + 0.1195 + ], + "radius": 0.1747, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 1.5536, + -0.047, + 0.1048 + ], + "radius": 0.1671, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + 1.5577, + 0.077, + 0.0901 + ], + "radius": 0.1596, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + 1.5618, + 0.2009, + 0.0754 + ], + "radius": 0.1521, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + 1.566, + 0.3248, + 0.0608 + ], + "radius": 0.1445, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + 1.5701, + 0.4487, + 0.0461 + ], + "radius": 0.137, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + 1.5742, + 0.5726, + 0.0314 + ], + "radius": 0.1295, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + 1.5784, + 0.6965, + 0.0167 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -1.5495, + -0.1709, + 0.1195 + ], + "radius": 0.1747, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -1.5536, + -0.047, + 0.1048 + ], + "radius": 0.1671, + "color": [ + 139, + 35, + 16 + ] + }, + { + "position": [ + -1.5577, + 0.077, + 0.0901 + ], + "radius": 0.1596, + "color": [ + 123, + 25, + 13 + ] + }, + { + "position": [ + -1.5618, + 0.2009, + 0.0754 + ], + "radius": 0.1521, + "color": [ + 116, + 24, + 16 + ] + }, + { + "position": [ + -1.566, + 0.3248, + 0.0608 + ], + "radius": 0.1445, + "color": [ + 145, + 42, + 30 + ] + }, + { + "position": [ + -1.5701, + 0.4487, + 0.0461 + ], + "radius": 0.137, + "color": [ + 160, + 54, + 37 + ] + }, + { + "position": [ + -1.5742, + 0.5726, + 0.0314 + ], + "radius": 0.1295, + "color": [ + 124, + 39, + 21 + ] + }, + { + "position": [ + -1.5784, + 0.6965, + 0.0167 + ], + "radius": 0.1219, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + 1.1828, + 0.881, + 1.0707 + ], + "radius": 0.1963, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + 1.2095, + 0.8276, + 1.0173 + ], + "radius": 0.1636, + "color": [ + 95, + 22, + 8 + ] + }, + { + "position": [ + 1.2362, + 0.7742, + 0.964 + ], + "radius": 0.1304, + "color": [ + 119, + 29, + 12 + ] + }, + { + "position": [ + 1.2595, + 0.7168, + 0.9145 + ], + "radius": 0.1054, + "color": [ + 142, + 36, + 16 + ] + }, + { + "position": [ + 1.2719, + 0.6469, + 0.8775 + ], + "radius": 0.1023, + "color": [ + 149, + 37, + 18 + ] + }, + { + "position": [ + 1.2843, + 0.5769, + 0.8406 + ], + "radius": 0.0994, + "color": [ + 134, + 30, + 15 + ] + }, + { + "position": [ + 1.2967, + 0.5069, + 0.8037 + ], + "radius": 0.0964, + "color": [ + 119, + 23, + 13 + ] + }, + { + "position": [ + 1.3091, + 0.4369, + 0.7667 + ], + "radius": 0.0935, + "color": [ + 103, + 16, + 10 + ] + }, + { + "position": [ + 1.3214, + 0.367, + 0.7298 + ], + "radius": 0.0906, + "color": [ + 110, + 20, + 14 + ] + }, + { + "position": [ + 1.3338, + 0.297, + 0.6928 + ], + "radius": 0.0876, + "color": [ + 120, + 27, + 18 + ] + }, + { + "position": [ + 1.3462, + 0.227, + 0.6559 + ], + "radius": 0.0847, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + 1.3586, + 0.1571, + 0.6189 + ], + "radius": 0.0817, + "color": [ + 140, + 40, + 28 + ] + }, + { + "position": [ + 1.371, + 0.0871, + 0.582 + ], + "radius": 0.0788, + "color": [ + 150, + 46, + 32 + ] + }, + { + "position": [ + 1.3834, + 0.0171, + 0.545 + ], + "radius": 0.0759, + "color": [ + 160, + 53, + 37 + ] + }, + { + "position": [ + 1.3958, + -0.0529, + 0.5081 + ], + "radius": 0.0728, + "color": [ + 164, + 55, + 38 + ] + }, + { + "position": [ + 1.4097, + -0.1197, + 0.4684 + ], + "radius": 0.0752, + "color": [ + 151, + 50, + 33 + ] + }, + { + "position": [ + 1.4373, + -0.1581, + 0.4037 + ], + "radius": 0.1252, + "color": [ + 139, + 45, + 27 + ] + }, + { + "position": [ + 1.465, + -0.1965, + 0.3391 + ], + "radius": 0.175, + "color": [ + 126, + 39, + 22 + ] + }, + { + "position": [ + 1.4926, + -0.2349, + 0.2745 + ], + "radius": 0.1909, + "color": [ + 113, + 34, + 16 + ] + }, + { + "position": [ + 1.5202, + -0.2732, + 0.2099 + ], + "radius": 0.179, + "color": [ + 101, + 29, + 11 + ] + }, + { + "position": [ + 1.5479, + -0.3116, + 0.1452 + ], + "radius": 0.1672, + "color": [ + 88, + 23, + 5 + ] + }, + { + "position": [ + -1.1828, + 0.881, + 1.0707 + ], + "radius": 0.1963, + "color": [ + 72, + 14, + 3 + ] + }, + { + "position": [ + -1.2095, + 0.8276, + 1.0173 + ], + "radius": 0.1636, + "color": [ + 95, + 22, + 8 + ] + }, + { + "position": [ + -1.2362, + 0.7742, + 0.964 + ], + "radius": 0.1304, + "color": [ + 119, + 29, + 12 + ] + }, + { + "position": [ + -1.2595, + 0.7168, + 0.9145 + ], + "radius": 0.1054, + "color": [ + 142, + 36, + 16 + ] + }, + { + "position": [ + -1.2719, + 0.6469, + 0.8775 + ], + "radius": 0.1023, + "color": [ + 149, + 37, + 18 + ] + }, + { + "position": [ + -1.2843, + 0.5769, + 0.8406 + ], + "radius": 0.0994, + "color": [ + 134, + 30, + 15 + ] + }, + { + "position": [ + -1.2967, + 0.5069, + 0.8037 + ], + "radius": 0.0964, + "color": [ + 119, + 23, + 13 + ] + }, + { + "position": [ + -1.3091, + 0.4369, + 0.7667 + ], + "radius": 0.0935, + "color": [ + 103, + 16, + 10 + ] + }, + { + "position": [ + -1.3214, + 0.367, + 0.7298 + ], + "radius": 0.0906, + "color": [ + 110, + 20, + 14 + ] + }, + { + "position": [ + -1.3338, + 0.297, + 0.6928 + ], + "radius": 0.0876, + "color": [ + 120, + 27, + 18 + ] + }, + { + "position": [ + -1.3462, + 0.227, + 0.6559 + ], + "radius": 0.0847, + "color": [ + 130, + 33, + 23 + ] + }, + { + "position": [ + -1.3586, + 0.1571, + 0.6189 + ], + "radius": 0.0817, + "color": [ + 140, + 40, + 28 + ] + }, + { + "position": [ + -1.371, + 0.0871, + 0.582 + ], + "radius": 0.0788, + "color": [ + 150, + 46, + 32 + ] + }, + { + "position": [ + -1.3834, + 0.0171, + 0.545 + ], + "radius": 0.0759, + "color": [ + 160, + 53, + 37 + ] + }, + { + "position": [ + -1.3958, + -0.0529, + 0.5081 + ], + "radius": 0.0728, + "color": [ + 164, + 55, + 38 + ] + }, + { + "position": [ + -1.4097, + -0.1197, + 0.4684 + ], + "radius": 0.0752, + "color": [ + 151, + 50, + 33 + ] + }, + { + "position": [ + -1.4373, + -0.1581, + 0.4037 + ], + "radius": 0.1252, + "color": [ + 139, + 45, + 27 + ] + }, + { + "position": [ + -1.465, + -0.1965, + 0.3391 + ], + "radius": 0.175, + "color": [ + 126, + 39, + 22 + ] + }, + { + "position": [ + -1.4926, + -0.2349, + 0.2745 + ], + "radius": 0.1909, + "color": [ + 113, + 34, + 16 + ] + }, + { + "position": [ + -1.5202, + -0.2732, + 0.2099 + ], + "radius": 0.179, + "color": [ + 101, + 29, + 11 + ] + }, + { + "position": [ + -1.5479, + -0.3116, + 0.1452 + ], + "radius": 0.1672, + "color": [ + 88, + 23, + 5 + ] + } +] \ No newline at end of file diff --git a/src/cg/bird/bird_static.blend b/src/cg/bird/bird_static.blend new file mode 100644 index 0000000000000000000000000000000000000000..62c9a50ff07a1acac199fc5958f4599c363bc97b Binary files /dev/null and b/src/cg/bird/bird_static.blend differ diff --git a/src/cg/bird/render.spheres.1.png b/src/cg/bird/render.spheres.1.png new file mode 100644 index 0000000000000000000000000000000000000000..f52ac22b9cf6069730d64db0d0b6cef09f35052e Binary files /dev/null and b/src/cg/bird/render.spheres.1.png differ diff --git a/src/cg/bird/render.spheres.10.png b/src/cg/bird/render.spheres.10.png new file mode 100644 index 0000000000000000000000000000000000000000..afcf429a2e31243f3419ab3ff8575e611d5335c8 Binary files /dev/null and b/src/cg/bird/render.spheres.10.png differ diff --git a/src/cg/bird/render.spheres.11.png b/src/cg/bird/render.spheres.11.png new file mode 100644 index 0000000000000000000000000000000000000000..f52ac22b9cf6069730d64db0d0b6cef09f35052e Binary files /dev/null and b/src/cg/bird/render.spheres.11.png differ diff --git a/src/cg/bird/render.spheres.2.png b/src/cg/bird/render.spheres.2.png new file mode 100644 index 0000000000000000000000000000000000000000..2c2cf244c38bdf7ef271e0f064ce0e31d04f70be Binary files /dev/null and b/src/cg/bird/render.spheres.2.png differ diff --git a/src/cg/bird/render.spheres.3.png b/src/cg/bird/render.spheres.3.png new file mode 100644 index 0000000000000000000000000000000000000000..aff1bb2a4cce340f6ee9cb91e356db820556485e Binary files /dev/null and b/src/cg/bird/render.spheres.3.png differ diff --git a/src/cg/bird/render.spheres.5.png b/src/cg/bird/render.spheres.5.png new file mode 100644 index 0000000000000000000000000000000000000000..b4e45670aa0a76351bbad0accbbed5ae6b15bd1b Binary files /dev/null and b/src/cg/bird/render.spheres.5.png differ diff --git a/src/cg/bird/render.spheres.6.png b/src/cg/bird/render.spheres.6.png new file mode 100644 index 0000000000000000000000000000000000000000..9187b26a0f56200775e9cbc426f9fe394937d7d3 Binary files /dev/null and b/src/cg/bird/render.spheres.6.png differ diff --git a/src/cg/bird/render.spheres.7.png b/src/cg/bird/render.spheres.7.png new file mode 100644 index 0000000000000000000000000000000000000000..c2b432b3d6ac2d1886917139fb3f192b3ca2fbe3 Binary files /dev/null and b/src/cg/bird/render.spheres.7.png differ diff --git a/src/cg/bird/render.spheres.8.png b/src/cg/bird/render.spheres.8.png new file mode 100644 index 0000000000000000000000000000000000000000..559f45ec986b959e6fb968880adca6d0ee95bb71 Binary files /dev/null and b/src/cg/bird/render.spheres.8.png differ diff --git a/src/cg/bird/render.spheres.9.png b/src/cg/bird/render.spheres.9.png new file mode 100644 index 0000000000000000000000000000000000000000..4816cb1cf4b14efe14a6746ad65f93a158ff6bef Binary files /dev/null and b/src/cg/bird/render.spheres.9.png differ