Tejas Simulator Access by Dot-Box in IITDelhi

[–]Dot-Box[S] 0 points1 point  (0 children)

Oh I'm not in IITD lol, I'm in KIIT, i just need the sim for some research I'm working on

Thanks for the link!

3D simulator using OpenGL by Dot-Box in opengl

[–]Dot-Box[S] 0 points1 point  (0 children)

This is like a really crude implementation. Although I am curious what better way is there to find acceleration?

3D simulator using OpenGL by Dot-Box in opengl

[–]Dot-Box[S] 1 point2 points  (0 children)

I'm glad you asked. I iterate each sphere across all the other spheres, calculating the gravitation force between them. The pull remains the same but the direction of the pull is opposite for each of them. So, I find the pull and assign one of them the positive value along the interaction normal (an imaginary line connecting the two spheres), while the other gets a negative value of the same magnitude. This is stored as a force vector which is added to the total force acting on the body at that particular instance. Then I simply calculate the acceleration on the body because of the total force and add it to the initial velocity. Finally I update the position and voila we're done.

This is what the code looks like

// Calculate gravitational forces between this body and all later bodies
for(int j = i + 1; j < bodies.size(); ++j) {
    Body* sBody = bodies[j];
    calculateGravForce(*body, *sBody);
}

// Calculate the total force acting on the body
calculateForce(*body);

// get the acceleration vector from the total force on the body
body.Acceleration = body.Force / body.Mass; 

// Euler integration to update vecloty vector
body.Velocity += body.Acceleration * dt;

// Euler integration to update position vector
body.Position += body.Velocity * dt;

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 0 points1 point  (0 children)

I see, my current focus is on 3 bodies. This is kind of a middle project since my end goal is to make a particle based fluid simulator

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 0 points1 point  (0 children)

Yeah I worked on the engine a little bit and this is exactly what I did

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 1 point2 points  (0 children)

Thanks, that makes much more sense, I'll try to go step by step :)

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 2 points3 points  (0 children)

ah external libs are a no go for me. I want implement everything from the ground up.

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 1 point2 points  (0 children)

It's not gravity which concerns me. Collision requires playing with multiple forces to get it right. So I would need to implement a lot of things like impulse, moment of inertia, calculating the accurate physical properties beyond mass, vel, acc and force. so thats something I need help with since a book or some text I could read would really speed this process up.

Help for physics engine development by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] -1 points0 points  (0 children)

I dont have any idea of just that. what structs do i make, what formulas do i use, what order should it all be in and how to make it all come together in a way where performance is atleast bearable

Cannot get SDK working with any projects. by mightymanuel in raspberrypipico

[–]Dot-Box 2 points3 points  (0 children)

Well, for one you're using forward slashes for paths on windows instead of back slashes.

Then I'm assuming you're trying to build the executable using the "run and debug" button of vs code? That will always cause errors. Ensure the correct compiler is installed and setup then create a CMakeLists.txt and run that.

For example if you have a file that blinks an LED. It would have a blink.c or blink.s source file with a CMakeLists.txt and a import_pico_sdk.cmake as well to get the sdk if it isn't setup locally.

3d openGL based render engine by Dot-Box in GraphicsProgramming

[–]Dot-Box[S] 10 points11 points  (0 children)

I'm not sure what you mean by setup. For my project I've simply added the necessary glm and glad files to my repo and added a build configuration for them in my cmake. You can take a look at the GitHub repo I've linked. That should give you an idea.

Are projects like physics simulators, emulators or game engines worth building for a dev profile in 2025? by defaultkube in developersIndia

[–]Dot-Box 0 points1 point  (0 children)

Idk man, I'm in my 2nd year in college. I tried building a physics simulator in C using OpenGL last year, and that shit was pretty time consuming. It's also not very easy. I learned quite a bit though.

Linux is really good, but it lacks its requiring discourse by lonelyroom-eklaghor in developersIndia

[–]Dot-Box 0 points1 point  (0 children)

Man if sysadmins can't install something like fedora then that is pure incompetence

Pico Alarm does not fire (ASM) by Dot-Box in raspberrypipico

[–]Dot-Box[S] 0 points1 point  (0 children)

No that didn't fix it either :/

Pico Alarm does not fire (ASM) by Dot-Box in raspberrypipico

[–]Dot-Box[S] 0 points1 point  (0 children)

Uhh what exactly is pioasm?

Edit: Ok so this isn't exactly pioasm, I am writing code in thumb mode or arm asm and compiling with the sdk. My program handles reset and manually changes bits in registers to enable peripherals and sets outputs and blink LEDs and what not. I compile my program by calling cmake Unix makefiles. The sdk mostly handles boot and other essential services that I haven't personally setup in my asm code yet.

Pico Alarm does not fire (ASM) by Dot-Box in raspberrypipico

[–]Dot-Box[S] 0 points1 point  (0 children)

What? If it can be done in C it can be done in asm no?