offset does not generate rounded shapes ? #545
-
Hi, I am currently trying to reproduce simple shapes to learn how to use libfive. I wrote the roundify function below that should be equivalent to the builtin offset function. I was expecting that the resulting rendering would display rounded corners but studio displays a cylinder with sharp corners. I suspect that there is something obvious that I am missing about libfive so, I wonder if you could point me in the right direction to understand the output generated by libfive ? def half_space(norm, p): def half_space_x(delta, sign): def half_space_y(delta, sign): def half_space_z(delta, sign): def cylinder_z(h, r): def roundify(shape, r): roundify(cylinder_z(2, 1), 0.1) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
A function like that will only generate a rounded shape if the distance field is exact. You can get a formula for an exact cylinder here: https://iquilezles.org/articles/distfunctions/ |
Beta Was this translation helpful? Give feedback.
A function like that will only generate a rounded shape if the distance field is exact. You can get a formula for an exact cylinder here: https://iquilezles.org/articles/distfunctions/