|
|
First - let me start off by saying that your annotated summary render is
absolutely beautiful.
I don't know if you have a standard scene all rigged up for that kind of thing -
but it's really nice.
> Well, I was wrong :-/ In my own 'simplified' group of equations, leaving the
> first tau as tau/1 produces only ONE groove down the length of the barrel, no
> matter how I change the frequency.
>
> #declare Helix = function {select (mod (Theta(x, y, z), tau/1) - tau/2, 0.15,
> 0.35)}
Right. So basically all I'm doing is doing an if (one value) then this radius,
else if (another value) then another radius.
#declare Helix = function {select (mod (Theta(x, y, z), tau/3) - tau/6, 0.308,
0.35)} // modulates the radius to produce the rifling
Just using the dist () function would give you a cylinder.
Subtracting the Helix () function changes the radius of the cylinder according
to where around the cylinder you are.
#declare Rifling = function {dist (x, y, z) - Helix (x/12, y, z)}
Just using a simple atan2 function for Theta would give you a cylinder with
straight grooves down its length.
So I simply make the phase of Theta depend on x by adding it to the atan2
result.
#declare Theta = function {((atan2 (y, z)+pi)/pi)*tau + x*tau} // adds a
multiple of x to produce the helix
atan2 has a range of -pi/2 to pi/2, and the initial idea was to normalize all of
that so that I added pi/2 to go from 0 to pi, then divide by pi to get a range
from 0-1, and then multiply that by tau to get one full revolution.
I think the most useful thing to do at this point would be to ditch the
isosurface renderings and simply start graphing the equations to see where
things get out of joint. Having the rifling just *disappear* doesn't seem to
make any sense, so graphing the Helix function would be my first line of attack.
Post a reply to this message
|
|