<InPhase>
lf94: Now note that example is not "smooth" because it's an extruded layer demo, but it shows the math of equal angular spacing.
<InPhase>
The one close to the origin is equal angle, and the other is equal z-step.
<lf94>
Is this an arc of a circle?
<lf94>
(one quarter)
<InPhase>
Yes.
<lf94>
My graphics brain is rusty; it's been a few months
<InPhase>
The same principle exists for any shape really, but the math gets trickier with arbitrary shapes. :)
<lf94>
"equal angular spacing"
<lf94>
is that what it's called?
<InPhase>
For the circle case, yeah. One could also call it equal arc lengths.
<lf94>
Why "sin(1)/100"
<lf94>
What is overlap?
<InPhase>
For an arbitrary curve you would want equal spacing along the curve, which would need some more elaborate computation to determine, possibly even doing it numerically. I think I did a demo of that once in the past, but don't know where that one is.
<InPhase>
Oh, that's for the linear extrude needing an overlap amount.
<InPhase>
It's the epsilon.
teepee has quit [Remote host closed the connection]
<InPhase>
Really the critical step is just iterate over angle or an integer that you map to angle, then determine x and y (or x and z) coordinates from that, rather than doing the z-step directly as the iteration.
<InPhase>
That part is really simple and straightforward. Most of the rest of that junk was just stuff I added in to make each layer line up exactly how I wanted it.
<InPhase>
If you're generating points, then you can skip most of that.
teepee has joined #openscad
<InPhase>
If we get data = render() implemented I can redo a demo of this using that feature and obtaining pure smoothness. :)
<InPhase>
implemented/merged
<lf94>
I still dont get it
<lf94>
XD
<lf94>
I can easily generate equal spacing no?
<lf94>
hm, maybe not
<lf94>
ok maybe I get it...
<lf94>
I thought when you generate points they are always equal distance on the curve
<lf94>
I guess not?
<InPhase>
Yeah, they are not.
<InPhase>
Although note that for printing purposes, a vertically aligned curve will end up sliced as layer lines anyway.
<InPhase>
So in many cases it doesn't matter. But for aesthetics or cases where it's too expensive to put the step at the layer line step, angular spacing is a bit nicer.
<InPhase>
lf94: Instead of SDF, defining a surface tracing function. :) It's bundled with some helper functions to make it easier, although some of them are very easy to just write down.
SamantazFox has quit [Remote host closed the connection]
SamantazFox has joined #openscad
<lf94>
that's what I'm looking to do now with replicad...
<lf94>
(open cascade)
<lf94>
I'm kind of leaning back to b-rep these days
<lf94>
In the end I dunno what to do. It's like b-rep is good for some things and f-rep for others
<lf94>
It'd be great to merge them
<lf94>
Or at least offer one language interface.
<lf94>
Maybe I'll write a curv-to-(openscad, replicad) transpiler
<lf94>
This would kind of eliminate my problem
<lf94>
And then you tag portions of the code which go out and get compiled by respective tools