|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> >
> > Sorry if I totally misunderstood the problem(?)
>
> Nope - you got it.
> I had a few spare minutes last night and pasted Chris' fix into my scene and it
> worked as claimed.
>
> Maybe start with a fresh copy of my scene and make the minimum necessary
> correction.
> (comment out my Theta function, and just paste Chris' 2 functions in after
> that.)
>
> I'm guessing that you have something in your scene that snuck in that you
> haven't undone.
>
Interesting! I need to take another look at that. Admittedly, my eyes and brain
were starting to fuzz over from hours of 'ultra concentration' (although I
thought I double-checked everything before posting...)
Meanwhile...
I came up with this little change for your own code, using 'clamp'. It might be
considered a 'hack', but it solves two problems at once: no more truncated
spirals; and the rifling is now continuous in both +x and -x (with no glitch at
x=0.)
#declare Helix = function {select (mod (Theta(clamp(x,0,1.0),y,z),
tau/3) - tau/6, 0.25, 0.35)}
Limitations:
clamp's 'max' value needs to be 1.0 (or any integer multiple of 1.0; it doesn't
seem to matter.) But no fractional part.
The first tau's divisor: any integer of 1.0 or greater, no fractional part.
The second tau's divisor can be anything > 1.0, any float value.
Post a reply to this message
Attachments:
Download 'rifling_for_be_3__kw.jpg' (261 KB)
Preview of image 'rifling_for_be_3__kw.jpg'
|
|