MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-8  …  309-328  329-348  349-368  369-388  389-408  409-428  429-448  …  1849-1859

Thread Split: Some posts in this thread have been moved here

From: Barry-H
29 May 2017   [#369]
Hi,
I have been able to produce animations of the bottle feed screw with a constant pitch helix
and also a variable pitch helix but I would like to be able to produce a screw that as a mixture of both
i.e: start constant pitch then variable pitch exit constant pitch.
So my total movement is X = A + B + C
If I have a slider for X how can I switch to the various move profiles without have separate sliders ?
Any ideas .
Barry
From: speedy (AL2000)
29 May 2017   [#370]
Hello James
welcome back
I like to feel you.....
Well done , Trochoid .nod , turns out
Clear and Nice definition
Good Work my friend
al
From: bemfarmer
29 May 2017   [#371] In reply to [#369]
Hi Barry,
Some math would seem to be in order.
The screw turns with constant RPM, but the horizontal velocity of the bottle in mm/cm/meters per second, varies between constant sections, and variable section.
The horizontal velocity in the variable section also is not constant. (?)
The constant sections have constant horizontal velocity.
There are formulas to convert Pitch to Lead.

So the horizontal range must be split up into different velocities with some Logic.
Say the fastest constant section uses the straight clock.
When in a slower constant section, the bottle speed, or clock, will have to be adjusted down.
When the bottle is in the variable section, Multiply or divide the variable sections clock by the conversion equation(s).

The original litegraph had a bunch of functions...

- Brian
From: Barry-H
29 May 2017   [#372] In reply to [#371]
Hi Brian,
I'm using the maths you supplied with the variable pitch helix script.
I.e, the z axis and that works great.
For the constant pitch that was based on distance and number of coils
Or degrees of revolution.
I'm trying to have a slider or quartz widget that is the the full movement
but at various points it toggles to next profile maths function.
As an example say 20cm constant next 60 cm variable and finally 20cm constant.
Being able to toggle between profile functions allows different permutations.
I could do it with different sliders but that's not the goal.
It maybe that given the complete helix profile that a maths function could be
tailored for it but that's to much for my old brain.
Cheers
Barry
From: bemfarmer
29 May 2017   [#373] In reply to [#372]
Hi Barry
Could you please post the parameters for a Variable Pitch Helix?
If yours is of "proprietary importance," some alternate parameter would be OK.
It would be nice to have similar numbers to work from.

I think that the equation for the Variable Pitch Helix, related to pitch, will need to be reproduced in some form by a math node,
to get the variable x displacement, based upon pitch, for the bottle movement in that zone.

I'll have to puzzle on it later tonight, due to work :-)

Also I am not sure which nodes are available, and of use.
Some sort of If Then Else node might help? (To determine which zone the bottle is in?)
Looks like there is a compare node, under logic.

- Brian

https://en.wikipedia.org/wiki/Lead_(engineering)
From: Barry-H
29 May 2017   [#374] In reply to [#373]
Hi Brian,
attached is a simplified drawing showing the variable pitch helix and the nod file so you can see it work.
( the full drawing of the Screws is 2g so otherwise I would have posted it)
I have added an entry and exit pieces to show the areas I would like to include in my nod file.
These areas will not have any Bottle rotation.
I haven't any particular requirements for a screw at the moment but with this facility it will be easy to test.
Cheers
Barry

Attachments:
Helix Only.3dm
VarPitchHelix.nod


From: bemfarmer
29 May 2017   [#375] In reply to [#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
From: Karsten (KMRQUS)
30 May 2017   [#376] In reply to [#375]
Hello Brian,

I don't have the time at the Moment, but in my opinion it should be possible to calculate every section of the Transport independent and concate the numarrays or pointarrays by concat2 -> RMB to choose the type.

Have a nice day
Karsten
From: bemfarmer
30 May 2017   [#377] In reply to [#376]
Thankyou very much Karsten.

My understanding of how the various nodes work is very poor. Some study should help, (after Work:-).
I'm wondering if the logic Compare node would help, and about its inputs and outputs.
Could the Compare node substitute for the nonexistant Selector node?
Concatenate sounds useful, to combine the 3(+) Math nodes, but somehow the 3 speeds need to be switched between.

Didn't someone start a Wiki on Nodes?

- Brian
From: Karsten (KMRQUS)
30 May 2017   [#378] In reply to [#377]
Hello Brian,

my idea is to calculate all needed numbers ( Arrays for rotations and e.g. for Translation for the different sectors of the screw) and concate them together. Than pick the pairs of Rotation and Translation by the idxSelect- node. The idx can be controlled by a quartz node.

Only an Idea ...

Have a nice day
Karsten
From: bemfarmer
30 May 2017   [#379] In reply to [#378]
Thanks Karsten,

I was unaware of idxSelect node, must be a mod node.

I see that the Compare node will feed into a math node.

I'll have to re-install the mod version, and clean up my directories.
I have multiple node versions and files in many various directories, subdirectories, SSD and Harddrive...

- Brian
From: Barry-H
30 May 2017   [#380]
Hi,
I have managed to get a working node file for my problem as follows.
As before there are 3 segments
1) entry constant pitch. 720 degrees ( 2 rotations ) 10 pitch
2) Variable pitch middle. 1800 degrees ( 5 rotations ) 10 start end 30 pitch
3) exit constant pitch. ( 2 rotations ) 30 pitch
I have a slider set max to 5 rotations same as the middle section.
There is a bottle for each section with its own move profile.
The slider or in my case the quartz node controls all 3 segments.
The bottles are positioned as if all 3 segments had 5 rotations so
bottle 1 is placed 5 x 10 pitch away from start of segment 2
bottle 2 at start of segment 2 and bottle 3 at end of segment 2
It's basically a relay race if that makes sense.
In the animation the bottle seams to travel the full length of the screw
but in fact it is each bottle for its own section.
It's not an elegant solution but it allows to animate the movement and
check for clashes using Karsten's Boolean intersect.
Cheers
Barry



Image Attachments:
Bottle Positions.png 


From: speedy (AL2000)
31 May 2017   [#381]
Hello Friends
Another exercise,
I managed to produce an interesting Texture,
applying some transformation to the Classics
Pyllotaxis ....
link:http://www.mediafire.com/file/bn1ewtm9a6c9gan/Pendant.rar
best
al
From: Barry-H
31 May 2017   [#382]
Hi All,
can someone tell me if this script can be made into a node.

script: /* Hide all edges */ var breps = moi.geometryDatabase.getObjects().getBReps(); for ( var i = 0; i < breps.length; ++i ) { breps.item(i).getEdges().setProperty( 'hidden', true ); }

Also how to add your own node folder and add to the Index as this as changed from the early versions.
Thanks
Barry
From: bemfarmer
31 May 2017   [#383] In reply to [#382]
Hi Barry,
For a partial reply, my setup in windows7 is as follows:

At C:\ProgramFiles(x86\MoI3.0\ui,
I have the following:

a. subdirectory customui, (contains Max's customui)

b. subdirectory nodeeditor, (contains Max's latest stock version, 0.93)
(I did make a few minor changes such as Quartz, Different cursor, and lighter background color.)

c. subdirectory nodeeditor.93Mod, (contains Latest Mod version, with more content)

Under customui, to access item b., I have 99 NodeEdit.htm (no - sign), which has as its last line:

command="moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );">NodeEdit</moi:CommandButton>

Also under customui, to access item c., I have 98NodeEdit2.htm (no - sign),
which has as its last line:

command="moi.ui.createDialog( 'nodeeditor.93Mod/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );">NodeEditMod</moi:CommandButton>

So either version of nodeeditor can be accessed through custom UI.

No comment on hiding edges.

- Brian
From: Barry-H
31 May 2017   [#384] In reply to [#383]
Hi Brian,
thanks for the reply. My thinking is to add my own node file ie:MyBits which I can add
my experimental nodes to.
The script I posted is one of Michael's but with my novice skills in javascript am not sure
how or if it can be made to work as a node.
Anyway thanks
Barry
From: bemfarmer
31 May 2017   [#385] In reply to [#384]
I think that that is the purpose of the nodes/extensions subdirectory, a place for "third party" nodes, but I have a lot to learn still:-)

Need to re-read Max's posts when he came out with version .85 (?)
http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.572

- Brian
From: Karsten (KMRQUS)
1 Jun 2017   [#386] In reply to [#384]
Hello Barry,

find attached a script file with comments as a object for your studies. Copy it to the extensions folder an restart moi and the nodeeditor - that's it.

Have a nice day
Karsten

Attachments:
Barrys.js


From: Barry-H
1 Jun 2017   [#387] In reply to [#386]
Hi Karsten,
thanks for the node it loads ok but doesn't hide the edges ?
I connect the selected object to it but no go.
Thanks
Barry
From: Karsten (KMRQUS)
1 Jun 2017   [#388] In reply to [#387]
Please switch under infos to visible -> no

Show messages:  1-8  …  309-328  329-348  349-368  369-388  389-408  409-428  429-448  …  1849-1859