mixed language orrery
- ~/readme/About
- ~/readme/Status
- ~/readme/References
- repo is for making solar system models done in whichever language i feel like it should be in
show more
- this will inherit from the work done in
scala_drawing
scala_ui_testing
cpp_isometric_grider
ProceduralCpp
- various other private repositories
- various content done for university assignments
- aim is to keep things as simple as possible to create the base structure which can then be made into something more.
- as it stands (at repository creation), both starting points have already suffered massive feature creep and will be simplified to just:
- 1 star at centre
- planets orbit star
- moons orbit planets
- ships/asteroids will be labeled as satellites and will be a milestone for each implementation
- everything should be kept as whichever portable drawing system is on hand easily for the given language that requires minimal starting time.
- further modifications for UI and other features can be done once foundation is setup
- changing drawing systems can then be treated as a new sub-project with the same language
- care should be taken to avoid initial use of any system that requires pixel based drawing until this project has more implementations and familiarity
- for the above point reason,
ncurses
should be secondary toraylib
/raygui
unless we find a function that handles circles or can use quick math to do it
- for inital plans, we'll probably stick to the
Kerbol System
fromKerbal Space Program 1
as it's what is most familiar in mind right now- inspiration didnt necessarily come from this, as it has been a long time that I've wanted to create this project.
- watching
For All Mankind
and playing a lot ofKerbal space program 1
lately has meant that my interest was returned and so could dust off old notes and plans
-
show/hide details
[12/02/2024]
- alpha with some feature creep, check todo[13/02/2024]
- somewhat prototype-
show/hide todo
[12/02/2024]
- need to fill in the other planets and moons[13/02/2024]
- changing over structure to list of orbiting satellites on a body, and those orbits hold what the thing is[13/02/2024]
- move stage paint code to solar system painter[13/02/2024]
- restructure window/app to be seperated out from main[13/02/2024]
- restructure the code to allow keyboard input[13/02/2024]
- restructure the code to allow mouse input[13/02/2024]
- add in wasd moves system center offset around[13/02/2024]
- add in q and e changes the zoom level of the sim[13/02/2024]
- change over toBigDecimal
[13/02/2024]
- status text stuff[13/02/2024]
- details of placement of things showing (red/yellow/green based on percentage of max)[13/02/2024]
- break circle into points of known values and work between them[13/02/2024]
- need labels of which planet is which[13/02/2024]
- need status of time speed[13/02/2024]
- need status of scale[13/02/2024]
- wikis have a decent explanation of orbits too[14/02/2024]
- change to use unit circle points and multi with value??[14/02/2024]
- placeholder?
-
show/hide changes
[13/02/2024]
- changed structure to having orbit list and each orbit holds ref to body[13/02/2024]
- changed to name of universe to solar system[13/02/2024]
- made the solar system painter class[13/02/2024]
- added in stubs for keyboard input[13/02/2024]
- added in code for updating the phase of each orbital[13/02/2024]
- added in code for centering on a body by reference[13/02/2024]
- added screenshots to readme[13/02/2024]
-wasd
controls scales[13/02/2024]
-f
cycles planet/sun focus[13/02/2024]
- added more bodies to the system[13/02/2024]
-b
toggles larger/smaller planet scale[13/02/2024]
- changed scaling over in an attempt to reduce precision loss, but will need to change toBigDecimal
to solve it[13/02/2024]
- placeholder?
- more to come
- Orrery
- solar system model
- Kerbol system
- solar system
- 3blue1brown linear transformations
- pi
- double precision
- unit circle explainer
- unit circle rolling toy
-
show / hide
Have the main Just does the applet code jpanel/jframe/paint loop, standard stuffThen you have stage, has the universe scale and a reference for sun
The sun is a celestialBody which has things orbiting it Those orbits are celestialBodies or ships They have semimajor axis, eccentricities and stuff Then you have the info about the body
Could seperate out the data from the drawn Celestial body is now obj with its details and orbit info Double linked? Or hands off data every draw?
Maybe it doesnt know about parent so you paint. From god view and can see the parent while painting
Painting is a depth first or bredth first? Probably bredth first
You have the objects and orbit data You set that up and its just a store
Then you can paint using that information based on current time to find where they are now
Maybe paint is dumb and doesnt calculate at all. Just paints
Now you could thread? Or you do update before a paint cycle. Theyre seperate accesses from main/paint loop level
tick(long chronoIntervalMillis) which hands off all children as a “time elapsed” since last update
Implication is u have a repaintTimeSince and updateTimeSince Paint is dumb and main worries about that But update figures out how long it takes and then predicts if it can do another before the next paint cycle?
Maybe update only happens when we need to paint. So we just keep track of
microverseOriginTimestamp lastPhysicsTimestamp lastPaintTimestamp
If it there’s enough time since we last painted, we do a paint, but we need to ask for new context to paint so we’re not painting old content. Check buffer
What if feature creep a buffer for paintables. So the buffer is updated with pixels of what we’re painting
https://en.wikipedia.org/wiki/Astronomical_object
Namables
Star is root
Planet is can have moons
Moon is can have asteroids and ships
Asteroid is can have ships
Ships is can have nothing. Terminal point
Star can have moon/asteroid/ship
Maybe we categorise by size??
Can only have object with a classification strictly less than the parent
Becomes min heap kinda?? Maybe make rules list
Orbitals are strictly less than or equal to the parental body
Floats only when it’s strictly finite small distances otherwise it’s double
Like drawing to screen could be float
But distances are doubles
satellites instead of ships/asteroids
So structure
Main Applet Stage Universe AstronomicalBody semimajoraxis orbitalperiod eccentricity angleofinclination angleofmajoraxis? Optional<List> orbitals
-
try for define the different points
try for the roation of the plane with the things then matrix math
try for the points around the circle returner?
try for the get via multi methods then average??
we should polynomial it
then we can figure out which things are adjacent/equivalent
then switch between the forms
like sliders between universe
but it's sliding between the different types of things we can use until we're using one that's good
break everything into smaller sub problems then build it back up
break into matrices of smaller numbers then return for building it back up into big numbers all at once?
numbers that refactor themselves
in the unit circle roller, it's the yello one that's spooky
the others there's 3/4 things lining up, but the yellow it's the one time it's kinda alone aside from blue
1pi/12
* 15d
5pi/12
* 75d
7pi/12
* 105d
11pi/12
* 165d
13pi/12
* 195d
17pi/12
* 255d
19pi/12
* 285d
23pi/12
* 345d
oh my god we found the 8
it's the Math.sin/Math.cos lerping
actually, maybe it's the drawn circle that's a spooker 🥲
oh my god it is, we checked documentation we gotta make a hemkn circle drawing now 🥲
Corbeau — Today at 16:21 ill have a better accuracy than [incorrectly targeted slander] ye idk if video shows it but it's like a sine wave in the deviation of the orbit like it's orbiting the path it's meant to take Mungo_ — Today at 16:22 what you could do is a variant of the circlePoints thing this is maybe a bit complicated Corbeau — Today at 16:23 i thought it was rounding error, bc it sounds like it would be, but it's literally just that they took the laziest approach in calculating it
Mungo_ — Today at 16:34 so with this, you could modify the function to draw n points on an arc of a circle then it would be a matter of finding where the circle intersects your camera rectangle Corbeau — Today at 16:35 C: oooooo good point Mungo_ — Today at 16:35 this is a Fun computer graphics problem :))) aka frustum culling but not really the same as the traditional problem, because usually you just discard entire objects that aren't on the screen
soooooo, they're all prime numbered factors of pi over 12 for the radians of each of the spooky spots??
show / hide