DEV Community

Cover image for Coding project idea #three.js
Logan jordan
Logan jordan

Posted on

Coding project idea #three.js

So I am starting to really understand JavaScript html and css I have been learning it ever since I was in 5th grade (I’m in 10th grade now) and I have some ideas for projects that I would like to share with y’all and get your feedback/help with

So my first idea is a galactic event I really want to create a simulation for a galactic event and make it look as realistic as possible an Idea I am thinking about currently is a black hole I have done tons and tons of research and read through dozens and dozens of documents about black holes just to get an idea of how I would need to code it I would like to attempt to code a schwarzschild black hole but am not quite sure how to start I will definitely be thinking about how I would start it
but that’s not the only thing about this project idea, what about making it look realistic so I have looked at every article every document every NASA picture every picture claiming to be a black hole and I have learned something that I kind of feared… its a black hole dude you cant see it
so I’m wondering if I should make it as a bunch of colored dots to show whats actually happening kind of like this quick sketch I made but with a lot more presition and detail and way more dots XD

Image description

I want to do this with Three.js that way I can make it 3D and use shaders I need to use GLSL shaders for the design of it but don’t know how to use them (if you know how to use them or know someone who knows how to use them please send/tell them to send me a message)
I expect this project will take a few months at best and I would love to work with some of you on it

I would love to get to know y'all and to work with all of you on this project

Here are all the sources I have gathered

Source reference

http://spiro.fisica.unipd.it/~antonell/schwarzschild/

http://rantonels.github.io/starless/

https://github.com/oseiskar/black-hole

Related physics and maths

GR and blackhole

Circular Orbit

stellar color change

"Relativistically moving objects are beamed due to a variety of physical effects. Light aberration causes most of the photons to be emitted along the object's direction of motion. The Doppler effect changes the energy of the photons by red- or blueshifting them. Finally, time intervals as measured by clocks moving alongside the emitting object are different from those measured by an observer on Earth due to time dilation and photon arrival time effects. How all of these effects modify the brightness, or apparent luminosity, of a moving object is determined by the equation describing the relativistic Doppler effect (which is why relativistic beaming is also known as Doppler beaming)"

beaming - luminosity

doppler - wavelength change

blueshift from observer movement

redshift from stellar movement

the thing is, we don't know any information from static background texture,
so applying doppler effect does not make any sense.

temperature to color

Projection

Top comments (1)

Collapse
 
v_systems profile image
V_Systems

Apply your GLSL skills to the V Shader Hackathon, running until 22 May 2025!
Create unique Shader art to win up to $1000 :)

  • Create your original Shader
  • Upload the Javascript to the V Systems blockchain to turn it into an NFT
  • Be one of the 16 winners of prizes ranging $500-$1000

How to join: medium.com/vsystems/13-26-april-cr...

Any questions? Join our community!