Skip to content
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

Merged
merged 4 commits into from
Jul 29, 2023

Conversation

kfahn22
Copy link
Contributor

@kfahn22 kfahn22 commented Jul 28, 2023

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

@patriciogonzalezvivo
Copy link
Owner

Thank you again for this new cool features

@patriciogonzalezvivo
Copy link
Owner

I did some editions to the styling on your previous commit. Hope you don't mind. I thought it may be useful.
3ec3024

@kfahn22
Copy link
Contributor Author

kfahn22 commented Jul 29, 2023

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.

@patriciogonzalezvivo
Copy link
Owner

Sorry here 66b52b7

@kfahn22
Copy link
Contributor Author

kfahn22 commented Jul 29, 2023

I have added 3d version to original car2polar files and updated the hlsl files (hopefully correctly). Sorry for my mistakes!

@patriciogonzalezvivo
Copy link
Owner

Perfect! thank you!
I added an example for the supershape here patriciogonzalezvivo/lygia_examples@4b47a0b
Do you mind creating an example for this one?

@patriciogonzalezvivo patriciogonzalezvivo merged commit cbd7b0f into patriciogonzalezvivo:main Jul 29, 2023
@kfahn22
Copy link
Contributor Author

kfahn22 commented Jul 29, 2023

Yes, I will try to create an example.

@kfahn22
Copy link
Contributor Author

kfahn22 commented Jul 31, 2023 via email

@kfahn22 kfahn22 deleted the mandelbulb branch August 2, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants