Skip to content

Commit

Permalink
[Project]: Adding Raytracer_from_Scratch project (#219)
Browse files Browse the repository at this point in the history
* Added Raytracer_from_Scratch.md

Added the markdown file for Raytracer from Scratch project for Eklavya 2024.

* Adding md file for Raytracer_from_Scratch Project

* Adding project folder for Raytracer_from_Scratch project for Eklavya 2024 and updating index.html
  • Loading branch information
Faulty404 authored Jun 17, 2024
1 parent c31c65c commit e25aebd
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 0 deletions.
33 changes: 33 additions & 0 deletions _projects/Raytracer_from_ Scratch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: page
title: Raytracer from Scratch
description: Write a Raytracer for a scene developed in OpenGL and optimize it using CUDA
importance: 1
---

| Project Domains | Mentors | Project Difficulty |
|----------------------------------------------|---------------------------------|--------------------|
| OpenGL, CUDA, Graphics programming | Anish Mahadevan | Medium |

<br>

### Project Description

The project's goal is to create a ray tracer from scratch and apply it to a scene that has been optimized with graphics programming (CUDA) and displayed with OpenGL. This project employs ray tracing mathematics, implemented in a CUDA kernel for optimal speed, to implement shadows, reflections, and textures. It then applies the texture to an OpenGL-rendered scene.An interactive introduction to graphics programming and ray tracing is provided by this project.


### Prerequisties

- Good knowledge of C++




### Resources

- [OpenGL](https://opengl.org/)

- [CUDA](https://github.com/csc-training/CUDA/blob/master/course-material/intro-to-cuda-csc.pdf)

- [Ray Tracers](https://developer.nvidia.com/discover/ray-tracing)

305 changes: 305 additions & 0 deletions _site/projects/Raytracer_from_ Scratch/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
<!DOCTYPE html>
<html lang="en">

<!-- Head -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Metadata, OpenGraph and Schema.org -->


<!-- Standard metadata -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Raytracer from Scratch | Eklavya 2024 </title>
<meta name="author" content="Eklavya 2024 ">
<meta name="description" content="Write a Raytracer for a scene developed in OpenGL and optimize it using CUDA">
<meta name="keywords" content="jekyll, jekyll-theme, academic-website, portfolio-website">


<!-- Bootstrap & MDB -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-DF7Zhf293AJxJNTmh5zhoYYIMs2oXitRfBjY+9L//AY=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/mdb.min.css" integrity="sha256-jpjYvU3G3N6nrrBwXJoVEYI/0zw8htfFnhT9ljN3JJw=" crossorigin="anonymous">

<!-- Bootstrap Table -->
<link defer rel="stylesheet" href="https://unpkg.com/[email protected]/dist/bootstrap-table.min.css">

<!-- Fonts & Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/academicons.min.css" integrity="sha256-i1+4qU2G2860dGGIOJscdC30s9beBXjFfzjWLjBRsBg=" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">

<!-- Code Syntax Highlighting -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/github.css" media="" id="highlight_theme_light">



<!-- Styles -->

<link rel="shortcut icon" href="/assets/img/favicon.ico">

<link rel="stylesheet" href="/assets/css/main.css">
<link rel="canonical" href="http://localhost:4000/projects/Raytracer_from_%20Scratch/">

<!-- Dark Mode -->

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/native.css" media="none" id="highlight_theme_dark">

<script src="/assets/js/theme.js"></script>
<script src="/assets/js/dark_mode.js"></script>


</head>

<!-- Body -->
<body class="fixed-top-nav ">

<!-- Header -->
<header>

<!-- Nav Bar -->
<nav id="navbar" class="navbar navbar-light navbar-expand-sm fixed-top">
<div class="container">
<a class="navbar-brand title font-weight-lighter" href="/"><!-- <span class="font-weight-bold">Eklavya 2024&nbsp;</span> -->
<img src="/assets/img/EKLAVYA_2024__6_-removebg-preview.png" alt="heading" style="width: 300px; height: 40px; object-fit: cover; object-position: 0% 45%"></a>
<!-- Navbar Toggle -->
<button class="navbar-toggler collapsed ml-auto" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar top-bar"></span>
<span class="icon-bar middle-bar"></span>
<span class="icon-bar bottom-bar"></span>
</button>

<div class="collapse navbar-collapse text-right" id="navbarNav">
<ul class="navbar-nav ml-auto flex-nowrap">

<!-- About -->
<li class="nav-item ">
<a class="nav-link" href="/">Home</a>
</li>


<!-- Other pages -->
<li class="nav-item ">
<a class="nav-link" href="/leaderboard/">Leaderboard</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="/projects/">Eklavya Projects</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="/tasks/">Tasks</a>
</li>

<!-- Toogle theme mode -->
<!-- <li class="toggle-container">
<button id="light-toggle" title="Change theme">
<i class="fas fa-moon"></i>
<i class="fas fa-sun"></i>
</button>
</li> -->
</ul>
</div>
</div>
</nav>

<!-- Scrolling Progress Bar -->
<progress id="progress" value="0">
<div class="progress-container">
<span class="progress-bar"></span>
</div>
</progress>
</header>


<!-- Content -->
<div class="container mt-5">

<!-- page.html -->
<div class="post table-borderless">

<header class="post-header">
<h1 class="post-title">Raytracer from Scratch</h1>
<p class="post-description">Write a Raytracer for a scene developed in OpenGL and optimize it using CUDA</p>
</header>

<article>
<table>
<thead>
<tr>
<th>Project Domains</th>
<th>Mentors</th>
<th>Project Difficulty</th>
</tr>
</thead>
<tbody>
<tr>
<td>OpenGL, CUDA, Graphics programming</td>
<td>Anish Mahadevan</td>
<td>Medium</td>
</tr>
</tbody>
</table>

<p><br></p>

<h3 id="project-description">Project Description</h3>

<p>The project’s goal is to create a ray tracer from scratch and apply it to a scene that has been optimized with graphics programming (CUDA) and displayed with OpenGL. This project employs ray tracing mathematics, implemented in a CUDA kernel for optimal speed, to implement shadows, reflections, and textures. It then applies the texture to an OpenGL-rendered scene.An interactive introduction to graphics programming and ray tracing is provided by this project.</p>

<h3 id="prerequisties">Prerequisties</h3>

<ul>
<li>Good knowledge of C++</li>
</ul>

<h3 id="resources">Resources</h3>

<ul>
<li>
<p><a href="https://opengl.org/" rel="external nofollow noopener" target="_blank">OpenGL</a></p>
</li>
<li>
<p><a href="https://github.com/csc-training/CUDA/blob/master/course-material/intro-to-cuda-csc.pdf" rel="external nofollow noopener" target="_blank">CUDA</a></p>
</li>
<li>
<p><a href="https://developer.nvidia.com/discover/ray-tracing" rel="external nofollow noopener" target="_blank">Ray Tracers</a></p>
</li>
</ul>


</article>

</div>


</div>

<!-- Footer --> <!--
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright 2024 Eklavya 2024 . Powered by <a href="https://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>. Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
</div>
</footer> -->

<!-- JavaScripts -->
<!-- jQuery -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

<!-- Bootsrap & MDB scripts -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha256-fgLAgv7fyCGopR/gBNq2iW3ZKIdqIcyshnUULC4vex8=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/mdb.min.js" integrity="sha256-NdbiivsvWt7VYCt6hYNT3h/th9vSTL4EDWeGs5SN3DA=" crossorigin="anonymous"></script>

<!-- Masonry & imagesLoaded -->
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/masonry.pkgd.min.js" integrity="sha256-Nn1q/fx0H7SNLZMQ5Hw5JLaTRZp0yILA/FRexe19VdI=" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script defer src="/assets/js/masonry.js" type="text/javascript"></script>

<!-- Medium Zoom JS -->
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/medium-zoom.min.js" integrity="sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8=" crossorigin="anonymous"></script>
<script defer src="/assets/js/zoom.js"></script>

<!-- Bootstrap Table -->
<script defer src="https://unpkg.com/[email protected]/dist/bootstrap-table.min.js"></script>

<!-- Load Common JS -->
<script src="/assets/js/no_defer.js"></script>
<script defer src="/assets/js/common.js"></script>
<script defer src="/assets/js/copy_code.js" type="text/javascript"></script>


<script async src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>
<script async src="https://badge.dimensions.ai/badge.js"></script>

<!-- MathJax -->
<script type="text/javascript">
window.MathJax = {
tex: {
tags: 'ams'
}
};
</script>
<script defer type="text/javascript" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-chtml.js"></script>
<script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>




<!-- Scrolling Progress Bar -->
<script type="text/javascript">
/*
* This JavaScript code has been adapted from the article
* https://css-tricks.com/reading-position-indicator/ authored by Pankaj Parashar,
* published on the website https://css-tricks.com on the 7th of May, 2014.
* Couple of changes were made to the original code to make it compatible
* with the `al-foio` theme.
*/
const progressBar = $("#progress");
/*
* We set up the bar after all elements are done loading.
* In some cases, if the images in the page are larger than the intended
* size they'll have on the page, they'll be resized via CSS to accomodate
* the desired size. This mistake, however, breaks the computations as the
* scroll size is computed as soon as the elements finish loading.
* To account for this, a minimal delay was introduced before computing the
* values.
*/
window.onload = function () {
setTimeout(progressBarSetup, 50);
};
/*
* We set up the bar according to the browser.
* If the browser supports the progress element we use that.
* Otherwise, we resize the bar thru CSS styling
*/
function progressBarSetup() {
if ("max" in document.createElement("progress")) {
initializeProgressElement();
$(document).on("scroll", function() {
progressBar.attr({ value: getCurrentScrollPosition() });
});
$(window).on("resize", initializeProgressElement);
} else {
resizeProgressBar();
$(document).on("scroll", resizeProgressBar);
$(window).on("resize", resizeProgressBar);
}
}
/*
* The vertical scroll position is the same as the number of pixels that
* are hidden from view above the scrollable area. Thus, a value > 0 is
* how much the user has scrolled from the top
*/
function getCurrentScrollPosition() {
return $(window).scrollTop();
}

function initializeProgressElement() {
let navbarHeight = $("#navbar").outerHeight(true);
$("body").css({ "padding-top": navbarHeight });
$("progress-container").css({ "padding-top": navbarHeight });
progressBar.css({ top: navbarHeight });
progressBar.attr({
max: getDistanceToScroll(),
value: getCurrentScrollPosition(),
});
}
/*
* The offset between the html document height and the browser viewport
* height will be greater than zero if vertical scroll is possible.
* This is the distance the user can scroll
*/
function getDistanceToScroll() {
return $(document).height() - $(window).height();
}

function resizeProgressBar() {
progressBar.css({ width: getWidthPercentage() + "%" });
}
// The scroll ratio equals the percentage to resize the bar
function getWidthPercentage() {
return (getCurrentScrollPosition() / getDistanceToScroll()) * 100;
}
</script>

</body>
</html>
14 changes: 14 additions & 0 deletions _site/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ <h2 class="card-title text-wrap">Micromouse</h2>
</div>
<!-- _includes/projects.html -->
<div class="grid-sizer"></div>
<div class="grid-item">
<a href="/projects/Raytracer_from_%20Scratch/">
<div class="card hoverable">
<div class="card-body">
<h2 class="card-title text-wrap">Raytracer from Scratch</h2>
<p class="card-text">Write a Raytracer for a scene developed in OpenGL and optimize it using CUDA</p>
<div class="row ml-1 mr-1 p-0">
</div>
</div>
</div>
</a>
</div>
<!-- _includes/projects.html -->
<div class="grid-sizer"></div>
<div class="grid-item">
<a href="/projects/Titan-Quadruped/">
<div class="card hoverable">
Expand Down

0 comments on commit e25aebd

Please sign in to comment.