You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @blainelewis1 - the theta option is only used for the sampling of circles, ellipses and arcs (because these're the only shapes where that option makes sense):
The reason the option is listed in the SamplingOpts interface is due to the polymorphic nature of operations in the main thi.ng/geom package, e.g. the vertices() implementations (and many others). Maybe the theta option should be moved from the base interface into a new/extended version (can't think of a good name right now though, SamplingOptsXXX)
In any way, for now I should add a more explicit note to the theta docstring to point out this sampling option will only be used by some shapes...
I actually also just had this exact misunderstanding. I was trying to find a way of specifying that I wanted samples to be every d distance, but to have the sampler automatically increase resolution if the curvature of the path reached a certain threshold. I finally realized that this combination of constraints wasn't possible, but I did spend some time trying to figure it out.
I noticed there is a parameter to resample to angular resolution: https://github.com/thi-ng/umbrella/blob/develop/packages/geom-api/src/sample.ts
However, I am not getting the expected result when I use
theta
as a parameter:Expected:
Received:
I believe this is just the default behaviour and the resample by angular resolution is unimplemented, see:
https://github.com/thi-ng/umbrella/blob/develop/packages/geom-resample/src/simplify.ts
and
https://github.com/thi-ng/umbrella/blob/develop/packages/geom-resample/src/resample.ts
Neither mention
theta
which I think means the feature was documented but not implemented.The text was updated successfully, but these errors were encountered: