Skip to content

Commit

Permalink
add torus background animation
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnedu committed Oct 24, 2024
1 parent c567c32 commit 9603936
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ German _(Native)_ • English _(Proficient)_ • French _(Elementary)_

### Recommender Systems for Swiss Politics
*Master’s Thesis* (Feb 2024 - Aug 2024)
Paper _(confidential - under submission)_ | [Smartvote](https://www.smartvote.ch/)
Paper _(confidential - under submission)_ | **[Smartvote](https://www.smartvote.ch/)**

Identified 11 vulnerabilities in the swiss voting advice application **Smartvote** with
some allowing for more than 3.5x visibility gains for individual parties. Proposed 10
Expand All @@ -113,7 +113,7 @@ being **adopted** in Smartvote’s redesign for the next elections.

### DataComp Challenge
*Semester Project* (Sep 2023 - Dec 2023)
[Report](https://pub.tik.ee.ethz.ch/students/2023-HS/GA-2023-09.pdf) | [DataComp Website](https://www.datacomp.ai/)
**[Report](https://pub.tik.ee.ethz.ch/students/2023-HS/GA-2023-09.pdf)** | **[DataComp Website](https://www.datacomp.ai/)**

Ranked 4th out of 12 teams in the small track of the DataComp Challenge, an ML benchmark where the goal was to filter a **CommonCrawl** image-text dataset to train a **CLIP** model evaluated on 38 zero-shot downstream tasks, using a combination of cross-modality filtering and content alignment.

Expand All @@ -123,7 +123,7 @@ Ranked 4th out of 12 teams in the small track of the DataComp Challenge, an ML b

### BasketXplainer
*Interactive ML Project* (Feb 2023 - Jul 2023)
[Interactive Demo](http://b5-winning-in-basketball.course-xai-iml23.isginf.ch/) | [Paper](https://rdcu.be/dXhu2) | [GitHub](https://github.com/brunnedu/BasketXplainer)
**[Interactive Demo](http://b5-winning-in-basketball.course-xai-iml23.isginf.ch/)** | **[Paper](https://rdcu.be/dXhu2)** | **[GitHub](https://github.com/brunnedu/BasketXplainer)**

Developed an interactive dashboard to predict basketball game outcomes based on in-game stats and explain predictions using **SHAP** values. Users could modify team statistics to explore **what-if scenarios**.

Expand All @@ -133,7 +133,7 @@ Developed an interactive dashboard to predict basketball game outcomes based on

### Darts Forecasting Library
*Contributor* (Sep 2021 - Aug 2022)
[Documentation](https://unit8co.github.io/darts/) | [Paper](https://arxiv.org/pdf/2110.03224) | [GitHub](https://github.com/unit8co/darts)
**[Documentation](https://unit8co.github.io/darts/)** | **[Paper](https://arxiv.org/pdf/2110.03224)** | **[GitHub](https://github.com/unit8co/darts)**

**Core contributor** to the open-source time series forecasting library Darts by Unit8. Optimized the most popular regression forecasting models by vectorizing computations achieving a speedup of up to **400x**.

Expand All @@ -146,7 +146,7 @@ pip install darts

### Distance Preserving Graph Embedding
*Bachelor’s Thesis* (Feb 2021 - Aug 2021)
[Report](https://pub.tik.ee.ethz.ch/students/2021-FS/BA-2021-17.pdf)
**[Report](https://pub.tik.ee.ethz.ch/students/2021-FS/BA-2021-17.pdf)**

Developed a model that enables constant-time approximate **shortest path distance
queries** on road networks, achieving an average mean relative error of less than **10%**.
Expand Down
24 changes: 24 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title | escape }}</title>
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
{{ content_for_header }}
</head>
<body>

<!-- Create a canvas for the torus animation -->
<canvas id="torusCanvas"></canvas>

<!-- The main content of your page will go here -->
<div class="content">
{{ content }}
</div>

<!-- Include Three.js and the animation script -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
<script src="{{ "/assets/script.js" | relative_url }}"></script>
</body>
</html>
22 changes: 21 additions & 1 deletion assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,24 @@
.wrapper section {
width: auto;
}
}
}


/* Set canvas to cover the whole background */
#torusCanvas {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: -1; /* Make sure the canvas is behind the content */
pointer-events: none; /* Allow clicks through the canvas */
}

/* Ensure the content is displayed above the canvas */
.content {
position: relative;
z-index: 1;
color: black; /* Adjust text color to ensure it stands out against the animation */
padding: 20px;
}
30 changes: 30 additions & 0 deletions assets/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Set up the scene, camera, and renderer
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: document.querySelector('#torusCanvas'), alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);

// Create a blue torus
const geometry = new THREE.TorusGeometry(1, 0.4, 16, 100);
const material = new THREE.MeshBasicMaterial({ color: 0x0000ff, wireframe: true });
const torus = new THREE.Mesh(geometry, material);
scene.add(torus);

// Position the camera
camera.position.z = 5;

// Animation loop
function animate() {
requestAnimationFrame(animate);
torus.rotation.x += 0.01;
torus.rotation.y += 0.01;
renderer.render(scene, camera);
}
animate();

// Adjust canvas on resize
window.addEventListener('resize', () => {
renderer.setSize(window.innerWidth, window.innerHeight);
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
});

0 comments on commit 9603936

Please sign in to comment.