-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mandelbulbSDF and spherical coord functions #79
Add mandelbulbSDF and spherical coord functions #79
Conversation
Thank you again for this new cool features |
I did some editions to the styling on your previous commit. Hope you don't mind. I thought it may be useful. |
I am fine with whatever changes you make. I just made some updates (updated name of spherical function) and tried to fix spacing, and just hope that I didn't create conflicts. |
Sorry here 66b52b7 |
I have added 3d version to original car2polar files and updated the hlsl files (hopefully correctly). Sorry for my mistakes! |
fix typo
Perfect! thank you! |
Yes, I will try to create an example. |
I have been working on creating an example and I don’t think the render is going to be very good unless there is a special ray marching function just for the mandelbulb because the number of iterations is critical to the render. I am also concerned that my version doesn’t render fast enough with it animating. I am not sure that is something you will want to do, so would it be best to remove the mandelbulbSDF? Again, I am very sorry that did not occur to me to check this out ahead of time before submitting a pull request and wasting your time!!! (I also realized that I forgot to update the name of the spherical function in the mandelbulbSDF, but that will not matter if it is deleted.). Let me know and I can create a pull request removing.
This is version with ray marching returning the number of iterations taken & using lygia coloring (which is OK, but there are certainly far better versions):
https://editor.p5js.org/kfahn/sketches/SnfJTVFrV
This is version using default lygia ray marching :
https://editor.p5js.org/kfahn/sketches/-mv_Dblcy
… On Jul 29, 2023, at 8:27 AM, Patricio Gonzalez Vivo ***@***.***> wrote:
Merged #79 <#79> into main.
—
Reply to this email directly, view it on GitHub <#79 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APQ2Y4XYT6MDV34N2IVNZNLXST6UFANCNFSM6AAAAAA24CLJXA>.
You are receiving this because you authored the thread.
|
This adds the SDF for the mandelbulbSDF and 3D spherical coordinates (which is also used for 3D supershape).
FYI, this is the sketch (slightly updated to use mandelbulbSDF in pull request) I did previously. Most of ray marching functions are ported from watch Martijn Steinrucken. I modeled the SDF partly on Daniel Shiffman's mandelbulb coding challenge (which created a point cloud) and is also based on Inigo Quilez's version of the mandelbulb.
I should add that the SDF returns a vec2 and raymarching is more complicated than for others, so including an example would be useful.
https://editor.p5js.org/kfahn/sketches/rF-g-OBH0