Unable to run a shared code on gravitational lensing

I saw a simulation of a black hole on imgur and found it cool enough that even though I know nothing about programming I ended asking for the code which can be found here

Following the guide I installed IntelJ IDEA and created a new project using the address provided, now looking at the code the first line is package org.ygl.openrndr.demos so I tried to do same using the address github.com/ylegall/openrndr-demos but I get:
org.gradle.api.InvalidUserDataException: Included build ‘C:\Users\Usuario\IdeaProjects\openrndr-utils’ does not exist

I also tried copying the Singularity.kt file into the kotlin folder of the openrndr-template but running it there doesn’t work either as it gives a lot of errors most of them saying Unresolved reference.

I googled a little bit those errors and tried looking if someone had asked about them here before but I didn’t found much and also reading the code I don’t get if there is a little bit of real physics hidden on it or if is just only a 100% visual simulation, so I would be very glad if someone could help me.


Welcome to the forum @ddabed :slight_smile:

I wasn’t aware you could declare packages with real urls. In any case, you’ll need access to ‘org.ygl.openrndr.utils’ in order to run the sketch, which you can import via gradle. The only thing for you to do is contact the author and ask if this package can be shared.

1 Like

Thanks, I think you can’t declare packages with real urls it was just me thinking I could my mistake, I didn’t realize either the utils package was from the author I though I was missing something from my openrndr installation, I will try to contact the author, thank you very much

Here is one file that contains all of the dependencies:

Also here is the build.gradle.kts file which you will need:

Here I’ve changed the kotlin version to 1.4 and enabled orx-parameters and orx-mesh-generators

you should now be able to run this single file by itself.

let me know if you run into any additional issues and I will help you get it running.


@derpivore thank you very much for taking the time to edit the code to help me, sadly I just broke the screen of my notebook therefore it is now in the computer service so I will have to come back to you again once I have solved this problem but it will be the first thing I do once I have it back.