Doug Moen

Results 228 comments of Doug Moen

One more special property of `smooth_min` that I should mention. If you visualize `smooth_min(x,y,r)` as a distance field, ``` let r = 1; in make_shape { dist(x,y,z,t) = smooth_min(x,y,r); is_2d...

@TLC123: There is a problem with your `sminr` function, when it is used for blending shapes. The problem is that the blended distance field overestimates the distance to the surface...

For reference, here is Inigo Quilez's polynomial smooth min, which I currently use as smooth_min: ``` smooth_min(a,b,k) = let h = clamp( 0.5+0.5*(b-a)/k, 0, 1 ); in lerp( b, a,...

Thanks for pushing this forward. I need to try this in Curv. A question. You said "sort the list of distances in ascending or descending order. smin the lists first...

> @Digital-Monk said: > `smooth r .difference ( body; cut1; cut2; cut3; )` You can use ``` reduce [nothing, smooth r .difference] [body, cut1, cut2, cut3] ``` if you want...

> @Digital-Monk said > Unfortunately, I don't understand offset properly, because step 3 doesn't work as this would need. Unfortunately, the implementation of `offset` is a big cheat. It *should*...

Um, so the problem is that the set operations don't produce exact/Euclidean distance fields. `union` is exact on the outside, but not on the inside. `difference` is mitred, not exact,...

You can submit a PR with the changes that you are requesting. Or, you can point me at another project that defines these USE_EXTERNAL_xx variables using the same coding pattern...

Curv only supports recursive function definitions, not recursive data definitions. The 'illegal recursive reference' error is reported early in compilation: it happens while resolving names, before all identifiers have been...

One way to attack this problem is to introduce special syntax for defining 'overloaded' functions. The following syntax is copied from Haskell. ``` rand1 (x :: is_num) = frac(sin(x)*100000.0); rand1...