Black Hole Distributed Raymarcher

Black Hole Distributed Raymarcher

by GCgamesandcartoons

👁 428 ❤️ 26 ⭐ 17 🔄 1
Created: Jun 26, 2022 Last modified: Jul 2, 2022 Shared: Jun 26, 2022

Description

https://turbowarp.org/709319751?turbo&stuck UPDATES ON PREVIOUS: - Accretion disk - Reflective sphere - Antialiasing HOW THIS WORKS: This is based on the formula F=G*(m1*m2)/r^2, where r is the distance between two objects, G is gravity, m1 and m2 are the object masses, and F is the force of attraction between them. This casts rays from the camera (mass of 1), and some are warped towards and sucked into the black hole, whereas some make it past. Those that make it past form a grid, to demonstrate the warping of spacetime. So, for the ray direction, I made a velocity vector, by creating a new point in the desired direction 'pointing' towards it, then normalising the vector. For every iteration, the photon moves by velocity amount, then the force is calculated with the above formula, and the vector from the photon position to the black hole, rather than the target point, is multiplied by the force of attraction. That is added to the velocity vector, it is normalised again, and it repeats from there.

Instructions

Press the flag and wait. This utilises monte-carlo multisampling. The sphere's reflection looks off because light behaves strangely here.

Project Details

Visibility
Visible
Comments
Enabled

More Cool Projects

Project thumbnail
View Project

[Beta, no SSTs] Hyperactive Atlantic Hurricane Season Simulator

by scratchmaster295

Project thumbnail
View Project

【メダゲ】Scratch烈伝 ネコカバトル キャットのメダル Ver5.1.0

by prigon325

Project thumbnail
View Project

Knife Hit v1.2 #games #all [scratch remake]

by sppurpleeagle02

Project thumbnail
View Project

(5.3) Jolly Sprite Pack

by mo2299311

Project thumbnail
View Project

Scooter remix remix-3 copy remix-3 remix

by Timpson

Project thumbnail
View Project

Miniraft v1.30.2 (Moblie Friendly)

by somestuffgoodhopfuly

Project thumbnail
View Project

Punch-Out!! The Definitive Remake (Beta)

by ZappyBarbecue10

Project thumbnail
View Project

[裏技] 翻訳機能で使える言語を増やす方法。#tutorial

by Es-2

Project thumbnail
View Project

Tetrational Madness (100% Pen)

by Patcail

Project thumbnail
View Project

Template {free intro}

by robtop_Game3

Project thumbnail
View Project

VRaster v1.5.7

by sashimiricedev

Project thumbnail
View Project

尾上の松じょん

by tsurugamine

Project thumbnail
View Project

MPGL-player(black midi player)

by hevean_3

Project thumbnail
View Project

【マイクラMOD】まな板

by horiyouta

Project thumbnail
View Project

FNF Online

by EpikRobloxianHacked

Project thumbnail
View Project

block battle [7/0]

by miniepicness

Project thumbnail
View Project

Snake (And How I Made It)

by Ironisgold

Project thumbnail
View Project

Sonic Levitate 1.2.3

by AKidThatLikesMath

Project thumbnail
View Project

タッチ操作対応 アンダーテール アズリエル戦(製作途中)

by wanntannnabe

Project thumbnail
View Project

SONIC 3 ENGINE (UNFINISHED)

by FuzzFerretTM2

Project thumbnail
View Project

FNF - (Vs Imposter) Week 1

by Bradk2005

Project thumbnail
View Project

Not quite ball physics game v1.0

by griffpatch

Project thumbnail
View Project

Sky Island (Original)

by DingoBingo1022

Project thumbnail
View Project

Very Extremely Rich

by thereisalwayshope