Nodebundle for playing with nodes

 From:  bemfarmer
7777.375 In reply to 7777.374 
Using the math from the .pdf with the _VarPitchHelix script:
http://moi3d.com/forum/index.php?webtag=MOI&msg=6697.1

For Barry's .3dm variable pitch helix:
The length of the variable pitch helix is 100 units of length.
The one turn startPitch is 10 units. (The pitch is actually variable over this 1st turn.)
The one turn endPitch is 30 units. (The pitch is actually variable over this 5th turn.)
The number of turns is N = 5.
Pitch1, the initial (instantaneous) pitch at the start, is 7.5 units. (vs 7.499808 calculated with 4 decimals, tangent lead angle)
Pitch2, the variable part, is 12.5 units.
Using tangent calculation, the ending "instantaneous" pitch of the screw is 32.4987 units ~= 32.5 units long.

The left constant pitch screw is of pitch 7.5 units, 2 turns.

The right constant pitch screw is of pitch 30 units, 2 turns, total length 60 units, which is OK, but does not match the ending tangent of the variable pitch screw.
To match up with the ending pitch of the variable pitch screw, it should be of pitch 32.5 units, 2 turns yielding 65 units long.

The x-axis displacement for the variable screw is X = N * (Pitch1 * t + Pitch2 * t * t),
where t ranges from 0 to 1, as the clock tick ranges from 0 degrees to 5 * 360 degrees, if one tick = 1 degree.
So the values used for t are = clock / (5 * 360)

When the center of the bottle reaches the start of the variable pitch screw, the x-axis displacement will need to switch to this equation,
from the motion equations of the constant sections. This range is x = 0 to x = 100.

If x < 0, constant speed equation 1. ( = 720 ticks )
If x>= 0 and x <=100, use variable speed equation. ( = 5 * 360 ticks )
If x> 100, use constant speed equation 2. ( = 720 ticks )
The original litegraph has a Selector logic node...

- Brian

EDITED: 29 May 2017 by BEMFARMER